refactor(ui): pixel-identical DRY extractions (#4 #5 #6 #9)#101
Merged
Conversation
…; 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>
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.
Second PR of the Phase 18 consolidation program. All changes are pixel-identical extractions/renames; no visual change intended.
Changes
MethodologyNote— extracts the report disclaimer footnote (duplicated verbatim in FullMoon/FirstQuarter/NewMoon/LastQuarter) intocomponents/report/MethodologyNote.jsx.DisplayHeading— wraps the repeatedstyle={{ fontFamily: 'var(--mm-font-display)' }}intocomponents/ui/DisplayHeading.jsx(passthrough: same tag viaas, same className). Applied to all 7 occurrences across blog/faq.#00297adark stop is now a single constant insrc/design/gradients.js, consumed by BlogIndexPage and BlogArticlePage.RoleCardinRolesPagerenamed toRoleSummaryCardto stop colliding with sharedcomponents/report/RoleCard.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.#00297ahas 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 passednpm run build: green🤖 Generated with Claude Code