From b6cf980d2391ad6a0a031345a6c8bce13a9f625c Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Tue, 18 Aug 2026 20:46:28 -0600 Subject: [PATCH] Keep process-card numerals upright and match Display type and section gaps. Rotate only the numbered shapes, use 24/32 and 32/1.1 card copy, and tighten the header-to-CTA stack. Co-authored-by: Cursor --- app/components/cards/Step/Step.tsx | 8 ++++---- .../sections/CardSteps/CardSteps.view.tsx | 2 +- app/components/sections/SectionNumber.tsx | 6 +++--- tests/components/SectionNumber.test.tsx | 19 +++++++++++++++++++ tests/unit/Step.test.jsx | 13 +++++-------- 5 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 tests/components/SectionNumber.test.tsx diff --git a/app/components/cards/Step/Step.tsx b/app/components/cards/Step/Step.tsx index d09245a..a824efd 100644 --- a/app/components/cards/Step/Step.tsx +++ b/app/components/cards/Step/Step.tsx @@ -31,11 +31,11 @@ const Step = memo(({ number, text, size: sizeProp }) => { small: "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-[var(--color-gray-900)]", + "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[var(--color-gray-900)]", large: - "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[var(--color-gray-900)]", + "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[var(--color-gray-900)]", xlarge: - "font-bricolage-grotesque font-medium text-[32px] leading-[32px] text-[var(--color-gray-900)]", + "font-bricolage-grotesque font-medium text-[32px] leading-[1.1] text-[var(--color-gray-900)] [font-variation-settings:'opsz'_14,'wdth'_100]", }; const sectionNumberWrapperClasses = { @@ -92,7 +92,7 @@ const Step = memo(({ number, text, size: sizeProp }) => { {/* Card Content - Responsive positioning */}
-

+

{text}

diff --git a/app/components/sections/CardSteps/CardSteps.view.tsx b/app/components/sections/CardSteps/CardSteps.view.tsx index 5699a52..59a4588 100644 --- a/app/components/sections/CardSteps/CardSteps.view.tsx +++ b/app/components/sections/CardSteps/CardSteps.view.tsx @@ -24,7 +24,7 @@ function CardStepsView({ />
-
+
(({ number }) => { }; return ( -
+
{/* eslint-disable-next-line @next/next/no-img-element -- dynamic src from getImageSrc */} {`Section
- + {number}
diff --git a/tests/components/SectionNumber.test.tsx b/tests/components/SectionNumber.test.tsx new file mode 100644 index 0000000..7e61f71 --- /dev/null +++ b/tests/components/SectionNumber.test.tsx @@ -0,0 +1,19 @@ +import { render, screen } from "@testing-library/react"; +import { describe, it, expect } from "vitest"; +import "@testing-library/jest-dom/vitest"; +import SectionNumber from "../../app/components/sections/SectionNumber"; + +describe("SectionNumber", () => { + it("rotates the shape and keeps the numeral upright", () => { + render(); + + const numeral = screen.getByText("1"); + expect(numeral).toHaveClass("text-large-label"); + expect(numeral.className).not.toMatch(/rotate/); + + const shape = screen.getByAltText("Section 1"); + expect(shape).toHaveClass("rotate-15"); + expect(shape.parentElement).not.toHaveClass("rotate-15"); + expect(shape.parentElement?.className).not.toMatch(/-rotate-/); + }); +}); diff --git a/tests/unit/Step.test.jsx b/tests/unit/Step.test.jsx index fe33de8..2c4ddb3 100644 --- a/tests/unit/Step.test.jsx +++ b/tests/unit/Step.test.jsx @@ -137,12 +137,9 @@ describe("Step Component", () => { const textElement = screen.getByText("Test Card Text"); expect(textElement).toHaveClass( "text-[24px]", - "sm:text-[24px]", - "sm:leading-[24px]", - "lg:text-[24px]", - "lg:leading-[24px]", + "leading-[32px]", "xl:text-[32px]", - "xl:leading-[32px]", + "xl:leading-[1.1]", ); }); @@ -234,7 +231,7 @@ describe("Step Component", () => { ); const textElement = screen.getByText("Test Card Text"); - expect(textElement).toHaveClass("text-[24px]", "leading-[24px]"); + expect(textElement).toHaveClass("text-[24px]", "leading-[32px]"); }); it("applies Large size variant correctly", () => { @@ -254,7 +251,7 @@ describe("Step Component", () => { ); const textElement = screen.getByText("Test Card Text"); - expect(textElement).toHaveClass("text-[24px]", "leading-[24px]"); + expect(textElement).toHaveClass("text-[24px]", "leading-[32px]"); }); it("applies XLarge size variant correctly", () => { @@ -274,6 +271,6 @@ describe("Step Component", () => { ); const textElement = screen.getByText("Test Card Text"); - expect(textElement).toHaveClass("text-[32px]", "leading-[32px]"); + expect(textElement).toHaveClass("text-[32px]", "leading-[1.1]"); }); });