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

Reorder sidebar "people" list with "you" at the top. #6031

Merged
merged 9 commits into from
Apr 26, 2023

Conversation

nikk15
Copy link
Contributor

@nikk15 nikk15 commented Apr 13, 2023

Screenshot 2023-04-13 at 3 10 11 PM

Previously, "you" could be anywhere in a long list of guests. This fix moves "you" to the top so its easily visible.

NOTE: Typescript transition to come in a separate PR, as it affected multiple other components.

@nikk15 nikk15 marked this pull request as draft April 13, 2023 19:13
@@ -101,7 +149,8 @@ export function PeopleSidebar({
voiceChatEnabled,
isMod
}) {
const intl = useIntl();
const user = people.find(person => !!person.isMe);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all could work fine, another take that might make the jsx less confusing is to alter the people array, something like this.

const me = people.find(person => !!person.isMe);
filteredPeople = people.filter(person => !person.isMe);
filteredPeople.unshift(me);

and then you can just loop through filteredPeople

Copy link
Contributor

@nickgrato nickgrato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to be a build error that I'd figure out before but this file looks good to me!

@nikk15 nikk15 temporarily deployed to smoke April 26, 2023 15:17 — with GitHub Actions Inactive
@nikk15 nikk15 temporarily deployed to hc-bio April 26, 2023 15:17 — with GitHub Actions Inactive
@nikk15 nikk15 merged commit bf8b193 into master Apr 26, 2023
12 checks passed
@nikk15 nikk15 deleted the move-you-to-top-of-guest-list branch April 26, 2023 16:08
@mikemorran
Copy link
Contributor

@nikk15 I was thinking about this feature as I hopped into the demo room today! It is super helpful!

I was also going to suggest ordering "In Room" users above "In Lobby" users. Often as an event moderator, I find myself wanting to identify these users first, since they typically are the ones I need to kick or mute. I think, right now, they are mixed in with "In Lobby" users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants