Skip to content

EDM-3449: Display org label in the user dropdown#667

Draft
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-3449-display-user-org
Draft

EDM-3449: Display org label in the user dropdown#667
celdrake wants to merge 1 commit into
flightctl:mainfrom
celdrake:EDM-3449-display-user-org

Conversation

@celdrake

@celdrake celdrake commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Always display the user's organization "Display name" (or its ID as a fallback).

When only 1 organization exists

single-org

When multiple organizations exists (with the organization selector)
multple-orgs

We don't display the orgId in the case that there would be multiple orgs with the same display name.
There's limited space in this section, and in that case, users can use the Organization dropdown to identify their org.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: c1320f03-3f19-4e7d-9922-48361632fa55

📥 Commits

Reviewing files that changed from the base of the PR and between a5930f6 and 9669fa8.

📒 Files selected for processing (2)
  • apps/standalone/src/app/components/AppLayout/AppToolbar.css
  • apps/standalone/src/app/components/AppLayout/AppToolbar.tsx

Summary by CodeRabbit

  • Style
    • Refined app toolbar menu toggle alignment and visual layout.
    • Added organization label display in the user dropdown menu alongside username for improved context.

Walkthrough

AppToolbar now derives an organization label from the organization guard context and displays it in the user dropdown menu toggle alongside the username. The component imports are updated with Flex layout utilities, MenuToggle rendering is restructured to conditionally show the organization label on a second line, and CSS alignment is adjusted for proper vertical spacing.

Changes

Organization Label in User Dropdown

Layer / File(s) Summary
Component imports and type contracts
apps/standalone/src/app/components/AppLayout/AppToolbar.tsx
PatternFly component imports (Content, Flex, FlexItem) are added for layout support, and UserDropdownProps is updated to accept optional organizationLabel and use React.PropsWithChildren.
MenuToggle rendering and layout styling
apps/standalone/src/app/components/AppLayout/AppToolbar.tsx, apps/standalone/src/app/components/AppLayout/AppToolbar.css
MenuToggle content is refactored from simple text to a Flex/FlexItem structure that displays the username and conditionally renders the organization label on a second line; CSS align-items: flex-start is applied to .fctl-app_toolbar-menu__toggle for vertical alignment.
Organization context integration and prop passing
apps/standalone/src/app/components/AppLayout/AppToolbar.tsx
AppToolbar extracts organizationLabel from useOrganizationGuardContext() and passes it to UserDropdown as a prop for conditional rendering in the menu toggle.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: displaying the organization label in the user dropdown, which aligns with the changeset modifications to AppToolbar and AppToolbar.css.
Description check ✅ Passed The description is directly related to the changeset, explaining the feature implementation with visual examples and behavioral context for single vs. multiple organization scenarios.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@celdrake

Copy link
Copy Markdown
Collaborator Author

This solution only works for the Standalone UI, needs a proper solution for the OCP plugin app.

@celdrake celdrake marked this pull request as draft June 16, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant