-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
@@ -101,7 +149,8 @@ export function PeopleSidebar({ | |||
voiceChatEnabled, | |||
isMod | |||
}) { | |||
const intl = useIntl(); | |||
const user = people.find(person => !!person.isMe); |
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.
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
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.
seems to be a build error that I'd figure out before but this file looks good to me!
@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 |
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.