Files
AndreaSlopFotografie/aidlc-docs/features/contact-page/inception/reverse-engineering/contact-page-delta.md
T
SluijsensandClaude Opus 5.5 4c257b7ac0 Plans the Contact page and records unit 1 as generated
Workspace detection, a reverse engineering delta, requirements with the
approved layout mockups, the execution plan and the application design
for the Contact page, plus the code generation plan and summary of the
webPage helper. Corrects the contact payload in the shared API notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:59:38 +01:00

3.8 KiB

Reverse Engineering Delta — contact-page

Date: 2026-10-24T19:55:00Z Base: aidlc-docs/_shared/reverse-engineering/ (content current up to ae769cb on feature/over-mij-page; the timestamp file still names 99d4610, but code-structure, component-inventory, architecture and api-documentation already describe the over-mij shared blocks) Why a delta instead of a shared refresh: three features (portfolio-page, soorten-fotoshoots-page, contact-page) are stacked on the unmerged over-mij-page branch. By agreement each feature only records what concerns its own area, so the shared artifacts do not become a merge hotspot. Shared change made: one factual correction in api-documentation.md (contact payload).

Current state of /contact

  • web/src/routes/contact.tsx — placeholder: PageIntro ("Neem contact op" / "Contact" / "Deze pagina is nog in de maak"), pageHead('/contact')
  • web/src/sitePages.ts — /contact: title "Contact", description present, indexed: false
  • web/lighthouserc.cjs — /contact in noindexPaths (guarded by a test against sitePages)

Design reference (design/andreaslop-static/contact.html)

graph TD
    Head["page-head: eyebrow 'Neem contact op', h1 'Contact', intro (reply within 2-3 werkdagen)"]
    Layout["section--flush-top: contact-layout (two columns)"]
    Media["contact-layout__media: photo contact.jpg + contact-details (E-mail, Instagram, Facebook as h3 + link)"]
    Form["form: naam, e-mail, onderwerp (text), bericht, status, 'Verzenden'"]
    Head --> Layout
    Layout --> Media
    Layout --> Form
    classDef head fill:#f6e05e,stroke:#c05621,stroke-width:1px,color:#000;
    classDef block fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000;
    classDef part fill:#63b3ed,stroke:#2b6cb0,stroke-width:1px,color:#000;
    class Head head;
    class Layout block;
    class Media,Form part;

Text alternative: the design page is a page head followed by one flush-top section with two columns: a photo with contact details on one side and the contact form on the other.

Reusable code that already exists

  • Page structure: PageIntro (eyebrow, h1, intro), PageSection (spacing="flushTop", aria-labelledby), MediaText/FramedImage (photo next to a column), Eyebrow, SectionHeading, Reveal, DeferredImage
  • Form: ContactForm (idPrefix for multiple pages; fields naam, e-mail, shoot select, bericht; honeypot + time check; focus handling; sent/failed states), ContactFormGate (inert + "Binnenkort" notice with mailto while siteContent.contactForm.enabled is false), lazy-loading and placeholder height in home/ContactSection
  • Logic (pure, PBT-tested): contactFormReducer, validateContact/validateField, isLikelySpam, toContactPayload, shootOptions, mailSubject/mailtoLink, emailAddress (assembled in the browser, never in the bundle), visibleSocials
  • Content: siteContent.email, siteContent.socials, siteContent.contactForm.enabled; packages (for the shoot options)
  • SEO: pageHead, structuredDataScript, jsonLdScript, aboutPage/person/professionalService with stable @ids (businessId); no ContactPage helper yet

Differences between design and code to resolve in Requirements

  • Design form has a free-text Onderwerp field; the code (homepage) uses a shoot select (shoot) and the payload { naam, email, shoot, bericht }
  • Design intro says reply within 2-3 werkdagen; ContactForm's thank-you says 1-2 werkdagen
  • Design submit label "Verzenden"; code "(Aan)vraag versturen"
  • Design shows contact details (e-mail, Instagram, Facebook) under the photo; no such component exists (Footer and Hero render socials in their own way)
  • contact.jpg from the design is not yet in web/src/assets
  • Form stays gated (contactForm.enabled: false) until the API exists; the page must work with the gate (mailto fallback)