feat(webapp): Themes + contrast settings update#4206
Conversation
🦋 Changeset detectedLatest commit: 6b0484e The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview Deployment
|
6525961 to
3ccd96f
Compare
7d9ea5b to
bad78e6
Compare
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
Workspace packages resolve to TS source via the @triggerdotdev/source condition; server.ts keeps the Express/cluster/ws wiring with vite middleware in dev and the ESM server bundle in prod. Fixes surfaced by the stricter ESM pipeline: destructured route exports, server-only imports in routes/components, CJS interop (redlock, cuid, regression), browser node-global shims, font asset handling, and a websockets TDZ.
Restores the unit-testable export (removed to satisfy the Vite route export rules) by extracting the helper out of the route file.
createActionApiRoute's loader handles CORS OPTIONS preflight; the destructured exports never surfaced it (pre-existing), do it now.
bad78e6 to
653cb43
Compare
3ccd96f to
9a79068
Compare
- semantic token overrides for light, trigger.light editor/code palettes - Interface theme dropdown on /account, gated by hasThemeSwitcher flag - unify light surfaces: buttons, inputs, radios, checkboxes, tabs, clipboard fields - fix checkbox :read-only override and useThemeColor hydration mismatch - resolve Firefox panel animation check from request UA
- re-resolve theme colors when data-theme changes - narrow jsonb_set write for theme preference - opaque amber for reasoning text in light mode
- keep dark-theme switch/radio thumb colors, white only in light - pick avatar letter color by background luminance - seed required preference fields when jsonb column is null
c9b14b5 to
21dcc04
Compare
…billing - white query editor and apikeys accordion surfaces - white Cancel and Contact us buttons - drop the doubled hover ring on the regions suggest button - route the section-header menu through the shared ellipsis primitive
21dcc04 to
000ccd1
Compare
Backgrounds deepen (dark) or lift (light), surfaces and all border steps strengthen, text weights increase - task names and dimmed labels now respond visibly to the slider in both modes.
Whites can't get whiter: dimmed/faint text goes near-black, borders and controls darken hard, deep surfaces dip slightly for panel separation.
Shared contrast-chip marker on error/health/pill/source/connection chips and subtle badges; a contrast+saturate filter driven by --theme-contrast separates the tint and its colored text.
…he contrast slider
…eference React skips the data-theme write when its virtual DOM already matched the SSR fallback while the inline script had flipped the real attribute; the sync hook now writes pinned themes explicitly.
🧭 Helm Chart Prerelease PublishedVersion: Install: helm upgrade --install trigger \
oci://ghcr.io/triggerdotdev/charts/trigger \
--version "4.5.7-pr4206.33a5415"
|
Login, invites and other anonymous pages resolve the System preference when the theme switcher flag is on; Classic stays the flag-off default. The invites heading goes monochrome in System themes.
The new-org background is built from dark-dashboard screenshots (plus a hardcoded near-black fill); the light theme falls back to a flat surface.
Light variants generated from the dark screenshots by inverting lightness (hues survive, so the accent smudges stay true); optimized progressive JPEGs at a fraction of the original size.
Error boundary backdrop, prompt override editor pane, AI filter error popover and chart-zoom tooltip get light: styling; standalone white spinners go blue; bulk-action onboarding, blank-state and queues-upgrade screenshots ship light variants (lightness-inverted, optimized).
# Conflicts: # apps/webapp/app/routes/account._index/route.tsx
Missing or legacy preferences resolve to the pinned Dark theme (not system-resolved, so nobody is surprised by light mode) and the default contrast is 50. Classic remains the flag-off look.
| export function normalizeThemePreference(value: unknown): ThemePreference { | ||
| const result = ThemePreference.safeParse(value); | ||
| return result.success ? result.data : "dark"; | ||
| } |
There was a problem hiding this comment.
🔍 Theme default (dark) applies app-wide when flag defaults on
With hasThemeSwitcher defaulting on (see reported bug), a user who never picked a theme resolves to normalizeThemePreference(undefined) which returns "dark" (apps/webapp/app/utils/themePreference.ts:11-14), not "classic". So the practical consequence of the flag inversion is that the entire app renders the NEW Dark theme rather than the legacy Classic look for everyone. If the maintainers actually intend the switcher to ship on, they should confirm the new Dark theme (not Classic) is the desired global default, since that is what will happen.
Was this helpful? React with 👍 or 👎 to provide feedback.
# Conflicts: # apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx # apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues_.$queueParam/route.tsx
Adds System Preferences, Dark and Light themes, gated by the
hasThemeSwitcherfeature flag (off by default — dark stays the default theme for everyone).Old theme is now "Classic"and set as default.
"System preferences" theme has both Light and Dark modes and uses your laptop settings to use a correct one.
It has less color accents (specifically less colored text), and they are the same for both modes, only grayscale values change between them. And Light/Dark themes can be used separately.
New Contrast setting is available for System Preferences, Dark and Light themes - it changes the contrast for the whole app. All new visual Settings live in Account.
Light theme with 0 -> 100 Contrast
Dark theme with 0 -> 100 Contrast