Skip to content

feat!: remove brand-coloured defaults from token vars#1043

Open
lmjabreu wants to merge 3 commits into
mainfrom
chore/remove-brand-defaults
Open

feat!: remove brand-coloured defaults from token vars#1043
lmjabreu wants to merge 3 commits into
mainfrom
chore/remove-brand-defaults

Conversation

@lmjabreu
Copy link
Copy Markdown

@lmjabreu lmjabreu commented May 20, 2026

Closes: no issue (tracked in Reactist colour audit (component-libraries)).

Short description

Reactist's CSS defaults encoded one product brand colour via --reactist-bg-brand (legacy Doist blue, rgb(36, 111, 224)). That token was consumed only by spinner.module.css and progress-bar.module.css and leaked the wrong product brand into Storybook and any unconfigured consumer.

Concretely:

  • Delete --reactist-bg-brand from design-tokens.css.
  • Spinner default: var(--reactist-bg-brand)currentColor.
  • Progress-bar default: var(--reactist-bg-brand)currentColor.

Button Actionable defaults are unchanged in this PR. They continue to default to Twist teals in button.module.css, and consumers like todoist-web continue to override all of them via the reactist-configuration/ bridge pattern. Scoped per the audit's Q5 decision.

Breaking change

--reactist-bg-brand is removed. Consumers relying on it as a fallback for the spinner or progress-bar must set --reactist-spinner-tint and --reactist-progressbar-fill directly, or accept the currentColor default (renders in inherited text colour).

PR Checklist

  • Added tests for bugs / new features. (CSS default values only.)
  • Updated docs (storybooks, readme). (Not applicable.)
  • Reviewed and approved Chromatic visual regression tests in CI. Pending CI run; expected to show no diffs in configured consumers (button surfaces are unchanged), and currentColor-driven diffs for spinner / progress-bar in unconfigured stories.

History

An earlier state of this PR also changed primary button fills and tertiary tints to currentColor. doistbot's review flagged that this caused white-on-white primary buttons in some contexts and changed TextLink's default colour. The audit didn't prescribe those button changes, only the bg-brand removal and the spinner/progress-bar update. This PR is now narrowed to match the audit. See commit 7e05e8a for the revert.

Reactist's CSS defaults encoded product brand colours: --reactist-bg-brand
defaulted to legacy Doist blue (#246fe0), and the button Actionable palette
defaulted to Twist teals (#008aa6 / #006f85). Consumers like todoist-web
already override all of these via the prescribed reactist-configuration/
bridge pattern, but the defaults leaked into Storybook and any unconfigured
consumer.

Changes:
- Delete --reactist-bg-brand from design-tokens.css
- Spinner and progress-bar defaults: var(--reactist-bg-brand) -> currentColor
- Button primary fills (idle/hover/disabled): #008aa6/#007992/#99d0db -> currentColor
- Button tertiary tints (idle/hover/disabled): #006f85/#006f85/#99c5ce -> currentColor

The buttons' secondary, quaternary, and destructive palettes were already
neutral and remain unchanged. The bridge file in todoist-web continues to
override all of these tokens with product-library actionable.* values, so
Todoist appearance is unchanged.

BREAKING CHANGE: --reactist-bg-brand is removed. Consumers relying on it as
a fallback for the spinner or progress-bar must set --reactist-spinner-tint
and --reactist-progressbar-fill directly. Consumers relying on the Twist
teal defaults for primary/tertiary buttons must provide their own values
for the --reactist-actionable-primary-*-fill and
--reactist-actionable-tertiary-*-tint variables.

Refs: Doist/design-system-audits 2026-05-08-reactist-colour-audit.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

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

This PR removes legacy brand-colored default tokens in favor of neutral fallbacks to prevent product-specific styles from leaking into unconfigured environments. This is a valuable cleanup that streamlines the design system's theming configuration for consumers. However, there are a couple of unintended side effects to resolve with the unconfigured fallbacks, specifically the primary button rendering white text on a white background and the shared tertiary tokens inadvertently altering the default color mode for TextLink components.

Share FeedbackReview Logs

Comment thread src/button/button.module.css Outdated
Comment thread src/button/button.module.css Outdated
lmjabreu and others added 2 commits May 21, 2026 10:24
…ches)

doistbot's review flagged two regressions in the previous state:

- Primary button rendered white-on-white in unconfigured contexts.
  The previous commit set primary fills to `currentColor` while keeping
  the on-fill tint hardcoded at `#ffffff`. Where parent text is white,
  both fill and tint resolved to white and the button disappeared.
- Tertiary tints set to `currentColor` cascaded into TextLink and
  changed its default link-colored appearance.

The audit (2026-05-08-reactist-colour-audit.md, Q5) only prescribed
deleting `--reactist-bg-brand` and changing spinner + progress-bar
fills to `currentColor`. It did not prescribe touching button defaults
or moving the actionable palette into design-tokens.css. The bridge
files in todoist-web and twist-web already override the button
defaults; the unconfigured fallback being Twist teal is fine.

This commit reverts:

- button.module.css primary idle/hover/disabled-fill back to the
  original Twist teals (#008aa6, #007992, #99d0db).
- button.module.css tertiary idle/hover/disabled-tint back to the
  original teals (#006f85, #006f85, #99c5ce).
- design-tokens.css additions of the full actionable palette
  (duplicated what's already in button.module.css with different
  cascade behaviour) and the unrelated switches/checkboxes block
  (out of scope).

Kept (audit-prescribed):

- `--reactist-bg-brand` deletion from design-tokens.css.
- spinner.module.css `--reactist-spinner-tint` → `currentColor`.
- progress-bar.module.css `--reactist-progressbar-fill` → `currentColor`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@craigcarlyle craigcarlyle left a comment

Choose a reason for hiding this comment

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

Seems reasonable and won't break anything in todoist-web.

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.

3 participants