refactor: colour system cleanup — container recipe + palette semantics - #12574
Open
Healsi wants to merge 12 commits into
Open
refactor: colour system cleanup — container recipe + palette semantics#12574Healsi wants to merge 12 commits into
Healsi wants to merge 12 commits into
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
|
@Healsi Sorry I couldn't give it a more thorough look but here's a quick review I did with Claude. Please skim through, it may be rubbish: Review complete. Checked remap classes for both themes and searched the post-PR tree for leftovers. The mechanical changes are mostly clean, but a visual issue exists in dark mode: text that was colored now appears white (~30 sites affected). This is because onContainer defaults to #EEEEFC, which overrides old color tokens used by alerts and badges. Must fix / acknowledge:
Verified clean (value-by-value):
Notes:
|
Contributor
Author
Replace secondary.light/border usages with primary.container/containerBorder across components and align theme definitions as part of the color cleanup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…trastText semantics Give success/warning/error/info a container/containerBorder/onContainer recipe (= the old light/border/contrastText tint values) and migrate every consumer onto it, mirroring the primary-container migration. With those slots freed, repoint .light to one ramp step lighter than main and .contrastText to a true contrast against main (grey[50]), restoring their proper MUI meaning. Visual no-op: new slots equal the old values in both light and dark themes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Badge container migration flipped <Badge color='primary'> from bright primary.light to pale primary.container. The Connect SDK stepper's active step was the only pre-existing primary badge, so it lost its saturated CTA look. Give it a dedicated StyledActiveBadge (primary.main + white), mirroring the existing StyledCompletedBadge, and split the render into explicit completed/active/inactive states. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Give neutral the same container/containerBorder/onContainer recipe as the alert palettes (= the old light/border/contrastText values) and migrate every consumer onto it. Repoint .light to one step lighter than main (grey[600]) and .contrastText to grey[50], restoring their proper MUI meaning. Visual no-op: new slots equal the old values in both light and dark themes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The interactive demo guide's spotlight used a standalone hardcoded color set. Point its highlight border/outline and beacon pulse at primary.main/light/main and drop the now-unused spotlight palette from both themes and themeTypes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
background.default duplicated background.paper (identical value in both themes). Point every consumer at paper so default is reserved for its MUI role (the page background behind paper surfaces). Visual no-op. Also reorder the background keys and mark alternative as deprecated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove per-token comments that just repeat what the name or MUI convention already conveys (contrastText "contrast against main", "container fill", "one step lighter than main", etc.). Keep only the non-obvious notes: the container-recipe provenance, secondary being dormant, dark used as text, web = sales, and the application/alternative usage notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pplication background.default duplicated paper (white); the real page canvas lived in a custom background.application key. Point default at the canvas value (grey[300] / #1A1924) per MUI convention (default = page background, paper = surface) and migrate every application usage to default. Visual no-op for content surfaces; the <body>/canvas is now the canvas color instead of white. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
info/success/warning/error/neutral used .dark as a text color, which conflicts with MUI's meaning of dark (a darker shade of main). Point those text usages at .onContainer (identical value, semantically "text on the container surface") and drop the stale "used for text" comments. Widen StyledReviewTitle's color prop to optional since onContainer is optionally typed. Visual no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l panel action.alternative was a solid brand purple (not an interactive-state color) used in exactly one place: the dark-theme gradient of GoalSummaryPanel. Point that at background.alternative (solid, since both stops were the same) and remove the key from both themes plus its CustomTypeAction augmentation, leaving action as a clean MUI-contract palette. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Turn the dormant secondary palette into the "fjord" teal, following the same recipe as primary and the semantic palettes (main + light/dark + tinted container). Migrate the two primary-button hover styles that only borrowed secondary.light as a pale-purple tint over to primary.container, and point the child-dependency badge at the primary palette. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Now that every palette a dynamic color key can resolve to defines the full container recipe, the `?? light` / `?? contrastText` / `?? border` fallbacks in Badge, EventTimelineEventCircle, IntroUserGrid and IntroShowcase are dead code. Collapse them to the direct token and remove the now-unused optional `border` field from the palette type. Banner's cross-palette default fallback is left intact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Healsi
force-pushed
the
ds-color-cleanup
branch
from
September 4, 2026 09:20
5cfc889 to
ba138c2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The main purpose of this PR is to make it easier for designers, engineers and agents to know which color to use where. It fixes inconsistencies with the colors and makes them them easier to maintain while being somewhat consistent with MUI.
The problem we're solving
I've found the existing color system confusing to use, and I've noticed that people have a hard time knowing which color to use where, and that a bunch of colors being used out of their intended usage.
This is not ideal because colors ends up being used for other purposes, and it makes the design system hard to use and maintain.
What's done?
Nothing changes visually in this PR. It cleans up the theme color system so that semantic palettes follows the MUI contract and share one consistent recipe for main, text, and surface/container backgrounds, then remaps every usage to match. No logic, data-flow, or behavioral changes. purely styling and variable remapping.
Theme changes
container/containerBorder/onContainer) toprimary+info/success/warning/error/neutralfor tinted surfaces (badges, chips, soft banners, alerts)..light(now a mid-shade ofmain, was a pale tint) and.contrastText(now text-on-main, was text-on-tint)..border→containerBorder,background.application→background.default,action.alternativeis removed, andpalette.spotlightis removed.background.defaultas the app canvas;background.paperis the surface.secondarydormant (all usages migrated toprimary). This slot will be repurposed for a secondary color later.Usage remaps
container ?? light,onContainer ?? contrastText,containerBorder ?? border) keep the dormantsecondarypalette rendering correctly.Important files
frontend/src/themes/theme.ts,dark-theme.ts,themeTypes.ts— the source of the change.Screenshots: