upstreamable: frontend: GlobalSearch: Fix visibility on dark navbar#418
upstreamable: frontend: GlobalSearch: Fix visibility on dark navbar#418skoeva wants to merge 1 commit intoAzure:headlamp-downstreamfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Improves GlobalSearch styling so the search affordance remains visible/consistent on dark/colored navbars (including at high zoom) by aligning icon/button/textfield colors and backgrounds with the active theme.
Changes:
- Adds background/hover/border/font styling to the collapsed
IconButtonplaceholder so it isn’t transparent on dark navbars. - Makes the search
TextFieldbackground solid (background.default) and sets search icon color explicitly totext.primary. - Styles the lazy-load
searchFallbackTextFieldwith a matching background to prevent a brief navbar-color flash.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
illume
left a comment
There was a problem hiding this comment.
left a note about aria-hidden for the decoration
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
97c570c to
726829e
Compare
This change ensures the search bar remains visible and consistent across all zoom levels and themes with colored or dark navbars.
Fixes: #417
Summary
TextFieldandIconButton(small/zoomed breakpoint) lacked explicit backgrounds, making them invisible on colored navbars (e.g. Azure blue, dark themes). Both now usetheme.palette.background.default.IconButtonhover now usesbackground.mutedinstead of inheriting the navbar color.text.primary/text.secondarypalette tokens. The standalone icon-only button (isIconButton) inheritscurrentColorfrom the navbar instead, so it stays visible on any navbar color.searchFallback(shown whileGlobalSearchContentlazy-loads) had no background, causing a flash of navbar color on click. Fixed withbackground.default.navbar.backgroundinstead ofbackground.default.aria-labelto the icon-onlyIconButtonvariant; marked the decorativeTextFieldsearch iconaria-hidden. Replacedalpha(text.primary, 0.42)magic value with semantictext.secondaryfor WCAG-consistent contrast.Screenshots
On load
On click
On load (zoomed in)
On click (zoomed in)