Skip to content

upstreamable: frontend: GlobalSearch: Fix visibility on dark navbar#418

Closed
skoeva wants to merge 2 commits intoAzure:headlamp-downstreamfrom
skoeva:search-bg
Closed

upstreamable: frontend: GlobalSearch: Fix visibility on dark navbar#418
skoeva wants to merge 2 commits intoAzure:headlamp-downstreamfrom
skoeva:search-bg

Conversation

@skoeva
Copy link
Copy Markdown
Collaborator

@skoeva skoeva commented Mar 12, 2026

This change ensures the search bar remains visible and consistent across all zoom levels and themes with colored or dark navbars.

Fixes: #417

Summary

  • TextField and IconButton (small/zoomed breakpoint) lacked explicit backgrounds, making them invisible on colored navbars (e.g. Azure blue, dark themes). Both now use theme.palette.background.default.
  • Small-breakpoint IconButton hover now uses background.muted instead of inheriting the navbar color.
  • Search icons and placeholder text now use text.primary/text.secondary palette tokens. The standalone icon-only button (isIconButton) now sets color="inherit" on the IconButton, so it inherits the navbar's contrast color instead of MUI's default action.native grey.
  • searchFallback (shown while GlobalSearchContent lazy-loads) had no background, causing a flash of navbar color on click. Fixed with background.default.
  • The full-width overlay shown when the search is focused now correctly uses navbar.background instead of background.default.
  • Added aria-label to the icon-only IconButton variant; marked the decorative TextField search icon aria-hidden. Replaced alpha(text.primary, 0.42) magic value with semantic text.secondary for WCAG-consistent contrast.

Note: Also includes snapshot updates to account for the changes introduced to SimpleTable in a prior commit.

Screenshots

On load

image

On click

image

On load (zoomed in)

image

On click (zoomed in)

image

@skoeva skoeva self-assigned this Mar 12, 2026
Copilot AI review requested due to automatic review settings March 12, 2026 12:17
@skoeva skoeva added the a11y a11y related issues label Mar 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IconButton placeholder so it isn’t transparent on dark navbars.
  • Makes the search TextField background solid (background.default) and sets search icon color explicitly to text.primary.
  • Styles the lazy-load searchFallback TextField with 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.

Comment thread frontend/src/components/globalSearch/GlobalSearch.tsx Outdated
Comment thread frontend/src/components/globalSearch/GlobalSearch.tsx
Copilot AI review requested due to automatic review settings March 12, 2026 12:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread frontend/src/components/globalSearch/GlobalSearch.tsx Outdated
@illume illume marked this pull request as draft March 12, 2026 12:39
@illume illume added p-none No priority was assigned bug Something isn't working labels Mar 12, 2026
Comment thread frontend/src/components/globalSearch/GlobalSearch.tsx Outdated
Copy link
Copy Markdown
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a note about aria-hidden for the decoration

@skoeva skoeva force-pushed the search-bg branch 3 times, most recently from 97c570c to 726829e Compare March 12, 2026 19:19
@skoeva
Copy link
Copy Markdown
Collaborator Author

skoeva commented Mar 16, 2026

I don't think the frontend test failure is related

@skoeva skoeva force-pushed the search-bg branch 2 times, most recently from 4f63ad9 to b5e244d Compare March 19, 2026 15:58
@skoeva skoeva marked this pull request as ready for review March 20, 2026 22:09
Copilot AI review requested due to automatic review settings March 20, 2026 22:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skoeva skoeva force-pushed the search-bg branch 2 times, most recently from fa46a69 to 4270448 Compare March 21, 2026 14:27
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
Copilot AI review requested due to automatic review settings March 21, 2026 14:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skoeva skoeva requested a review from illume March 21, 2026 14:50
@skoeva skoeva linked an issue Mar 24, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator Author

@skoeva skoeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged in the main repo, will get pulled in at some point

@skoeva skoeva closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y a11y related issues bug Something isn't working p-none No priority was assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [a11y] search bar changes colors on high zoom

4 participants