Skip to content

fix(nav): Fix dark and mismatched navigation menu colors - #130236

Open
priscilawebdev wants to merge 17 commits into
masterfrom
priscilawebdev/fix/nav-menu-header-oklch-gradient
Open

priscilawebdev wants to merge 17 commits into
masterfrom
priscilawebdev/fix/nav-menu-header-oklch-gradient

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changed

Location Before After
Navigation › Organization menu, yellow logo Navigation › Organization menu, yellow logo before Navigation › Organization menu, yellow logo after
Navigation › Organization menu, yellow logo, dark Navigation › Organization menu, yellow logo, dark before Navigation › Organization menu, yellow logo, dark after
Navigation › Organization menu, black-and-white logo Navigation › Organization menu, black-and-white logo before Navigation › Organization menu, black-and-white logo after
Navigation › Organization menu, black-and-white logo, dark Navigation › Organization menu, black-and-white logo, dark before Navigation › Organization menu, black-and-white logo, dark after
Navigation › Organization menu, letter avatar Navigation › Organization menu, letter avatar before Navigation › Organization menu, letter avatar after
Navigation › Organization menu, letter avatar, dark Navigation › Organization menu, letter avatar, dark before Navigation › Organization menu, letter avatar, dark after
Navigation › User menu, org yellow logo Navigation › User menu, org yellow logo before Navigation › User menu, org yellow logo after
Navigation › User menu, org yellow logo, dark Navigation › User menu, org yellow logo, dark before Navigation › User menu, org yellow logo, dark after
Navigation › User menu, org black-and-white logo Navigation › User menu, org black-and-white logo before Navigation › User menu, org black-and-white logo after
Navigation › User menu, org black-and-white logo, dark Navigation › User menu, org black-and-white logo, dark before Navigation › User menu, org black-and-white logo, dark after
Navigation › User menu, org letter avatar Navigation › User menu, org letter avatar before Navigation › User menu, org letter avatar after
Navigation › User menu, org letter avatar, dark Navigation › User menu, org letter avatar, dark before Navigation › User menu, org letter avatar, dark after

via @priscilawebdev.

--

View Session [Sentry]

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ no issues found

@priscilawebdev priscilawebdev changed the title fix(nav): Keep menu header gradient from going near-black on bright avatars fix(nav): Fix dark and mismatched menu header gradients Nov 6, 2026
@sentry

sentry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
14 10 2 0 786 0 ✅ Approved

⚙️ sentry-frontend Snapshot Settings

The HSL version darkened bright avatar colors far past the default gradient, so a yellow logo started the menu header near black. Scale the color in linear RGB until its OKLab lightness matches each default stop instead, which keeps the hue and stops exactly at the default's lightness. Gray logos say nothing about the brand, so they keep the default gradient.

Refs DE-1832
The user menu header took its gradient from the user's photo, so it rarely matched the organization menu next to it. Use the organization's avatar for both, and fall back to the default gradient when there is no organization.

Refs DE-1832
@priscilawebdev

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 78cba97. Configure here.

Add a frameColor prop to AvatarButton that sets the color of the frame around the avatar, the border and raised edge. The button stays unaware of where the color comes from.

A new useOrganizationPalette hook takes the current organization's colors in one place: the menu header gradient, and the frame color the organization's own avatar button uses. NavigationMenuHeader and a new NavigationAvatarButton read it themselves, so both menus and both buttons in the primary navigation always share the organization's colors. The button frame only applies with settings v3, where the menu headers are shown.

Refs DE-1832
Core components may import color, but the later spec override restored the restriction for their tests, forcing eslint-disable comments. Lift it for core specs only.
…olor

Scaling linear RGB kept light avatar colors' whitish tint, so the header gradient came out muted. Cap the lightness in OKLCH instead, keeping the hue and as much chroma as sRGB allows.
@priscilawebdev
priscilawebdev marked this pull request as ready for review November 12, 2026 08:58
@priscilawebdev
priscilawebdev requested a review from a team as a code owner November 12, 2026 08:58

@Jesse-Box Jesse-Box left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@priscilawebdev Maybe this should be a separate PR entirely, but while I think the gradients clearly look better, but Im a bit un-easy about determining the button chonk based on the avatar.

I feel like just keeping the default colours are present on our secondary buttons ensures a degree of contrast for both themes.

The organization colors only apply to the navigation menu headers, not to the avatar buttons. This reverts commit f056f14.

Refs DE-1832
The button's border and raised edge took a color sampled from the avatar. Only the navigation menu headers should take the avatar's color, so the button now keeps the default button colors. Logos that don't fill the frame are still inset.

Refs DE-1832
The button's border and raised edge took a color sampled from the avatar. The Settings v3 design uses the neutral button edge, and only the navigation menu headers take the avatar's color. Logos that don't fill the frame are still inset.

Refs DE-1832
Logos with transparent corners or edges were inset with padding on the white button face, so round logos looked small and boxed in. The Settings v3 design has every image fill the button edge to edge.

Refs DE-1832
The default button edge is too light to stand out around an avatar. Frame every avatar in border.neutral.vibrant instead, the gray the suggested state already uses, whatever the avatar's color. Padded logos keep their inset.

Refs DE-1832
The avatar covered the button's own border and drew a transparent one in its place, so the avatar button had no outline, unlike other buttons. Draw the container border in the button's neutral edge color.

Refs DE-1832
This PR only fixes the menu header gradient.

Refs DE-1832

This branch was successfully deployed

1 active deployment
Preview — 3b95da12 Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants