Skip to content

feat(settings): Add a theme variant picker to the Appearance page - #132283

Draft
sentry-junior[bot] wants to merge 2 commits into
nate/de-1872-app-theme-cssfrom
nate/de-1897-theme-variant-picker
Draft

sentry-junior[bot] wants to merge 2 commits into
nate/de-1872-app-theme-cssfrom
nate/de-1897-theme-variant-picker

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Adds Light and Dark theme pickers to Account Settings → Appearance, so people can choose the ash or midnight dark theme.

Stack: this is stacked on #131865, which is stacked on #131861. It needs #132274, the backend PR that adds the themeVariantLight and themeVariantDark user options. Land the backend first.

What changes

  • A "Themes" panel on the Appearance page with two radio groups of ToggleCards, one per color scheme:
    • Light: Default.
    • Dark: Default, Ash and Midnight.
  • Both sections come from one config list, so adding a theme is a new entry.
  • The two sections are independent of each other and of the existing Light/Dark/System setting. Each one picks the theme for its own scheme. The Light/Dark/System setting still picks which scheme is active.
  • Each card shows a small mock-UI preview drawn only with themeVariables (var(--scraps-*)). The preview root sets data-color-scheme, and dark cards also set data-theme-dark, so theme.css styles each preview on its own. The Default dark card sets data-theme-dark="default", which stops an ash or midnight theme set on <html> from reaching it.
  • Choices are read from user.options.themeVariantLight and themeVariantDark. They save through PUT /users/me/ with a partial {options: {themeVariantDark: 'ash'}}, the same way the Theme select saves theme. A failed save puts back the saved value and shows an error toast.
  • ThemeAndStyleProvider sets data-theme-dark on <html> from themeVariantDark when the org has organizations:theme-variants and the value isn't default, and removes it otherwise.
  • User['options'] gains themeVariantLight?: 'default' and themeVariantDark?: 'default' | 'ash' | 'midnight'. They're optional because frontend and backend deploy separately.

Gating

Gating is UI-only, behind organizations:theme-variants. The Appearance page already shows nothing when the flag is off, and <html> only gets data-theme-dark when the flag is on. PUT /users/me/ has no organization to check the flag against.

Refs DE-1897

via @natemoo-re.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 23, 2026 22:42
Light and Dark sections of ToggleCard radios, each card with a mock-UI
preview scoped by data-color-scheme and data-theme-dark. The selection
lives in component state until we decide where to store it.

Refs DE-1899

Co-Authored-By: nate <7118177+natemoo-re@users.noreply.github.com>
The picker reads and saves the themeVariantLight and themeVariantDark
user options through PUT /users/me/. With theme-variants on, the
provider sets data-theme-dark on <html> for a non-default dark theme.

Refs DE-1897

Co-Authored-By: nate <7118177+natemoo-re@users.noreply.github.com>
@linear-code

linear-code Bot commented Nov 23, 2026

Copy link
Copy Markdown

DE-1897

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

This branch was successfully deployed

1 active deployment
Preview — dc8c0513 Deployed Nov 23, 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.

1 participant