Repository navigation
Description
Problem
A frontend UX audit (branch frontend-ux-audit-improvements) began a design-token consolidation but only finished part of it. The completed work added tokens to src/diagram/theme.css (--color-surface #fff, --color-border #ddd, --color-field-bg #f5f5f5, --shadow-sm/md/lg matching the three repeated MUI elevation triplets, --panel-top-inset, and the filled-in --spacing-4..-9 scale) and adopted them in the editor chrome (search bar; zoom/undo/snapshot cards; the three detail-panel cards) plus Button (contained), SpeedDial, Snackbar, Paper, and Card.
The audit rated the full sweep "large" and the remainder is untracked:
-
Hardcoded colors not yet on tokens. ~a dozen components still hardcode
#fffbackgrounds, grey text (#666/#888/#999/#aaa/#333/#777), and dividers (#ddd/#eee/#ccc) instead of thetheme.csstokens. -
Missing elevation-shadow tokens for the distinct MUI elevations.
AppBar,Menu,Dialog, andDraweruse DISTINCT MUI elevation shadows (elevation 4/8/16/24) that have no token yet. Add--shadow-4/--shadow-8/etc. (or a renamed equivalent) and adopt them. (Note:--shadow-sm/md/lgfrom the done work only cover the three repeated elevation triplets, not these four distinct levels.) -
Raw-px text sizing inconsistent with the rem-based typography system. Editor chrome and detail panels size text in raw px (11/12/13/14/16px in
Editor.module.cssandModuleDetails.module.css), so it does not honor user zoom. Add acaptiontypography variant (0.75rem) and convert these raw-px sizes to rem so they scale with user zoom. -
.toolbarSpacerhardcoded height coupled to the dense Toolbar.src/app/Home.module.css.toolbarSpaceris a hardcoded48pxcoupled to the denseToolbarheight. It should derive from a shared--toolbar-dense-heighttoken (or render an actual spacerToolbar) so the two cannot drift apart.
Why it matters
Consistency and maintainability. Hardcoded literals scattered across components defeat the purpose of the token system, make global theme changes (and any future dark-mode work) error-prone, and let coupled values (like the toolbar spacer vs. dense toolbar height) silently drift. Raw-px text ignores user zoom, hurting accessibility. This is tech-debt / consistency cleanup, NOT a user-facing bug.
Components affected
src/diagram/theme.css(new elevation-shadow tokens, newcaptiontypography variant)src/diagram/components/*.module.css(the ~dozen components still hardcoding colors/dividers;AppBar,Menu,Dialog,Drawerfor shadows)src/diagram/.../Editor.module.css,ModuleDetails.module.css(raw-px -> rem)src/app/Home.module.css(.toolbarSpacer-> shared dense-toolbar-height token)
Relationship to #709
Partially overlaps #709 (component-library CSS modules hardcode light colors with no dark-mode overrides) on the hardcoded-color sweep over src/diagram/components/*.module.css. #709 is framed as dark-mode parity (adopt the dark-aware tokens so dark mode stops rendering white boxes); this item is the broader audit remainder and additionally covers the elevation-shadow tokens, the px->rem typography conversion + caption variant, and the src/app toolbar-spacer coupling -- none of which #709 mentions. The color-sweep portions should be coordinated so they are done once.
How discovered
Identified during the frontend UX audit (frontend-ux-audit-improvements branch); the audit completed the token additions and editor-chrome/core-component adoption but rated the full sweep "large" and deferred the remainder enumerated above.
Activity
tests: remove implementation-asserting tests repo-wide (#1012)