Records unit 2 of the Soorten fotoshoots page as generated
Adds the functional design and code generation plan of unit 2, its code summary with the verification, the agreements with the parallel features, and updates the shared reverse engineering lines, the state and the audit log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
||||
# Code Generation Plan — Unit 2: Soorten fotoshoots page
|
||||
|
||||
Single source of truth for code generation of this unit. Workspace root: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-soorten-fotoshoots` (worktree); code in `web/`. Branch `feature/soorten-fotoshoots-page`.
|
||||
|
||||
## Unit Context
|
||||
- **Requirements**: FR-SF-01..05 (incl. 04b), FR-SF-08, SEO-SF-01..05, NFR-SF-01, 03..05, 07
|
||||
- **Design**: [application-design.md](../../inception/application-design/application-design.md); functional design in [construction/soorten-fotoshoots-page/functional-design/](../soorten-fotoshoots-page/functional-design/) (BR-SF-01..18)
|
||||
- **Depends on**: unit 1 (`shootTypes`, `MediaText` options, `CallToAction`, `RichParagraph`, `#prijzen`, `areaServed`) — done; `webPage()` from contact-page (see Step 6)
|
||||
- **Behavioural contract for other pages**: none change, except that the sitemap and Lighthouse indexed list gain `/soorten-fotoshoots`
|
||||
|
||||
## Steps
|
||||
|
||||
### Preview image
|
||||
- [x] **Step 1** — 1200×630 crop of the Newborn original (focus on the face) with the unit 1 scratchpad script → `web/public/og-soorten-fotoshoots.jpg`; show it to the user with the alt text before it is fixed (checkpoint, like the shoot crops).
|
||||
|
||||
### Content
|
||||
- [x] **Step 2** — `content/types.ts`: `ShootTypesPageContent` (domain-entities.md).
|
||||
- [x] **Step 3** — `content/shootTypesPageContent.ts`: page head, closing title, lead (`RichText` with "de pakketten" → `/#prijzen`) and booking link.
|
||||
|
||||
### Pure functions
|
||||
- [x] **Step 4** — `lib/shootLinks.ts`: `shootContactLink(shoot, packages)`, `shootPortfolioLink(shoot)`, `isPortfolioLive(pages)` (BR-SF-01..05).
|
||||
- [x] **Step 5** — `lib/shootLinks.test.ts`: examples for the real content (newborn with `?pakket`, loveshoot without, portfolio live/not live) and PBT from business-logic-model.md (`to`/`hash` fixed, `pakket` iff visible package id, no foreign values, portfolio search equals id).
|
||||
|
||||
### SEO
|
||||
- [x] **Step 6** — `webPage()`: contact-page has it done and tested, waiting for its user's approval (generic over `extra`: `webPage<Extra extends object>(type, path, extra?)`). Do **not** build it here: write against the signature and cherry-pick contact-page's commit (seo.ts + seo.test.ts) as soon as the hash arrives; the route and its head test can only be committed after that.
|
||||
- [x] **Step 7** — `seo.ts`: `absoluteUrl(src)` and `shootServices(shoots, site)` (BR-SF-10..15).
|
||||
- [x] **Step 8** — `seo.test.ts`: examples for the real shoot list (5 items, `@id`s with anchors, first paragraph, provider, area, no prices) and PBT (count and positions, distinct `@id`s, provider/area invariants, no e-mail, `absoluteUrl` invariant + idempotency).
|
||||
- [x] **Step 9** — `sitePages.ts`: `/soorten-fotoshoots` `indexed: true`, new description, `ogImage`. `lighthouserc.cjs`: move `/soorten-fotoshoots` to `indexedPaths` (only this entry).
|
||||
|
||||
### Components
|
||||
- [x] **Step 10** — `components/shoots/ShootBlock/ShootBlock.tsx` + test: `article` with anchor id and name, h2, paragraphs, `MediaText` (4:5, frame colour, reverse, priority), contact link with hidden completion, portfolio link only when live, axe.
|
||||
- [x] **Step 11** — `components/shoots/ShootList/ShootList.tsx` + test: order, alternation (`reverse` on 2nd/4th), divider on every block after the first, only the first photo with priority, axe.
|
||||
|
||||
### Route
|
||||
- [x] **Step 12** — `routes/soorten-fotoshoots.tsx`: head (`pageHead` + `structuredDataScript(webPage(...))`) and composition (PageIntro with intro → ShootList → CallToAction with RichParagraph lead and `LinkButton accent`).
|
||||
- [x] **Step 13** — Route tests in `app.test.tsx`: `/soorten-fotoshoots` in the shell; heading outline (h1, 5× h2 shoots, h2 closing); five articles with anchors; contact links incl. `?pakket` targets; no portfolio links while `/portfolio` is noindex; `/#prijzen` link; no `noindex`; the `WebPage` script with 5 services; axe on the whole page.
|
||||
|
||||
### Documentation
|
||||
- [x] **Step 14** — `LAYOUT.md`: "Types of shoots" → Intro, Newborn, Pregnancy, Family, Loveshoot, Portraits, Prices & Book, per `.ai/layout-conventions.md`.
|
||||
- [x] **Step 15** — `_shared/reverse-engineering/`: only this feature's lines (route table, new components `CallToAction`, `shoots/*`, `RichParagraph` location, content `shootTypes`/page content, `serviceArea`, `/soorten-fotoshoots` indexed).
|
||||
|
||||
### Verification and summary
|
||||
- [x] **Step 16** — `pnpm check` (lint, format, tests incl. coverage, build, audits, Lighthouse with `/soorten-fotoshoots` as indexed page), after "claim 4173" to the peers and "4173 free" afterwards.
|
||||
- [x] **Step 17** — Visual check of `/soorten-fotoshoots` against `design/andreaslop-static/soorten-fotoshoots.html` at desktop, tablet and phone widths (puppeteer-core screenshots); anchors `#newborn` and `/#prijzen` land below the header; screenshots sent to the user.
|
||||
- [x] **Step 18** — Write `construction/soorten-fotoshoots-page/code/code-summary.md` (files, preview image, verification, open items for Andrea).
|
||||
- [x] **Step 19** — Commit(s) on `feature/soorten-fotoshoots-page`. Push/deploy to test only when asked; the merge to master waits for Andrea's approval of the Gezin text and the alt texts (BR-SF-17).
|
||||
|
||||
## Extension Compliance (unit 2)
|
||||
| Rule | Status | Rationale |
|
||||
|---|---|---|
|
||||
| SECURITY-04 | Compliant | CSP unchanged; only self-hosted images |
|
||||
| SECURITY-05 | Compliant | Query parameters only from our own package and shoot ids (BR-SF-03, PBT) |
|
||||
| SECURITY-10 | Compliant | No new dependencies |
|
||||
| SECURITY-11 | Compliant | JSON-LD through `jsonLdScript`; no e-mail, no prices (PBT) |
|
||||
| SECURITY-13 | Compliant | No external resources at runtime |
|
||||
| Other SECURITY rules | N/A | No data stores, endpoints, auth or infrastructure |
|
||||
| PBT-01 | Compliant | Properties identified in business-logic-model.md |
|
||||
| PBT-02 | Compliant | `jsonLdScript` round-trip already tested |
|
||||
| PBT-03 | Planned | Link and structured data invariants (Steps 5, 8) |
|
||||
| PBT-04 | Planned | `absoluteUrl` idempotency (Step 8) |
|
||||
| PBT-05, PBT-06 | N/A | No oracle, no stateful logic |
|
||||
| PBT-07 | Compliant | `shootType`/`uniqueShootTypes` from unit 1, existing package and site arbitraries |
|
||||
| PBT-08, PBT-09 | Compliant | Existing seed logging and fast-check setup |
|
||||
| PBT-10 | Planned | Example-based component and route tests alongside PBT |
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Vragen Functional Design — Soorten fotoshoots-pagina (unit 2)
|
||||
|
||||
Al vastgelegd (geen vraag nodig):
|
||||
|
||||
- **Contactlink**: `?pakket=<id>` alleen voor shoots met een bestaand pakket (Newborn, Zwangerschap, Gezin); anders zonder. Voorlopig naar `/#contact` op de homepage, later naar `/contact` (één functie).
|
||||
- **Portfoliolink**: alleen zichtbaar als `/portfolio` geïndexeerd is, en (zodra de helper van portfolio er is) alleen voor shoots met portfoliofoto's.
|
||||
- **Koppen**: elke shoot is een `article` met een h2 (id `shoot-<id>-title`); het afsluitende blok een `section` met een h2.
|
||||
- **Foto's**: alleen de eerste shootfoto laadt meteen (die is op grote schermen direct in beeld); de rest laadt pas als hij in beeld komt.
|
||||
- **Gestructureerde data**: een `Service` per shoot in paginavolgorde, met naam, foto, aanbieder (het bedrijf) en werkgebied; geen prijzen.
|
||||
|
||||
Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe.
|
||||
|
||||
---
|
||||
|
||||
## Vraag 1: Een eigen anker per shoot
|
||||
|
||||
Elke shoot kan een eigen adres krijgen, bijvoorbeeld `/soorten-fotoshoots#newborn`. Dan kun je vanaf elke plek (homepage, Instagram, een mail) direct naar één shoot linken, en zoekmachines kunnen elke `Service` aan zijn eigen plek op de pagina koppelen. Het anker landt net onder de vaste header, zoals `/#contact`.
|
||||
|
||||
- A) Ja: elke shoot krijgt zijn id als anker (`#newborn`, `#zwangerschap`, `#gezin`, `#loveshoot`, `#portret`), en de gestructureerde data verwijst per `Service` naar dat adres. Geen andere pagina's aanpassen in deze feature. (aanbevolen: kost niets, en de ids liggen al vast)
|
||||
- B) Ja, en meteen ook de prijskaarten op de homepage een link "Meer over deze shoot" naar het anker geven
|
||||
- C) Nee, geen ankers per shoot
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Ja, alleen ankers")
|
||||
|
||||
## Vraag 2: De concepttekst van Gezin en de alt-teksten
|
||||
|
||||
De tekst van Gezin is een concept en de vijf alt-teksten zijn door mij geschreven. De pagina wordt bij de merge geïndexeerd (zichtbaar voor Google).
|
||||
|
||||
- A) De pagina gaat met deze teksten naar de testomgeving; Andrea leest ze daar na. De merge naar master (en dus live) wacht op haar akkoord of haar aanpassingen. (aanbevolen: zo ging het ook bij Over mij)
|
||||
- B) Gewoon mergen; aanpassingen van Andrea komen later als losse wijziging
|
||||
- C) Het blok Gezin voorlopig weglaten tot Andrea de tekst heeft goedgekeurd; de rest gaat wel mee
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Merge wacht op Andrea")
|
||||
|
||||
## Vraag 3: Omschrijving per shoot in de gestructureerde data
|
||||
|
||||
Newborn heeft twee alinea's; de tweede is een uitnodiging ("Stuur gerust een berichtje…"), geen omschrijving van de shoot. Bij de andere shoots is er één alinea.
|
||||
|
||||
- A) Alleen de eerste alinea als omschrijving (bij Newborn dus zonder de uitnodiging). Eenvoudig en altijd een echte omschrijving. (aanbevolen)
|
||||
- B) Alle alinea's samengevoegd
|
||||
- C) Een aparte, korte omschrijving per shoot in `shootTypes.ts` (een nieuw veld), los van de tekst op de pagina
|
||||
- X) Anders (beschrijf hieronder na de [Answer]:-tag)
|
||||
|
||||
[Answer]: A (via de chat beantwoord: "Eerste alinea")
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# Functional Design Plan — Unit 2: Soorten fotoshoots page
|
||||
|
||||
Depth: minimal. Scope from the execution plan: the rules for the contact and portfolio links, the structured data (`WebPage` + `ItemList` of `Service`) and their testable properties (PBT-01), the page content model and the component behaviour. Questions: [soorten-fotoshoots-page-fd-questions.md](soorten-fotoshoots-page-fd-questions.md).
|
||||
|
||||
- [x] Collect and analyse the answers in `soorten-fotoshoots-page-fd-questions.md`
|
||||
- [x] `domain-entities.md`: `ShootType` (from unit 1), `ShootTypesPageContent`, link targets, structured data entities (`WebPage`, `ItemList`, `ListItem`, `Service`, provider `@id`, `areaServed`)
|
||||
- [x] `business-rules.md`: contact link rules (package preselect, fallback, switch to `/contact`), portfolio link rules (live check, types with photos), structured data rules (fields, sources, order, exclusions), content and SEO registry rules (indexed, description, preview image, alt texts)
|
||||
- [x] `business-logic-model.md`: how the route turns content and site data into head tags, JSON-LD and the rendered page; the pure functions and their properties for PBT
|
||||
- [x] `frontend-components.md`: component hierarchy, props, heading ids, alternation and dividers, links with accessible names, priority photo, reveal, test ids
|
||||
- [x] Validate against requirements.md, application-design.md and the extension rules
|
||||
Reference in New Issue
Block a user