-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Display username while removing the user from the group #11438
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@david-leifker - Does it make sense to keep double quotes around the username in remove group modal capture above. Please suggest. |
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.
Hi @kanavnarula!
Thanks for the contribution. In general, the idea makes sense . The following comment must be addressed before merging this one in:
- We never should use the "URN" of the user to display their name, as we are doing in this PR. Instead, we should use the display name of the entity which can be obtained via entityRegistry.getDisplayName(EntityType.CorpUser, entity)
Thanks
John
Hi @jjoyce0510, Thanks for looking in the PR. URN was coming as string to the function so could not use entityRegistry.getDisplayName(EntityType.CorpUser, entity). I have updated the function signature to accept CorpUser entity instead of string. Please check and suggest if these changes are looking fine. Thanks |
@jjoyce0510 When you get a chance, please review this PR. Thanks in advance. |
@jjoyce0510 - Did you get chance to check the PR changes. |
@jjoyce0510 @david-leifker - Please review when you get chance. Thanks in advance! |
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 like it addressed the comments. Going to merge. Thanks!
@@ -137,12 +137,13 @@ export default function GroupMembers({ urn, pageSize, isExternalGroup, onChangeM | |||
}, 3000); | |||
}; | |||
|
|||
const onRemoveMember = (memberUrn: string) => { | |||
const onRemoveMember = (memberEntity: CorpUser) => { | |||
const memberName = memberEntity?.properties?.displayName || undefined; |
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.
please use entityRegistry.getDisplayName(EntityType.CorpUser, memberEntity)
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.
@jjoyce0510 - Logic updated to pull display name using above command. Thanks!
@jjoyce0510 @david-leifker - Closing this PR as I messed up by adding other file changes related to another contribution. |
This change is to display username (for the confirmation) while removing the user from the group.
Before:
After:
Checklist