Skip to content

fix(editor): light theme contrast + gradient palette (cherry-pick for 1.10.0-rc.2) - #474

Merged
EtienneLescot merged 2 commits into
release/v1.10.0from
claude/light-theme-contrast-gradients-rc2-cherrypick
Aug 22, 2026
Merged

fix(editor): light theme contrast + gradient palette (cherry-pick for 1.10.0-rc.2)#474
EtienneLescot merged 2 commits into
release/v1.10.0from
claude/light-theme-contrast-gradients-rc2-cherrypick

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick of #470 onto release/v1.10.0 for the next RC.

Summary

  • Gradient picker contrast: the "remove color" icon read as invisible until hover, and the brightness-slider thumb disappeared into the light-theme popover background (its track had no backing of its own, unlike the dark color-wheel canvas above it).
  • Two more dark-hardcoded surfaces found via a light-theme sweep: ShortcutsConfigDialog.tsx and App.tsx's editor-loading Suspense fallback, both ignoring data-theme entirely.
  • White-on-mint contrast (theme-independent): .exportBtn, .bigRecBtn, .previewEmptyPrimaryButton, VirtualPreview's icon-button hover, plus two more found by a follow-up self-review (MediaStage.tsx had a typo'd token that silently fell back to white; LeftPanel.tsx used --bg instead of --accent-on) — all switched to the --accent-on token the design system already defines for text on the accent background.
  • Default gradient presets: recolored from 16 swatches built out of 4 grays + the single mint accent to a spread across the same hues already offered in the solid-color tab.
  • Follow-up self-review fixes: a subagent code review of the diff (run while CodeRabbit was rate-limited) caught two bugs the token migration itself introduced — a dead hover state and an invisible border in the Shortcuts dialog's conflict UI — plus fixed the loading-flash-in-dark-theme regression the first pass introduced, via a synchronous theme-bootstrap script in index.html.

Same commits as #470 (merged to main), cherry-picked verbatim.

Testing

Same as #470: npx biome check ., npx tsc --noEmit -p ., and the relevant vitest suites all pass on this branch too.

🤖 Generated with Claude Code

EtienneLescot and others added 2 commits August 22, 2026 13:00
…the light theme

Two contrast bugs reported directly against the gradient picker: the
"remove color" icon read as invisible until hover, and the brightness
slider's thumb disappeared into the popover background in light mode.
Both buttons/icons in gradient-editor.tsx were colored for the dark
color-wheel canvas above them, but the brightness-slider row has no
canvas of its own — it sits directly on the (theme-dependent) popover
surface, where the near-white thumb (`#f5f5f5`) all but vanished
against the light theme's near-white surface. Gave that row its own
dark backing, consistent with the canvas and angle-knob beside it
(deliberately dark-by-design, like most pro color pickers), and bumped
the icon buttons from 60% to 80% white so they don't need hover to read.

A light-theme sweep for the same class of bug found two more hardcoded
surfaces: ShortcutsConfigDialog.tsx (`bg-[#09090b] text-white`, so the
whole dialog stayed dark regardless of theme) and App.tsx's editor
Suspense fallback (same dark hex, flashes on every editor load before
the real light UI paints). Both now use the design-tokens.css custom
properties already used everywhere else in the app.

While auditing accent-colored surfaces for the same sweep, found a
separate but related bug: a few primary buttons (`.exportBtn`,
`.bigRecBtn`, `.previewEmptyPrimaryButton`, and VirtualPreview's
icon-button hover state) put white/near-white text directly on the
mint `--accent`/`--brand` background instead of `--accent-on` — the
token design-tokens.css defines specifically for text on that
background. White-on-mint measures under WCAG's contrast minimums in
both themes; switched all four to `--accent-on`, matching the pattern
already used correctly everywhere else (NewEditorShell.module.css's
`.paneTabs button.isActive`, `.btnPrimary`, Modals.tsx, ExportDialog.tsx).

Finally, the default gradient presets: 16 swatches built from four
grays plus the single mint accent, so half the grid paired a gray with
the same green, reading as "we only have one color." Recolored with
the same hue spread already offered in the solid-color tab just below
it (blue, purple, pink, orange, green) with a couple of mint blends so
the brand color still shows up without dominating.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ressed

Ran /code-review (medium effort, 8 finder angles + verification) against
bb6452c while waiting out CodeRabbit's rate limit. Two findings were the
migration itself introducing bugs, and two more were the same white-on-mint
class of bug the previous commit fixed, just in files it didn't touch:

- ShortcutsConfigDialog's "Swap" button (shown on a keybinding conflict) had
  its hover and resting background collapsed onto the same `--warn-soft`
  token — the pre-migration code used two distinct amber opacities (20%/30%)
  to give it a hover state, and the conflict banner's border/fill did the
  same thing (10%/20%), leaving the border invisible against its own fill.
  Gave the border `--warn` (matching the pattern already used two lines up
  in the same file for the binding-chip's conflict state) and the hover a
  `color-mix()` step, the same technique NewEditorShell.module.css already
  uses elsewhere for token-based opacity variants.

- MediaStage.tsx's "Add to Timeline" button read `var(--on-accent, #fff)` —
  a token name that doesn't exist anywhere in design-tokens.css (only
  `--accent-on`, words reversed, is defined) — so it always fell through to
  the `#fff` fallback: white text on the mint accent, always, in both
  themes. LeftPanel.tsx's rewind-confirm button paired the accent background
  with `color: var(--bg)` instead of `--accent-on`, which happens to read
  fine in dark theme (`--bg` is near-black there) but is near-white-on-mint
  in light theme. Both switched to `--accent-on`.

- The Suspense fallback fix in the previous commit (hardcoded dark colors →
  theme tokens) fixed the light-theme flash but introduced the mirror bug:
  `data-theme="dark"` is only ever set by useTheme(), which lives inside the
  same lazily-loaded editor chunk the fallback covers, so a dark-theme user
  now sees a light flash while that chunk downloads. Added the standard
  FOUC-prevention pattern instead — a synchronous inline script in
  index.html's <head> that applies the stored preference before first paint
  — which fixes it for every themed element on first load, not just this one.

- `.bigRecBtn.recording` (EditorShellV4.module.css) inherits its color from
  the base rule, which the previous commit changed from white to
  `--accent-on` (tuned for the mint accent, not the red `--danger` this
  state switches the background to). No code path sets the `recording`
  class today, so this was inert either way, but pinned it to `#fff`
  explicitly so the red recording state doesn't silently inherit a color
  chosen for a different background if that ever changes.

One candidate (a claim that the gradient-editor brightness slider's new
`rounded-full` track exposes the wave-path stroke at its rounded ends in
light mode) didn't survive verification: the stroke sits at the track's
vertical center, and a stadium shape's boundary at its own vertical center
is at full width by construction — the recession is sub-pixel, and the wave
path's own endpoints (~12%/87% of the track width) don't reach that region
regardless.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 078c59a4-ede2-4d65-af18-333a7c1d96c1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EtienneLescot
EtienneLescot merged commit d933d5d into release/v1.10.0 Aug 22, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant