Files
SluijsensandClaude Sonnet 5.5 7a5e713b69
Continuous Integration / check (pull_request) Successful in 1m45s
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 8m44s
Continuous Integration / deploy-production (pull_request) Skipped
Adds the AI-DLC documents of the testimonials redesign
Requirements, execution plan, functional design, code summaries, build and test results and the audit log; the reverse-engineering notes and the feature registry are updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 01:24:15 +01:00

5.3 KiB

Code Generation Plan: section-heading (unit 1)

This plan is the single source of truth for Code Generation of this unit. Application code goes in web/ of the worktree K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-testimonials-redesign; only the summary (Step 6) goes under aidlc-docs/.

Unit context

  • Goal: SectionHeading shows its title in uppercase with wide letter-spacing, as in the approved canvas (FR-TR-05). It applies to all eight places that use SectionHeading (AboutBlock, ContactSection, IntroGallery, Pricing, Testimonials, InstagramGrid, AboutIntro, ShootPage) without changing those callers.
  • Dependencies: none. Unit 2 (testimonials) comes after it and uses the same heading.
  • Stories: none (User Stories skipped). Traceability is to requirements: FR-TR-05, assumptions A1 and A2, NFR-TR-01.
  • Functional Design: skipped for this unit (a style change without logic). PBT-01 is N/A: there is no logic to give properties.
  • Existing files to modify (brownfield, in place, no copies): web/src/theme.ts, web/src/components/SectionHeading/SectionHeading.tsx, web/src/components/SectionHeading/SectionHeading.test.tsx.
  • New files: the code summary under aidlc-docs/features/testimonials-redesign/construction/section-heading/code/.

Design of the change

Item Decision
New text style sectionHeading in theme.ts: heading font, textTransform: uppercase, letterSpacing: caps (the existing token, 0.22em), line-height 1.15, size 26 px on phones (base) and 30 px from md.
Old text style sectionTitle stays as it is: five other h2 elements use it directly (CallToAction, PackageBlock, ShootBlock, ShootPage twice, StoryBlocks), and they keep their style (assumption A1). Its comment is corrected, because it no longer belongs to SectionHeading.
SectionHeading The Heading uses textStyle="sectionHeading". No new props, no change to alignment, spacing, eyebrow or lead. The text in the DOM does not change (the case is only CSS), so accessible names and every existing test that looks for the title text keep working.
Size on phones The canvas used 26 px on the phone artboard and 30 px on desktop; FR-TR-05 only says 30 px. This plan follows the canvas: 26 px below md. Requirements are updated to say so (Step 5).
Wrapping Uppercase and letter-spacing make titles wider. The longest title is "Lifestyle fotograaf met een passie voor storytelling" (52 characters, AboutBlock, maximum width 620 px). By my estimate it takes about three lines on desktop and four on a phone. That is checked in Build and Test (assumption A2); this unit does not shorten any text.

Steps

  • Step 1: Theme. In web/src/theme.ts add the text style sectionHeading next to sectionTitle and correct the comment of sectionTitle (no longer used by SectionHeading; still used by the five direct h2 elements).
  • Step 2: Component. In web/src/components/SectionHeading/SectionHeading.tsx switch the Heading to textStyle="sectionHeading" and update the component comment (design reference: uppercase, letter-spaced title).
  • Step 3: Unit tests. In SectionHeading.test.tsx add example tests (PBT-10: not a property case, there is no logic):
    • the h2 keeps its text exactly as given (the accessible name is not uppercased in the DOM), also for a long title;
    • the generated CSS rules for the h2 contain text-transform: uppercase and the wide letter-spacing (using cssRulesFor, since jsdom does not compute responsive styles);
    • the five direct sectionTitle headings do not get the new style (a render of CallToAction or PackageBlock checks that its h2 has no text-transform: uppercase).
  • Step 4: Callers. Search the other tests and the e2e tests for assumptions about the old heading style (sectionTitle, letter-spacing, text case); adjust only if one fails.
  • Step 5: Requirements note. In requirements.md change FR-TR-05 to "30 px from md, 26 px below" and mark A2 with the estimate of the longest title.
  • Step 6: Code summary. Write aidlc-docs/features/testimonials-redesign/construction/section-heading/code/code-summary.md (files changed, the decision, extension compliance).
  • Step 7: Build and test this unit (Step 13.5). In web/: pnpm exec tsc --noEmit (or the project's type check), lint, and the unit tests of SectionHeading and of every component that uses it; then the whole unit-test run (pnpm test) once. Fix failures inside this stage. The prerender build, the e2e tests and Lighthouse are part of the phase-level Build and Test.
  • Step 8: Progress. Update aidlc-state.md, check the plan checkboxes and set active-features.md to 🟢 Construction.

Extension compliance for this unit

  • Security Baseline: SECURITY-04 (CSP) compliant by design: a theme text style produces a CSS class, no inline style, no new header. SECURITY-10 N/A: no dependency changes. All other rules N/A (front-end style change).
  • Property-Based Testing: PBT-01..09 N/A (no logic, no pure function added). PBT-10: example tests only, because there are no properties to check; the existing property tests of other units are not touched.

Scope and size

One theme entry, one component line, three small test cases, one summary and one requirements line. No new dependencies.