HomeSection becomes PageSection, since every page needs the same section frame, and gains a flushTop spacing for a block right below a page head. The framed photo next to text from the homepage About block becomes MediaText, and the accent label that four components wrote out by hand becomes Eyebrow, which can also render as a heading. The homepage renders exactly as before: a layout comparison of every element against master at three widths shows no differences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
Code Summary — Unit 1: Shared blocks
Plan: shared-blocks-code-generation-plan.md. Requirements: FR-OM-09, FR-OM-10, NFR-OM-02, NFR-OM-03.
Created
web/src/components/Eyebrow/Eyebrow.tsx— accent label (textStyle="eyebrow",accent.deep,mb={4}),asprop forp/span/h2–h4, otherTextPropspass throughweb/src/components/Eyebrow/Eyebrow.test.tsx— paragraph by default; as h3 a heading that names a region; props pass through; axeweb/src/components/MediaText/MediaText.tsx— framed photo next to a text column (children), stacked belowlg, both columns inRevealweb/src/components/MediaText/MediaText.test.tsx— photo and text shown, photo first in DOM order; axe
Renamed and modified
web/src/components/HomeSection/HomeSection.tsx→web/src/components/PageSection/PageSection.tsx— renamed component/props; newspacing="flushTop"(no top padding, bottom padding as default)HomeSection.test.tsx→PageSection.test.tsx— renamed; new case forflushTop
Modified
components/SectionHeading/SectionHeading.tsx,components/PageIntro/PageIntro.tsx,components/ContactForm/ContactFormGate.tsx,components/home/Testimonials/TestimonialSlide.tsx— inline label replaced byEyebrow(contrast comment now lives inEyebrow)components/home/AboutBlock/AboutBlock.tsx— usesPageSection+MediaTextcomponents/home/{ContactSection,InstagramGrid,IntroGallery,Pricing/Pricing,Testimonials/Testimonials}.tsx— importPageSectionaidlc-docs/_shared/reverse-engineering/*.md— names updated (PageSection,MediaText,Eyebrow);HomeSectiondebt item removed
Verification
- Leftovers: no
HomeSectioninweb/source, tests or comments pnpm check: lint, format, typecheck/build, 55 test files / 250 tests, coverage thresholds, audits — passed. Lighthouse failed in the first run (mobile performance/0.71,/over-mij0.87) because a second production build was running at the same time on the same machine; rerun alone: passed — mobile/0.82 (budget 0.8), other pages 0.94–0.95; desktop 0.99–1; accessibility 1 everywhere- Homepage unchanged: master and branch production builds compared in headless Chrome at 1440, 768 and 390 px (reduced motion, after scrolling through the page): tag, ids,
aria-labelledby, alt, text, position, size and 21 computed styles of every element in<main>— 233/233 elements identical on/, identical on/over-mijand/contact(placeholders withPageIntro). The same comparison of master against itself is also identical, so the method is stable. (Byte-for-byte screenshots were not usable: they already differ between two runs of master, through image loading and timing.)
Extension Compliance
| Rule | Status | Rationale |
|---|---|---|
| SECURITY-10 | Compliant | No new dependencies |
| Other SECURITY rules | N/A | Presentational refactor only |
| PBT-01..10 | N/A | No pure functions or business logic in this unit |