Skip to content

org_members: Display username as fallback #9643

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sluongng
Copy link
Contributor

When displaying members in the organization members list, the username
will now be used as a fallback if the email and full name are not
available. This ensures a consistent display of user identifiers.

@sluongng sluongng requested review from siggisim and bduffany June 12, 2025 14:30
When displaying members in the organization members list, the username
will now be used as a fallback if the email and full name are not
available. This ensures a consistent display of user identifiers.
@sluongng sluongng force-pushed the sluongng/usename-fallback branch from 3ca3dcb to c825404 Compare June 12, 2025 14:32
@@ -250,7 +250,8 @@ export default class OrgMembersComponent extends React.Component<OrgMembersProps
<div className="affected-users-list">
{selectedMembers.map((member) => (
<div className={`affected-users-list-item ${this.isLoggedInUser(member) ? "flagged-self-user" : ""}`}>
{member?.user?.email || member?.user?.name?.full} {iconFromAccountType(member.user?.accountType)}
{member?.user?.email || member?.user?.name?.full || member?.user?.username}{" "}
Copy link
Member

@bduffany bduffany Jun 12, 2025

Choose a reason for hiding this comment

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

This implementation looks inconsistent with the accountLabel implementation in org_join_requests.tsx (here we prefer email but in org_join_requests.tsx we prefer username). Could we extract an accountName function from that accountLabel function (could be added to app/auth/user.ts) and call it both here and in accountLabel?

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.

2 participants