[release-1.9] fix(theme): pick the navigation or rhdh colors based on user's config#2879
Conversation
Signed-off-by: Karthik <karthik.jk11@gmail.com>
Code Review by Qodo
1. Null sidebar color returned
|
|
Review Summary by QodoAlign navigation sidebar colors with user config and add page inset background token
WalkthroughsDescription• Add pageInsetBackgroundColor token for independent page inset styling • Resolve navigation sidebar colors from merged palette.navigation and rhdh.general configs • Fix sidebar background color application to prevent unintended main content area styling • Update sidebar item selected/hover states to use resolved navigation colors Diagramflowchart LR
A["User Config<br/>palette.navigation<br/>palette.rhdh.general"] -->|resolveNavigationSidebarColors| B["Navigation Sidebar<br/>Chrome Colors"]
B -->|sidebarBackgroundColor| C["Sidebar Background"]
B -->|sidebarItemInteractionBackgroundColor| D["Sidebar Item States"]
B -->|navigationItemColor| E["Item Text Color"]
B -->|navigationSelectedColor| F["Selected Item Color"]
G["pageInsetBackgroundColor<br/>Token"] -->|defaults to appBarBackgroundColor| H["Page Inset Background"]
File Changes1. workspaces/theme/plugins/theme/src/types.ts
|



Release-1.9 PR
This is a cherry-pick of 482ba12
https://redhat.atlassian.net/browse/RHDHBUGS-2981
The PR containss following chagns:
Align the navigation sidebar with merged palette.navigation and rhdh.general colors, including submenu rows and selected/active BackstageSidebarItem states.
Removes a theme override that set sidebarBackgroundColor in a way that applied the sidebar background color to main page inset.
Introduce a new token pageInsetBackgroundColor, so the page inset background can be controlled by config (defaults to appBarBackgroundColor).
Default RHDH without any customizations:
Customized sidebar background color states:
✔️ Checklist