EDM-3449: Display org label in the user dropdown - #667
Conversation
WalkthroughPageNavigation now uses a dedicated organization display for single- and multi-organization states. Single-organization views expose a copyable ID popover, while multi-organization views retain switching behavior. Toolbar alignment is updated for the organization control. ChangesOrganization Display
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
|
9669fa8 to
163e8f4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/ui-components/src/components/common/PageNavigation.tsx`:
- Line 57: Update the organization display expressions in the
single-organization path and multi-organization toggle, using the organization
ID whenever the optional label is absent. Apply the same fallback pattern in
both locations, including the render around Content and the toggle near the
multi-organization handling, while preserving labels when present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 07206a19-d961-4a4b-a492-d6ee5de9d5b2
⛔ Files ignored due to path filters (1)
libs/i18n/locales/en/translation.jsonis excluded by!libs/i18n/locales/en/translation.json
📒 Files selected for processing (2)
libs/ui-components/src/components/common/PageNavigation.csslibs/ui-components/src/components/common/PageNavigation.tsx
163e8f4 to
f4c9a25
Compare
f4c9a25 to
3690213
Compare
Made-with: Cursor
Made-with: Cursor
3690213 to
bcecd42
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/ui-components/src/components/common/PageNavigation.tsx`:
- Line 28: Update the imports in PageNavigation.tsx so OrganizationItem is
brought in through a type-only import, while useOrganizationGuardContext remains
a runtime import from OrganizationGuard.
- Around line 48-58: Update the organization Popover trigger in PageNavigation
to use a keyboard-focusable PatternFly Button with a plain or equivalent styling
variant, replacing the non-focusable Content wrapper. Add an accessible name
while preserving the displayed organization.label/default text and existing
popover copy behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 659b3758-21bf-4f1e-8561-a42cde1aed78
⛔ Files ignored due to path filters (1)
libs/i18n/locales/en/translation.jsonis excluded by!libs/i18n/locales/en/translation.json
📒 Files selected for processing (2)
libs/ui-components/src/components/common/PageNavigation.csslibs/ui-components/src/components/common/PageNavigation.tsx
Made-with: Cursor
|
Sorry @jgyselov I had to modify the translations file after rebasing, and there was a new comment about accessibility from Coderabbit. Last commit addresses that: 9f5cb8d I had to modify from Popover to Tooltip to have the correct "tab key" navigation, and had to drop the "Copy ID" option. |
Always display the user's organization "Display name" (or its ID as a fallback).
When only 1 organization exists, it's displayed as read-only with a popover to be able to see and copy the orgId.

Update: now using Tooltip and without the "Copy" element:

When multiple organizations exists (with the organization selector)

Summary
libs/ui-components/PageNavigationcomponent to always display the user’s organization label in the secondary toolbar/user dropdown.OrganizationDisplay:data-testidon the dropdown toggle.PageNavigation.cssto vertically center the organization label consistently (including a new.fctl-subnav_organizationrule).Impact
libs/ui-components/) affects both:apps/standalone):PageNavigationrendered fromAppLayout.apps/ocp-plugin):PageNavigationrendered fromWithPageLayout(showSettings={false}).libs/types/,libs/i18n/,libs/cypress/,proxy/,packaging/, or CI/E2E configuration.PageNavigation.