From da453f6108fe61c15fde4cf57c5350e2397c140e Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Mon, 17 Aug 2026 14:31:28 -0600 Subject: [PATCH] Replace remaining hardcoded hex colors with color tokens (CR-27) Map leftover component hex values onto the existing color scale, and leave third-party share brands and the Avatar white-alpha border documented as intentional exceptions. --- app/(app)/create/screens/review/FinalReviewScreen.tsx | 2 +- app/components/asset/Avatar/Avatar.tsx | 1 + app/components/cards/Step/Step.tsx | 10 +++++----- .../controls/RadioButton/RadioButton.view.tsx | 4 ++-- app/components/layout/Accordion/Accordion.view.tsx | 2 +- app/components/modals/Login/LoginForm.tsx | 8 +------- app/components/modals/Share/Share.view.tsx | 1 + app/components/sections/Accordion/Accordion.view.tsx | 2 +- app/components/sections/Book/Book.view.tsx | 2 +- app/components/sections/Stats/Stats.view.tsx | 8 ++++---- app/components/type/HeaderLockup/HeaderLockup.view.tsx | 2 +- app/components/type/SectionHeader/SectionHeader.tsx | 2 +- tests/unit/Step.test.jsx | 2 +- 13 files changed, 21 insertions(+), 25 deletions(-) diff --git a/app/(app)/create/screens/review/FinalReviewScreen.tsx b/app/(app)/create/screens/review/FinalReviewScreen.tsx index 5689fa9..8a8b3f3 100644 --- a/app/(app)/create/screens/review/FinalReviewScreen.tsx +++ b/app/(app)/create/screens/review/FinalReviewScreen.tsx @@ -270,7 +270,7 @@ export function FinalReviewScreen({ } size={mdUp ? "L" : "M"} expanded={true} - backgroundColor="bg-[#c9fef9]" + backgroundColor="bg-[var(--color-surface-invert-brand-teal)]" logoUrl={getAssetPath(vectorMarkPath("mutual-aid"))} logoAlt={ruleCardTitle} categories={finalReviewCategories} diff --git a/app/components/asset/Avatar/Avatar.tsx b/app/components/asset/Avatar/Avatar.tsx index 6cc65a2..867b83d 100644 --- a/app/components/asset/Avatar/Avatar.tsx +++ b/app/components/asset/Avatar/Avatar.tsx @@ -14,6 +14,7 @@ const Avatar = memo( const size = sizeProp; const sizeStyles: Record = { small: + // White 30% border: no DS token (opacity scale is black-alpha; inverse border tokens don't cover this). "w-[var(--spacing-scale-016)] h-[var(--spacing-scale-016)] border-[1.5px] border-[#FFFFFF4D] border-solid", medium: "w-[var(--spacing-scale-018)] h-[var(--spacing-scale-018)]", large: "w-[var(--spacing-scale-024)] h-[var(--spacing-scale-024)]", diff --git a/app/components/cards/Step/Step.tsx b/app/components/cards/Step/Step.tsx index a25675b..d09245a 100644 --- a/app/components/cards/Step/Step.tsx +++ b/app/components/cards/Step/Step.tsx @@ -29,13 +29,13 @@ const Step = memo(({ number, text, size: sizeProp }) => { const textClasses = { small: - "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[#141414]", + "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[var(--color-gray-900)]", medium: - "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", + "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[var(--color-gray-900)]", large: - "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", + "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[var(--color-gray-900)]", xlarge: - "font-bricolage-grotesque font-medium text-[32px] leading-[32px] text-[#141414]", + "font-bricolage-grotesque font-medium text-[32px] leading-[32px] text-[var(--color-gray-900)]", }; const sectionNumberWrapperClasses = { @@ -92,7 +92,7 @@ const Step = memo(({ number, text, size: sizeProp }) => { {/* Card Content - Responsive positioning */}
-

+

{text}

diff --git a/app/components/controls/RadioButton/RadioButton.view.tsx b/app/components/controls/RadioButton/RadioButton.view.tsx index e3e4368..be69684 100644 --- a/app/components/controls/RadioButton/RadioButton.view.tsx +++ b/app/components/controls/RadioButton/RadioButton.view.tsx @@ -35,11 +35,11 @@ export function RadioButtonView({ id={radioId} > {/* Radio dot - 16px size per Figma */} - {/* Selected hover state: darker dot color (#333000) per Figma */} + {/* Selected hover: --color-surface-default-brand-primary (#333000 / yellow-1000) per Figma */}
-
+
+ {/* Channel circle hexes are third-party brand colors (copy/link, Signal, Slack, Discord), not DS tokens. */}

-
+
{/* eslint-disable-next-line @next/next/no-img-element -- marketing cover art */} {titlePrefix ? ( - + {titlePrefix}{" "} ) : null} {titleEmphasis ? ( - + {titleEmphasis} ) : null} @@ -55,12 +55,12 @@ function StatsView({ <> {" "} - + {suffixLead} {suffixTail ? "\u00a0" : null} {suffixTail ? ( - {suffixTail} + {suffixTail} ) : null} diff --git a/app/components/type/HeaderLockup/HeaderLockup.view.tsx b/app/components/type/HeaderLockup/HeaderLockup.view.tsx index 8a936b1..89cf156 100644 --- a/app/components/type/HeaderLockup/HeaderLockup.view.tsx +++ b/app/components/type/HeaderLockup/HeaderLockup.view.tsx @@ -19,7 +19,7 @@ function HeaderLockupView({ ? "text-[var(--color-content-invert-primary)]" : "text-[var(--color-content-default-primary,white)]"; const descriptionColorClass = isInverse - ? "text-[#2d2d2d]" + ? "text-[var(--color-content-invert-tertiary)]" : "text-[var(--color-content-default-tertiary,#b4b4b4)]"; return ( diff --git a/app/components/type/SectionHeader/SectionHeader.tsx b/app/components/type/SectionHeader/SectionHeader.tsx index bc57b23..f3f72d1 100644 --- a/app/components/type/SectionHeader/SectionHeader.tsx +++ b/app/components/type/SectionHeader/SectionHeader.tsx @@ -111,7 +111,7 @@ const SectionHeader = memo( ? "text-small-paragraph text-[var(--color-content-default-tertiary)] md:text-left md:text-large-paragraph xl:text-x-large-paragraph" : "text-small-paragraph md:text-large-paragraph lg:text-left lg:text-large-paragraph text-[var(--color-content-default-tertiary)] xl:text-x-large-paragraph" : "text-small-paragraph md:text-large-paragraph xl:text-x-large-paragraph text-[var(--color-content-default-tertiary)] lg:text-right" - : "text-large-paragraph lg:text-x-large-paragraph xl:text-xx-large-paragraph xl:text-right text-[#484848] sm:text-[var(--color-content-default-tertiary)] lg:text-[var(--color-content-default-tertiary)] xl:text-[var(--color-content-default-tertiary)]" + : "text-large-paragraph lg:text-x-large-paragraph xl:text-xx-large-paragraph xl:text-right text-[var(--color-gray-600)] sm:text-[var(--color-content-default-tertiary)] lg:text-[var(--color-content-default-tertiary)] xl:text-[var(--color-content-default-tertiary)]" } > {subtitle} diff --git a/tests/unit/Step.test.jsx b/tests/unit/Step.test.jsx index 66993c8..fe33de8 100644 --- a/tests/unit/Step.test.jsx +++ b/tests/unit/Step.test.jsx @@ -150,7 +150,7 @@ describe("Step Component", () => { render(); const textElement = screen.getByText("Test Card Text"); - expect(textElement).toHaveClass("text-[#141414]"); + expect(textElement).toHaveClass("text-[var(--color-gray-900)]"); }); it("handles long text content gracefully", () => {