Files
SluijsensandClaude Opus 5.5 c81dcd3979 Adds the inception docs and design for the homepage sections
Refreshes the shared reverse engineering docs, adds the requirements,
application design and units for the homepage-sections feature, and
updates the static design: live prices and form fields, the new
Lieve woorden block and the coming-soon gate over the contact form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:46:30 +02:00

5.9 KiB
Raw Permalink Blame History

Units of Work — homepage-sections

Six units, one per homepage block (user request), built in order on one branch, feature/homepage-sections, and delivered in one pull request at the end (units Q1 = A). After each unit's Code Generation the full pnpm check runs, Lighthouse included (units Q2 = A). Each unit adds its section to routes/index.tsx, so the homepage is complete up to that unit and never broken in between.

All units are modules inside the single deployable web/ SPA (no separate services).

Common conventions (apply to every unit)

  • Images: downloaded from andreaslop.nl (source URLs in design/andreaslop-static/assets/img/manifest.txt), resized once to at most ±1600 px on the long side and compressed, stored in web/src/assets/home/, typed as ContentImage with real width/height, rendered with loading="lazy". The resize tool is picked in unit 1's code plan; it must not become a project dependency.
  • Tests: example-based component test with axe per section; property-based tests for every new lib/ helper (PBT extension, full); shared generators in src/test/arbitraries.ts.
  • Code comments in English; visitor-facing text in Dutch (NFR-HP-02).
  • Design reference: design/andreaslop-static/index.html + style.css (updated in Application Design).

Unit 1 — Lifestyle fotografie

  • Section: components/home/IntroGallery — heading "Lifestyle fotografie", lead, four photos in the staggered grid (4 / 2 / 1 columns), hover zoom.
  • Shared pieces introduced: components/HomeSection, components/SectionHeading, components/Reveal + hooks/useReveal.ts.
  • Content: ContentImage and HomeContent (intro part, extended by later units) in content/types.ts; content/homeContent.ts.
  • Images: intro-1 … intro-4 (live photos).
  • Functional Design: skipped (presentational).
  • Done when: section renders below the hero with correct heading structure; reveal works and is off under reduced motion; pnpm check green.

Unit 2 — Over mij

  • Section: components/home/AboutBlock — framed photo, eyebrow "Over mij", h2, three paragraphs, "Lees mijn verhaal" → /over-mij, on paper.alt.
  • Shared pieces introduced: components/FramedImage (sand offset block).
  • Content: HomeContent.about.
  • Images: andrea-home (live).
  • Functional Design: skipped (presentational).
  • Done when: section renders after Lifestyle fotografie; link works; offset block hidden on small screens; pnpm check green.

Unit 3 — Prijzen

  • Section: components/home/Pricing + PriceCard — heading "Prijzen", lead "Pakketten", decorations, three cards, "Boek je shoot" → /?pakket=<id>#contact.
  • Logic: lib/formatPrice, lib/packageFromSearch; validateSearch for pakket on the / route.
  • Content: PricingPackage type, content/packages.ts (Zwangerschap, Newborn, Gezin), HomeContent.pricing.
  • Images: deco-1.png, deco-2.png (design decorations).
  • Functional Design: executed — package/price rules, search param handling, properties for PBT-01.
  • Done when: cards match the live content; the link carries the package; unknown pakket values are ignored; pnpm check green. (The preselection itself becomes visible in unit 5.)

Unit 4 — Lieve woorden

  • Section: components/home/Testimonials — heading "Lieve woorden", Chakra Carousel without autoplay, FramedImage, quotation mark, shoot label, Blockquote, author; prev/next and indicators; live-region status; no controls for one review; on paper.alt.
  • Logic: lib/slideLabel.
  • Content: Testimonial type, content/testimonials.ts (Trouwshoot – Majella & Mark, Newbornshoot – Demi & Kevin), HomeContent.testimonials.
  • Images: the two live review photos.
  • Functional Design: executed — carousel behaviour, announcements, edge cases (0 / 1 / many reviews), properties for PBT-01.
  • Done when: keyboard, swipe and indicator navigation work and are announced; axe clean; pnpm check green.

Unit 5 — Contact

  • Section: components/home/ContactSection (id="contact", heading, lead) with components/ContactForm/ContactFormGate around components/ContactForm/ContactForm.
  • Logic: lib/shootOptions, lib/validateContact, lib/toContactPayload, lib/isLikelySpam; contact/types.ts, contact/submitContactForm.ts (adapter, rejects generically today).
  • Content: siteContent.contactForm = { enabled: false }, HomeContent.contact.
  • Theme: field styling (square inputs, select chevron, error colour with sufficient contrast); linkButton recipe on a <button>.
  • Functional Design: executed — validation rules and messages, limits, spam rules, gate behaviour (on/off, invalid e-mail), submit states, preselection from unit 3, properties for PBT-01.
  • Done when: gate shows the coming-soon notice with mail button and the form is inert; with enabled: true (in tests) validation, spam filter and submit states work; preselection from "Boek je shoot" works; pnpm check green.

Unit 6 — Instagram

  • Section: components/home/InstagramGrid — heading "Instagram", handle link, six square tiles (6 / 3 / 2 columns) linking to the profile in a new tab.
  • Content: HomeContent.instagram (title, handle, six photos); profile URL derived from siteContent.socials in the route.
  • Images: six existing site photos, reusing already-bundled assets where possible (Andrea can swap them).
  • Functional Design: skipped (presentational).
  • Done when: section renders last; hidden without a valid Instagram URL; external link attributes and screen reader hint present; pnpm check green.

After the units

Build and Test for the whole homepage (section order, Prijzen → Contact across sections, Lighthouse on the complete page), then one PR from feature/homepage-sections to master. The Operations decision is asked again there.