Skip to content

refactor(ui): pixel-identical DRY extractions (#4 #5 #6 #9)#101

Merged
miquelmatoses merged 1 commit into
mainfrom
refactor/design-extractions
Jun 22, 2026
Merged

refactor(ui): pixel-identical DRY extractions (#4 #5 #6 #9)#101
miquelmatoses merged 1 commit into
mainfrom
refactor/design-extractions

Conversation

@miquelmatoses

Copy link
Copy Markdown
Collaborator

Second PR of the Phase 18 consolidation program. All changes are pixel-identical extractions/renames; no visual change intended.

Changes

Findings surfaced

  • --mm-font-heading (used only in admin) is defined nowhere in mm-design or this repo, so it was not merged with --mm-font-display. Flagged for the admin migration PR.
  • #00297a has no mm-design token; per the program it now lives in ONE design-layer constant. #1a3a6b (BlogArticlePage notice text) is a different element family and was left untouched.

Gates

  • npm test -- --run: 248 passed
  • npm run build: green

🤖 Generated with Claude Code

…; rename local RoleCard

Pixel-identical DRY extractions (audit items #4, #5, #6, #9):

- #4 MethodologyNote: the report disclaimer footnote (bg-gray-100 rounded
  px-5 py-4 text-xs leading-relaxed) was duplicated verbatim in four report
  pages. Extracted to components/report/MethodologyNote.jsx; call sites render
  class-identical output.
- #5 DisplayHeading: the inline style={{ fontFamily: 'var(--mm-font-display)' }}
  recurred across blog/faq headings. Wrapped in components/ui/DisplayHeading
  (passthrough: same tag via `as`, same className). Covers all 7 occurrences.
  Note: --mm-font-heading (used only in admin) is defined nowhere in mm-design
  or this repo, so it was NOT merged with --mm-font-display.
- #6 gradient: the brand-blue gradient with the tokenless #00297a dark stop is
  now a single constant in src/design/gradients.js, consumed by both sites.
  The #1a3a6b notice-text color is a different element family and was left.
- #9 rename: the local RoleCard in RolesPage is now RoleSummaryCard to stop
  colliding with the shared components/report/RoleCard. Pure rename.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@miquelmatoses miquelmatoses merged commit e6625c3 into main Jun 22, 2026
7 checks passed
@miquelmatoses miquelmatoses deleted the refactor/design-extractions branch June 22, 2026 22:26
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