feat(header): add new NFS header#2783
feat(header): add new NFS header#2783rohitkrai03 wants to merge 1 commit intoredhat-developer:mainfrom
Conversation
Code Review by Qodo
|
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
b1d18a2 to
8ddf68b
Compare
Review Summary by QodoAdd New Frontend System support for global header with config-driven extensions and default components
WalkthroughsDescription• Introduces comprehensive New Frontend System (NFS) support for the global header plugin with two extension blueprints (GlobalHeaderComponentBlueprint and GlobalHeaderMenuItemBlueprint) enabling plugins to contribute toolbar components and dropdown menu items • Implements config-driven toolbar buttons and menu items via globalHeader.components and globalHeader.menuItems in app-config.yaml, allowing deployers to extend the header without writing plugin code • Adds three implementation tiers: data-driven (config-based), building blocks (reusable components), and fully custom React components for maximum flexibility • Creates extension data refs, context provider, and hooks (useGlobalHeaderComponents(), useGlobalHeaderMenuItems()) for distributing collected extension data throughout the app • Implements menu item grouping and sorting utilities with priority-based ordering and section-based organization • Adds new NFS components: GlobalHeader, GlobalHeaderDropdown, GlobalHeaderDropdownContent, ProfileDropdown, HelpDropdown, ApplicationLauncherDropdown, and MyProfileMenuItem • Provides 10 default toolbar extensions (company logo, search, spacer, self-service, starred, app launcher, help, notifications, divider, profile) and 6 default menu item extensions • Fixes dropdown auto-close on route navigation and improves accessibility with better focus management and ARIA labels • Updates legacy mount points to use new HeaderIconButton component for self-service button • Adds comprehensive documentation guide for extending the global header using NFS with setup, extension authoring, and customization examples • Includes extensive test coverage for menu item grouping, config reading, dropdown rendering, and context hooks • Updates package.json with NFS dependencies and proper module exports for ./alpha subpath Diagramflowchart LR
A["app-config.yaml<br/>globalHeader config"] -->|readConfigComponents| B["GlobalHeaderComponentData"]
A -->|readConfigMenuItems| C["GlobalHeaderMenuItemData"]
D["Extension<br/>Blueprints"] -->|contribute| B
D -->|contribute| C
B -->|collected by| E["globalHeaderModule"]
C -->|collected by| E
E -->|provides via| F["GlobalHeaderContext"]
F -->|consumed by| G["GlobalHeader<br/>Component"]
G -->|renders| H["Toolbar Items<br/>& Dropdowns"]
I["Default<br/>Extensions"] -->|registered in| J["globalHeaderPlugin"]
J -->|provides| D
File Changes1. workspaces/global-header/plugins/global-header/src/alpha/defaults/rhdhLogo.ts
|
Signed-off-by: Rohit Rai <rohitkrai03@gmail.com>
|


Hey, I just made a Pull Request!
Fixes - https://redhat.atlassian.net/browse/RHIDP-11822
Screen.Recording.2026-04-16.at.2.52.57.AM.mov
✔️ Checklist