Repository navigation
Show users by display name in UserPopOverCard by default - #37127
Conversation
UserPopOverCard rendered `displayName ?? userName`, so every caller that passed only the login showed the raw username. The card now falls back to the display name of the user ProfilePicture already loads into the application store, then to the login. No new requests; teams unchanged. The two "Username" columns (userCellRenderer, UserNameCell) pass the login explicitly so they keep showing it next to the "Name" column. Fixes #37116
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
…s 2.1 UserPopOverCard on 2.1 renders displayName ?? userName and the row only passes the login, so the display-name assertion would fail on the release branch.
…t 2.1 #37773) (#37835) * Show users with a hover card where they render as plain text (#37773) * Show users with a hover card where they render as plain text Announcements (feed card, settings table), Context Center documents and persona version history now render the user through UserPopOverCard, so they get the shared hover card and the display name it resolves. The owner feed chip and the read-only memory banner fall back to the login when an owner has no display name instead of rendering blank or the raw login. Clicking the user in a document row no longer opens the preview. * Let UserPopOverCard resolve display names for owners and feedback authors CreateMemoryModal, KnowledgeCard and FeedbackApprovalTask passed getEntityName(ref) as displayName. getEntityName falls back to the login, so the prop always won and UserPopOverCard never looked up the display name for a reference without one. Pass the reference's own displayName instead. FeedbackApprovalTask also no longer renders a '-' user (and a lookup for it) when createdBy has no name. Also shortens an over-long eslint-disable comment in DocumentsView.test. (cherry picked from commit a9852c3) * Assert the login in the document updated-by check until #37127 reaches 2.1 UserPopOverCard on 2.1 renders displayName ?? userName and the row only passes the login, so the display-name assertion would fail on the release branch. * Fall back to the login when an owner or submitter display name is empty 2.1's UserPopOverCard renders displayName ?? userName, so an empty displayName left the name blank. Pass undefined instead in KnowledgeCard, the memory owner chip and FeedbackApprovalTask. The KnowledgeCard owner chip moves into its own component to stay within the complexity limit.
…atar - An empty displayName falls back to the resolved name instead of rendering blank. - The card fetches the user through useUserProfile when it shows a name, so call sites that hide the avatar (DescriptionSourceBadge) resolve too; the avatar shares the cache. - DescriptionSourceBadge no longer passes the login as displayName or '-' as a user. - Split the popover body and link path out to keep the card under the complexity limit.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…t the real lookup - getUserPopoverPath moves to UserPopOverCard.utils.ts and useUserLabel to src/hooks/user-profile/, per the folder conventions. - A team card with no displayName shows the team's display name, read through the popover's own team query so hovering reuses it. - useUserLabel.test uses the real store and useUserProfile with only getUserByName mocked: it checks the label after the response, the shared single request with the avatar lookup, the 404 fallback and empty displayName. - Explain at the two Username-column call sites why they pass the login.
The user tables (Users, Online users, Team users, Persona users and the
Members panels) showed the login in a Username column and the display name
in a Name column. They now show one Name column through UserPopOverCard
(display name, falling back to the login) and an Email column, which keeps
a unique identifier visible when two users share a display name. This also
removes the displayName={login} overrides the Username columns needed.
Comments Outside DiffThese findings could not be posted inline.
|
… card - The Email columns (Users, Online users, Team users, Persona users and the Members panels) render getUserIdentifier: the email, or the login when the email is missing or PII-masked, so the column stays a unique identifier for non-admin viewers instead of repeating the mask on every row. - The userCellRenderer test renders the real UserPopOverCard with only getUserByName mocked and asserts the name shown.
…lay-name # Conflicts: # openmetadata-ui/src/main/resources/ui/src/components/common/PopOverCard/UserPopOverCard.test.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/PopOverCard/UserPopOverCard.tsx
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsResolving display names in user cards and replacing Username with Name/Email changes user-facing identification; lookup errors could show a misleading fallback label. Makes ✅ 1 closed✅ Bug: Email column renders the PII-mask placeholder instead of hiding it
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* test(playwright): refresh stale 2.1 visual baselines and fix shell menu scenes Refresh 32 baselines from the 2.1 nightly (run 44266671648) actuals. Every diff traces to an intended change that arrived with the main merge: Tableau connected-app auth option (#37084), 400px entity summary panel (#37888), unified CopyButton (#37953), new Insights/AdvancedSearch icons (#37973), Data Estate connector counts (#37910) and the users Name/Email columns (#37127, #37998). shell-profile-menu and shell-mode-menu waited for my-data-page, which #38077 removed from /my-data in AI mode; wait for home-landing-page. * test(playwright): complete 2.1 shell and expanded Tableau baselines
Describe your changes:
Fixes #37116
Part of open-metadata/openmetadata-collate#6243 (consistent user display name & hover card). This is the last open piece of that epic: #37773 and Collate #8548 (plus their 2.1 backports #37835 and #8582) moved the plain-text sites onto
UserPopOverCard, and this PR makes the card show the display name.UserPopOverCardrendereddisplayName ?? userName, anddisplayNameis an optional prop. Every caller that passed only the login showed the raw username (jane.doe) instead of the display name (Jane Doe). Many callers only have a login string (announcementcreatedBy, document and versionupdatedBy, app runtriggeredBy, botupdatedBy, SCIMcreatedBy, Data Insight aggregations), so fixing them one by one could not work.The card now resolves the label itself:
displayNameprop, then the user's display name, thenuserName.displayName: it falls through (||, not??). Several callers passref.displayNamestraight through, and an empty string used to render a blank label.useUserProfilewhen it shows a name (showUserName, nochildren, not a team). That hook shares the store and in-flight cache withProfilePicture, so a card that also shows the avatar makes no extra request. A card that hides the avatar (showUserProfile={false}, e.g.DescriptionSourceBadge's "accepted by") resolves too, which reading only the avatar's store entry could not do.displayNameshows the team's display name, read throughuseEntityPopoverData(the hover card's own team query, so hovering reuses it).Also fixed:
DescriptionSourceBadgepassed the login asdisplayName(which pinned the login) and'-'as a user name. Both are removed.User tables are now Name + Email. The Users, Online users, Team users and Persona users tables (
commonUserDetailColumns), and the Members › Users, Online users and Team-detail panels, used to show the login in "Username" and the display name in "Name". They now show:UserPopOverCard(display name, falling back to the login).getUserIdentifier(UsersPureUtils): the email, or the login when the email is missing or PII-masked for the viewer, so the column stays unique.This removes the
displayName={login}overrides the Username columns needed. Playwright:OnlineUsersandProfileOnlineUsercheck the Name and Email headers,PersonaFlowexpects the display name, andProfileTeamfinds the member by its logindata-testid.getRowByName(login)still matches because the email contains the login.To stay within the complexity limit and the folder conventions:
getUserPopoverPathis inUserPopOverCard.utils.ts,useUserLabelis insrc/hooks/user-profile/, andUserPopoverBody/TeamNameare small components inUserPopOverCard.tsx.Taken over from @harsh-vador to close the epic. The original commit is kept; the follow-up commit addresses the review comment (
||) and the avatar-less case.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
displayNamepassed, user loaded → display name shown.displayNameprop passed → prop wins. EmptydisplayName→ resolved name.showUserNamefalse) → no fetch.Unit tests
useUserLabel.test.ts(new: real store anduseUserProfile, onlygetUserByNamemocked; checks the label after the response, one shared request with the avatar lookup, 404 fallback and emptydisplayName),UserPopOverCard.test.tsx(10 new cases),DescriptionSourceBadge.test.tsx,Users.util.test.tsx,MembersUsersPanel.test.tsx(store mock now providesgetState, whichuseUserProfilereads).UserPopOverCard: 469 suites, 7,759 tests passed.yarn ui-checkstyle:changedclean (no errors, no diff).tsc: no errors in the changed files.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Features/OnlineUsers.spec.ts,Pages/AIProfile/ProfileOnlineUser.spec.ts,Pages/AIProfile/ProfileTeam.spec.ts,Pages/AIProfile/ProfileMembers.spec.ts,Features/ContextCenterPermission.spec.ts(itsdocument-updated-bycheck onmainexpects the display name and passes only with this PR),Features/Announcements/*,Features/PersonaAIContext.spec.ts,Pages/ProfileTeam.spec.ts,Flow/PersonaFlow.spec.ts.Manual testing performed
Collate UI dev server (Collate
maincade90b7a4 with OSS = this branch merged withmain) against a local Collate server, logged in as admin. A userjane.doewith display name "Jane Doe" created an announcement, a Context Center document, a persona AI context version, a notification template and a Recognizer exception. Before = the server's own UI build (predates the epic); after = this branch.Screenshots
DescriptionSourceBadge, avatar hidden)UI screen recording:
Not applicable: bug fix to an existing component, not a new UI feature.
Checklist:
Fixes #<issue-number>above.REVIEW.md. Fixed the complexity error and the'-'user inDescriptionSourceBadge. No 🔴 open.🤖 Generated with Claude Code


Confidence Score: 5/5
No new blocking issue was found in the reviewed changes.Summary
UserPopOverCardnow resolves display names for user and team labels. User tables show Name and Email, with the login used when email is missing or masked.Reviews (9) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile