Skip to content
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

Merged
merged 13 commits into from
Apr 22, 2022
Merged

Booths #3039

merged 13 commits into from
Apr 22, 2022

Conversation

colinhowe
Copy link
Contributor

OoOoOo
image

@colinhowe colinhowe requested a review from a team as a code owner April 20, 2022 11:58
@github-actions github-actions bot added the 💎 styles For (S)CSS style related issues/changes/improvements/etc. label Apr 20, 2022
Copy link
Contributor

@0dtbanp 0dtbanp left a 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);
}
Copy link
Contributor

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?

Copy link
Contributor Author

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,
Copy link
Contributor

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])
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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

@colinhowe colinhowe merged commit de5ccc6 into redesign-2021 Apr 22, 2022
@colinhowe colinhowe deleted the booths branch April 22, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 styles For (S)CSS style related issues/changes/improvements/etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants