Skip to content

fix(ui): palette contrast + export parity + warn-callout export tint (DSX-P) - #382

Merged
eliotlim merged 5 commits into
mainfrom
fix/dsx-p-palette-audit
Oct 9, 2026
Merged

eliotlim merged 5 commits into
mainfrom
fix/dsx-p-palette-audit

Conversation

@eliotlim

@eliotlim eliotlim commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

Three defects from the design-system audit: warning callouts export with the blue info tint (stored variant warn vs exporter's warning); editor orange/yellow text fails WCAG 4.5:1 in light theme (4.08:1 / 3.92:1); COLOR_EXPORT_HEX drifted from the CSS palette. Board: OB DSX-P (Epic DSX).

Solution

  • toHtml.ts matches stored warn (legacy warning alias kept); dark-scheme legacy exports let marked text inherit page ink (translucent tints made forced-dark text unreadable, 1.4–2.9:1).
  • Orange/yellow lightness-only adjust (L 42→39% / 36→33%); all 18 theme/text pairs now ≥4.5:1, guarded by a programmatic WCAG test (sRGB math, backgrounds parsed from CSS).
  • Export hexes regenerated from CSS with a 54-entry parity test; 8-digit hex preserves tint alpha; legacy opaque tints still paste to tokens (LEGACY_HL).

Before / After

Behavior Before After
Light-theme palette (orange/yellow rows)
Exported warn callout
Highlights in dark-mode legacy export
Paste from pre-change exports colour tokens preserved unchanged (regression-tested incl. legacy hexes + rgb() forms)

Test procedure

  • pnpm --filter @book.dev/ui run test — 2,484 + new suites green; typecheck, lint, stylelint green.
  • Focused: pnpm --filter @book.dev/ui exec vitest run src/export/__tests__/export.test.ts src/export/__tests__/exportReactive.test.ts src/blockeditor/__tests__/colors.test.ts src/blockeditor/__tests__/tablePaste.test.ts

Operational notes

Verify status: ui suite + focused suites green; full verify blocked only by the pre-existing main flake (#381 fixes it) · Reviews cleared: code (Quinn — F1/F2+nit applied pre-endorsed) · design (Devon — CLEAR on rendered captures)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
app.book.pub Ready Ready Preview Oct 8, 2026 11:38am UTC

Request Review

@eliotlim
eliotlim enabled auto-merge (squash) October 9, 2026 11:47
@eliotlim
eliotlim disabled auto-merge October 9, 2026 11:47
@eliotlim
eliotlim merged commit b3c4219 into main Oct 9, 2026
13 checks passed

This branch was successfully deployed

1 active deployment
Preview — d57cd4c5 Deployed Oct 8, 2026 by vercel[bot]
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