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>
5.9 KiB
5.9 KiB
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 inweb/src/assets/home/, typed asContentImagewith real width/height, rendered withloading="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 insrc/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:
ContentImageandHomeContent(intro part, extended by later units) incontent/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 checkgreen.
Unit 2 — Over mij
- Section:
components/home/AboutBlock— framed photo, eyebrow "Over mij", h2, three paragraphs, "Lees mijn verhaal" →/over-mij, onpaper.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 checkgreen.
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;validateSearchforpakketon the/route. - Content:
PricingPackagetype,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
pakketvalues are ignored;pnpm checkgreen. (The preselection itself becomes visible in unit 5.)
Unit 4 — Lieve woorden
- Section:
components/home/Testimonials— heading "Lieve woorden", ChakraCarouselwithout autoplay, FramedImage, quotation mark, shoot label,Blockquote, author; prev/next and indicators; live-region status; no controls for one review; onpaper.alt. - Logic:
lib/slideLabel. - Content:
Testimonialtype,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 checkgreen.
Unit 5 — Contact
- Section:
components/home/ContactSection(id="contact", heading, lead) withcomponents/ContactForm/ContactFormGatearoundcomponents/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);
linkButtonrecipe 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 checkgreen.
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 fromsiteContent.socialsin 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 checkgreen.
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.