-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Booths #3039
Booths #3039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a couple of things to improve
"Too many space IDs provided. Firebase limits to 10 items in an IN query. Truncating" | ||
); | ||
spaceIds.splice(10); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Question] I think we had an option to batch requests if the total number is larger than the max set by firebase. But I suppose we won't need it in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do. We'd have to loop over them and setup multiple subscriptions. Might end up getting messy/slow. Matt is happy with the limit of 10 for now :)
@@ -110,6 +112,10 @@ export const SpaceEditForm: React.FC<SpaceEditFormProps> = ({ | |||
showContent: space.showContent ?? DEFAULT_SHOW_CONTENT, | |||
backgroundImage: undefined, | |||
backgroundImageUrl: space.backgroundImageUrl, | |||
boothsEnabled: space.boothsEnabled, | |||
maxBooths: space.maxBooths || 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's replace this 1
with a constant from settings
? MIN_MAX_BOOTHS
template === VenueTemplate.meetingroom && | ||
managedBy === undefined | ||
) | ||
.map((venue) => [venue.id, venue]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's combine this filter
and map
into a reduce
and create a separate function for the equality checks?
We'll avoid going through the array twice in this case
display: block; | ||
margin-bottom: space.gap(12); | ||
@include font.xlarge; | ||
border-bottom: 1px solid rgba(130, 130, 130, 0.3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use border.$width--slim
instead of this 1px and replace rgba with theme.$sparkle--border
() => | ||
spaces?.filter(isPartyMapVenue).map((space) => { | ||
const managedSpaces = spaces.filter(({ managedBy }) => !!managedBy); | ||
const unmanagedSpaces = spaces.filter(({ managedBy }) => !managedBy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe we can replace this with a reduce that has 2 props in an object? Something like:
{managedSpaces: [], unmanagedSpaces: []}
and then push into corresponding one based on the managedBy
value?
Again, we'd avoid going through the space array twice this way
OoOoOo