From ad85e3fe5b3d23f6490ab316d36e7bac9d79eefb Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 25 Oct 2026 18:26:48 +0100 Subject: [PATCH] Records unit 2 of the Contact page as generated Functional design, code generation plan and summary of the shared contact blocks, plus the coordination with the parallel features. Co-Authored-By: Claude Opus 5.5 --- .../features/contact-page/aidlc-state.md | 6 +- aidlc-docs/features/contact-page/audit.md | 228 ++++++++++++++++++ ...red-contact-blocks-code-generation-plan.md | 31 +++ .../shared-contact-blocks-fd-questions.md | 52 ++++ ...d-contact-blocks-functional-design-plan.md | 10 + .../code/code-summary.md | 39 +++ .../functional-design/business-logic-model.md | 69 ++++++ .../functional-design/business-rules.md | 71 ++++++ .../functional-design/domain-entities.md | 55 +++++ .../functional-design/frontend-components.md | 63 +++++ 10 files changed, 621 insertions(+), 3 deletions(-) create mode 100644 aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-code-generation-plan.md create mode 100644 aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-fd-questions.md create mode 100644 aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-functional-design-plan.md create mode 100644 aidlc-docs/features/contact-page/construction/shared-contact-blocks/code/code-summary.md create mode 100644 aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-logic-model.md create mode 100644 aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-rules.md create mode 100644 aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/domain-entities.md create mode 100644 aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/frontend-components.md diff --git a/aidlc-docs/features/contact-page/aidlc-state.md b/aidlc-docs/features/contact-page/aidlc-state.md index 12f4f29..a37fc3c 100644 --- a/aidlc-docs/features/contact-page/aidlc-state.md +++ b/aidlc-docs/features/contact-page/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: contact-page - **Project Type**: Brownfield - **Start Date**: 2026-10-24T19:35:48Z -- **Current Stage**: CONSTRUCTION - Functional Design (Unit 2 Shared contact blocks) +- **Current Stage**: CONSTRUCTION - Functional Design (Unit 3 Contact page) - **Branch**: feature/contact-page (rebased onto master 11a5224 after over-mij-page merge) ## Workspace State @@ -55,11 +55,11 @@ - [x] Units Generation - SKIP ### ๐ŸŸข CONSTRUCTION PHASE -- [ ] Functional Design - EXECUTE (units 2, 3) / SKIP (unit 1) +- [~] Functional Design - EXECUTE (units 2, 3) / SKIP (unit 1) โ€” Unit 2 โœ… - [x] NFR Requirements - SKIP - [x] NFR Design - SKIP - [x] Infrastructure Design - SKIP -- [~] Code Generation - EXECUTE (per unit) โ€” Unit 1 webPage helper โœ… (790495d), Unit 2 next +- [~] Code Generation - EXECUTE (per unit) โ€” Unit 1 webPage helper โœ… (now 3c7d00e on master), Unit 2 Shared contact blocks โœ…, Unit 3 next - [ ] Build and Test - EXECUTE ### ๐ŸŸก OPERATIONS PHASE diff --git a/aidlc-docs/features/contact-page/audit.md b/aidlc-docs/features/contact-page/audit.md index d46b602..fc1f8e8 100644 --- a/aidlc-docs/features/contact-page/audit.md +++ b/aidlc-docs/features/contact-page/audit.md @@ -440,3 +440,231 @@ Features "portfolio-page" and "soorten-fotoshoots-page" are also active and stac **Context**: CONSTRUCTION - Code Generation Unit 1 (approved) --- + +## Commit, Push and Hand-over of Unit 1 + +**Timestamp**: 2026-10-25T09:40:00Z + +**User Input**: (none โ€” continuation of "Ga verder") + +**AI Response**: "Committed 790495d (seo.ts + seo.test.ts) and 9127eba (docs), pushed feature/contact-page to origin (new branch). Sent hash 790495d to andreaslopfotografie-3f and Portfolio-pagina (Portfolio will cherry-pick it at its unit 3). active-features.md: contact-page โ†’ ๐ŸŸข Construction." + +**Context**: CONSTRUCTION - Code Generation Unit 1 (complete) + +--- + +## Functional Design โ€” Unit 2 Shared contact blocks โ€” Plan and Questions + +**Timestamp**: 2026-10-25T09:45:00Z + +**User Input**: (none โ€” stage started) + +**AI Response**: "Created construction/plans/shared-contact-blocks-functional-design-plan.md and shared-contact-blocks-fd-questions.md (4 questions: channel order, Instagram/Facebook labels, privacy line while gated, hover/focus style). Decided without question: new-tab behaviour as in footer/hero/Instagram grid, mailto default subject, thank-you text with replyTime, homepage behaviour preserved." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” Test Environment Claims + +**Timestamp**: 2026-10-25T09:55:00Z + +**User Input**: (none โ€” cross-session messages from andreaslopfotografie-3f: cherry-picked 790495d without conflicts; claims 4173 for its unit 2 check; proposes 'claim test' / 'test free' for the single test environment before a deploy_test dispatch) + +**AI Response**: "Verified in the CI workflow that a branch push does not deploy (only workflow_dispatch with deploy_test or a push to master). Replied: nothing of contact-page on test, agreed; added that a merge to master also deploys to test, so check test claims before merging. Relayed the protocol to Portfolio-pagina." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” CPU Slowdown During Soorten Lighthouse + +**Timestamp**: 2026-10-25T09:11:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3f: homepage mobile Lighthouse 0.69 because the machine was ~half as fast around 09:07 (benchmarkIndex 1909 vs ~4200); rerunning Lighthouse, asks for no heavy work) + +**AI Response**: "Checked timestamps: contact-page's last heavy work was the build at 08:25:12 (vitest 08:20โ€“08:25), commits at 08:50, nothing heavy since. Replied with these times; suggested Portfolio or a non-session cause (antivirus/updates/the PC runner); noted the unexplained first vitest failure at 08:19 may have had the same cause. No heavy work until '4173 free'." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” 4173 Free and Lighthouse Finding + +**Timestamp**: 2026-10-25T09:30:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3f: 4173 free for now; finding: Lighthouse mobile (lantern simulation) puts content pages with an image LCP at LCP โ‰ˆ 3.22 s โ‰ˆ score 0.895, right at the 0.9 threshold (over-mij and soorten); image size does not matter, the main bundle + route chunk do) + +**AI Response**: "Recorded as a risk for unit 3: /contact loads the form eagerly (larger route chunk), so NFR-CP-05 (โ‰ฅ 0.9 mobile) is at risk; to be addressed in Functional Design of unit 3 (e.g. what loads with the page vs. after it)." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” Lighthouse Budgets Change (Soorten Unit 2) + +**Timestamp**: 2026-10-25T09:40:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3f: claims 4173 for its final unit 2 check; its user decided a lighthouserc change: photoPagePaths ['/over-mij', '/soorten-fotoshoots'] with mobile performance 0.85 (back to 0.9 with prerendering, NFR-P-01); assertMatrix home 0.8 โ†’ photo pages 0.85 โ†’ other indexed 0.9 โ†’ noindex โ†’ 404; desktop config sets every entry to 0.9) + +**AI Response**: "Noted for unit 3: on phones /contact has no large photo (portrait card + form), so its LCP is likely text; whether /contact goes into photoPagePaths (0.85) or stays under the other indexed pages (0.9, as NFR-CP-05 requires today) is a decision for the user in Functional Design of unit 3. On rebase, keep soorten's lighthouserc structure and add /contact to the right list. No heavy work until '4173 free'." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Session Pause until 12:59 + +**Timestamp**: 2026-10-25T11:58:00Z + +**User Input**: "mijn sessielimiet zit er bijna op, die wordt over een uur gereset. kan je een timer zetten dat je over een uur weer verder gaat waar je mee bezig was? Dit heb ik ook al tegen de sessie gezegd van Soorten fotoshoots. Die pakt alles om 12:58 weer op. Hij kon jou net niet bereiken dus zodra je start mag je ook een melding naar die sessie doen." + +**AI Response**: "Scheduled a one-shot resume at 12:59 local (job 6d6b192c, session-only): notify the Soorten fotoshoots session (now 'andreaslopfotografie-3e'), then continue Functional Design unit 2 (answers in shared-contact-blocks-fd-questions.md). Also received from Soorten: 4173 free; agreements recorded in memory project_parallel_feature_sessions.md." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (paused, awaiting answers) + +--- + +## Session Resume (scheduled, 12:59) + +**Timestamp**: 2026-10-25T12:59:00Z + +**User Input**: (scheduled resume prompt) "Hervat de contact-page AIDLC-sessie (worktree K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-contact, branch feature/contact-page). Stap 1: stuur via SendMessage aan de Soorten fotoshoots-sessie [...] een melding dat de contact-page sessie weer actief is [...]. Stap 2: lees aidlc-state.md en het einde van audit.md. [...] Als alle [Answer]-tags zijn ingevuld: verwerk ze [...]; anders: meld de gebruiker [...] dat de vragen nog openstaan. Log de hervatting in audit.md." + +**AI Response**: "This session is now 'andreaslopfotografie-fe'. Notified andreaslopfotografie-3e (Soorten) and Portfolio-pagina of the new address and asked Soorten for changes since ~12:00 affecting contact. State: CONSTRUCTION - Functional Design unit 2; the 4 [Answer] tags in shared-contact-blocks-fd-questions.md are still empty โ†’ told the user the questions are still open." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” Soorten Status after Resume + +**Timestamp**: 2026-10-25T13:02:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3e: 4173 free; will push and claim test for a deploy_test (Andrea's review) โ€” no merges to master until 'test free'; its unit 2 commit will touch lighthouserc(.desktop).cjs, sitePages.ts (own entry), sitemap.test.ts, seo.ts (absoluteUrl, shootServices on top of 790495d); no changes to siteContent/types beyond serviceArea, PageIntro or aboutPage; ssh-agent restarted, user re-adding the key) + +**AI Response**: "Noted. Expect rebase overlap in sitemap.test.ts and lighthouserc for unit 3 (/contact entry); no merges planned before 'test free'." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” Soorten PR #8 + +**Timestamp**: 2026-10-25T14:00:00Z + +**User Input**: (none โ€” cross-session messages from andreaslopfotografie-3e: claimed test for a deploy_test (Andrea's text review), then 4173 for a final check; now 4173 free and test free; texts approved; PR #8 feature/soorten-fotoshoots-page โ†’ master updated with d2c1d2c (MediaText optional mediaSize and detailImage, defaults unchanged) and d12665c (docs); merging PR #8 also deploys to test, announced beforehand) + +**AI Response**: "Noted. After PR #8 merges, rebase feature/contact-page onto master (expected overlaps: seo.ts, sitePages.ts, lighthouserc*.cjs, sitemap.test.ts, content/types.ts, siteContent.ts, arbitraries.ts)." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Coordination โ€” PR #8 Auto-merge Announced + +**Timestamp**: 2026-10-25T14:10:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3e: its user enables auto-merge of PR #8; the master push deploys to test; asks whether contact has an open test claim; lists what lands on master) + +**AI Response**: "Replied: no test claim or review open for contact; send the merge commit for the rebase. Noted that the cherry-picked webPage commit lands on master with a different hash; the rebase should skip contact's identical 790495d โ€” to verify." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting answers) + +--- + +## Functional Design โ€” Unit 2 โ€” Answers and Artifacts + +**Timestamp**: 2026-10-25T14:30:00Z + +**User Input**: "Ik heb de vragen beantwoord" โ€” answers in shared-contact-blocks-fd-questions.md: Q1 A, Q2 A, Q3 B, Q4 A + +**AI Response**: "No ambiguities. Q3 = B handled with a shared PrivacyNote used by ContactForm and the gate notice. Generated construction/shared-contact-blocks/functional-design/: domain-entities.md (SocialLink.label, contactForm.replyTime, socials reordered Instagram first, ContactChannel), business-rules.md (BR-CD-01..08, BR-PR-01..04, BR-RT-01..02, BR-CPN-01..07 with decision flowchart), business-logic-model.md (new pure contactChannels() in lib/, panel flow, 6 PBT properties), frontend-components.md (ContactPanel, ContactSection, ContactForm, ContactFormGate, PrivacyNote, ContactDetails). Visible changes on existing pages: privacy line in the homepage contact section, Instagram before Facebook in the footer." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (awaiting approval) + +--- + +## Functional Design โ€” Unit 2 โ€” Approval + +**Timestamp**: 2026-10-25T14:40:00Z + +**User Input**: "ga verder" + +**AI Response**: "Functional Design unit 2 approved. Started Code Generation unit 2 Part 1 (planning); checked whether PR #8 has reached master to rebase first." + +**Context**: CONSTRUCTION - Functional Design Unit 2 (approved) โ†’ Code Generation Unit 2 + +--- + +## Code Generation โ€” Unit 2 โ€” Plan + +**Timestamp**: 2026-10-25T14:50:00Z + +**User Input**: (none โ€” Part 1 planning) + +**AI Response**: "PR #8 not yet on origin/master. Created construction/plans/shared-contact-blocks-code-generation-plan.md (13 steps: sync with master, content model, contactChannels + tests, PrivacyNote, ContactForm, ContactFormGate, ContactPanel, ContactSection, ContactDetails, verification incl. Lighthouse with 4173 claim, summary, commit). Presented for approval." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (plan awaiting approval) + +--- + +## Rebase onto Master after PR #8 (Soorten fotoshoots) + +**Timestamp**: 2026-10-25T15:05:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3e: PR #8 merged as a58bc1c; 790495d is on master as 3c7d00e; expected small conflicts; soorten session finished and cleaned up) + +**AI Response**: "Per the user's standing instruction to update after a merge (and step 1 of the unit 2 plan): stashed docs by name, rebased onto origin/master a58bc1c. 790495d conflicted instead of being skipped: verified its +/- lines are identical to 3c7d00e (the conflict comes from soorten's later seo.ts/seo.test.ts edits around the same lines), so skipped it (`git rebase --skip`). Resolved active-features.md keeping both rows. Restored the stash (dropped by name). Full test suite 325/325 (seed 726668228), tsc clean. Remote branch now needs a force-with-lease push (at the unit 2 commit). Told Portfolio-pagina to rebase on master instead of cherry-picking 790495d." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (plan awaiting approval; step 1 done) + +--- + +## Coordination โ€” Documentation Fix Request (D6) + +**Timestamp**: 2026-10-25T15:08:00Z + +**User Input**: (none โ€” cross-session message from andreaslopfotografie-3e on behalf of its user: include in the contact PR an update of deployment plan D6 (aidlc-docs/features/frontend-shell/operations/deployment/deployment-plan.md, and deployment-instructions.md if repeated) โ€” lighthouse is a required check on master since 2026-10-19; then remove the first bullet of memory project_open_doc_followups.md) + +**AI Response**: "The owner's memory note project_open_doc_followups.md says to include this fix in the next change on the site, so added it to the unit 2 plan as step 12b (separate docs commit; remove the memory bullet afterwards)." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (plan awaiting approval) + +--- + +## Code Generation โ€” Unit 2 โ€” Plan Approval + +**Timestamp**: 2026-10-25T15:20:00Z + +**User Input**: "Approve plan" + +**AI Response**: "Plan approved (incl. step 12b, the D6 documentation follow-up). Started Part 2 (generation) from step 2." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (generation) + +--- + +## Code Generation โ€” Unit 2 โ€” Generated and Verified + +**Timestamp**: 2026-10-25T16:40:00Z + +**User Input**: (none โ€” generation; cross-session: claimed 4173 with Portfolio-pagina for the check, released after verifying no listener remained) + +**AI Response**: "Steps 2โ€“12b done: content model (label, replyTime, Instagram first), contactChannels + 10 tests, PrivacyNote, ContactForm/ContactFormGate, ContactPanel (form always a lazy chunk; eager starts loading at once with the measured placeholder โ€” deviation from BR-CPN-05 to keep the homepage split and the contact route small), ContactSection on ContactPanel (homepage tests unchanged and green), ContactDetails. Footer and hero tests adjusted (they assumed Facebook first; hero socials also follow the new order). Placeholder re-measured in the production build: 649/546.6 px โ†’ 649/547 px. pnpm test 354/354, lint, format, build green; Lighthouse mobile + desktop passed. D6 in frontend-shell deployment-plan updated (lighthouse is a required check since 2026-10-19). Code summary written. Awaiting approval; commit after." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (awaiting approval) + +--- + +## Code Generation โ€” Unit 2 โ€” Approval + +**Timestamp**: 2026-10-25T16:50:00Z + +**User Input**: "Akkoord en ga verder" + +**AI Response**: "Unit 2 approved. Committing code, unit docs and the D6 documentation fix separately; pushing with --force-with-lease (branch rebased); removing the D6 bullet from the memory note; notifying Portfolio; starting unit 3 Functional Design." + +**Context**: CONSTRUCTION - Code Generation Unit 2 (approved) + +--- diff --git a/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-code-generation-plan.md b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-code-generation-plan.md new file mode 100644 index 0000000..e6b5dbf --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-code-generation-plan.md @@ -0,0 +1,31 @@ +# Code Generation Plan โ€” Unit 2: Shared contact blocks + +Single source of truth for generating unit 2. Workspace: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-contact\web`, branch `feature/contact-page`. + +## Unit context +- **Requirements**: FR-CP-02 (shared parts), FR-CP-04, FR-CP-06, FR-CP-07, FR-CP-08, NFR-CP-01..04. +- **Design**: [application-design.md](../../inception/application-design/application-design.md); functional design in [../shared-contact-blocks/functional-design/](../shared-contact-blocks/functional-design/) (BR-CD, BR-PR, BR-RT, BR-CPN). +- **Depends on**: unit 1 (no direct use). **Used by**: unit 3 (contact page). +- **Parallel features**: soorten-fotoshoots-page (PR #8) changes `content/types.ts`, `siteContent.ts`, `test/arbitraries.ts`, `seo.ts`, `lighthouserc*`, `MediaText`. Rebase first if it has merged (step 1). +- **Shared resources**: Lighthouse only after a "claim 4173" to the other sessions and "4173 free" afterwards; no deploy to test. + +## Steps + +- [x] **Step 1 โ€” Sync with master** (done 2026-10-25: rebased onto a58bc1c; duplicate webPage commit skipped; 325/325 tests green): fetch; if PR #8 has merged, rebase `feature/contact-page` onto master (check that the cherry-picked webPage commit is skipped as an identical patch, resolve conflicts keeping both sides) and run the seo tests. If not merged yet, continue and rebase at the end of the unit. +- [x] **Step 2 โ€” Content model**: `content/types.ts`: `SocialLink.label?: string`; `SiteContent.contactForm.replyTime: string`. `content/siteContent.ts`: socials reordered to Instagram, Facebook with labels "@andreaslopfotografie" and "Andrea Slop Fotografie"; `contactForm: { enabled: false, replyTime: '1-2 werkdagen' }`. `test/arbitraries.ts`: `socialLink` with an optional label (absent, empty, whitespace, text); `anySiteContent` with `replyTime`. Fix tests that assume the old footer order. +- [x] **Step 3 โ€” `lib/contactChannels.ts`** (BR-CD-01..05): `ContactChannel` type and `contactChannels(email, socials)`, built on `emailAddress`, `mailtoLink`, `mailSubject`, `visibleSocials`, `socialPlatforms`. +- [x] **Step 4 โ€” `lib/contactChannels.test.ts`**: examples (site content, invalid e-mail, no socials, label fallback) and the 6 properties from the business logic model. +- [x] **Step 5 โ€” `PrivacyNote`** (`components/PrivacyNote/`, BR-PR-01): component + test (text, link target, axe). +- [x] **Step 6 โ€” `ContactForm`**: prop `replyTime`, thank-you text (BR-RT-01), `PrivacyNote` under the submit button (BR-PR-02); update its tests. +- [x] **Step 7 โ€” `ContactFormGate`**: `PrivacyNote` under the mail button in the notice (BR-PR-03); update its tests. +- [x] **Step 8 โ€” `ContactPanel`** (`components/ContactPanel/`, BR-CPN-01..06): move gate, lazy/eager loading with placeholder, options, preselect and mail subject out of `ContactSection`; tests for eager, lazy (placeholder, load near screen, load on `pakket`), preselect (valid, invalid, same value again), subject, gate on/off, axe. +- [x] **Step 9 โ€” `home/ContactSection`** (BR-CPN-07): render `ContactPanel load="lazy"`; keep heading, URL clean-up, scroll and focus; pass `replyTime` from `routes/index.tsx`. Existing `ContactSection` and `app.test.tsx` tests must pass unchanged in intent (only additions for the privacy line). +- [x] **Step 10 โ€” `ContactDetails`** (`components/ContactDetails/`, BR-CD-06..08): card, eyebrow h2 with `titleId`, labelled list, icon rows (mail icon from `@iconify-icons/ant-design`, platform icons from `socialPlatforms`), new-tab hint, optional round portrait (decorative); tests: channels and order, link targets, new-tab attributes and hint, nothing rendered without channels, portrait on/off, unique ids when rendered twice, axe. +- [x] **Step 11 โ€” Verify (Step 13.5)**: `pnpm test` (coverage thresholds, run without the rtk output filter so failures are visible), `pnpm lint`, `pnpm format:check`, `pnpm build`; then "claim 4173" โ†’ `pnpm lighthouse` (homepage budgets unchanged) โ†’ "4173 free". Fix and repeat until green. +- [x] **Step 12 โ€” Code summary**: `aidlc-docs/features/contact-page/construction/shared-contact-blocks/code/code-summary.md`. +- [x] **Step 12b โ€” Open documentation follow-up** (from the owner's memory note "include in the next change on the site"): update deployment-plan D6 (and deployment-instructions.md if it repeats it) in `aidlc-docs/features/frontend-shell/operations/deployment/` โ€” `lighthouse` is a required check on master since 2026-10-19; separate docs commit; then remove that bullet from the memory note. +- [x] **Step 13 โ€” Commit** (after approval of the generated code): one code commit and one docs commit; push with `--force-with-lease` (the branch was rebased). Tell the other sessions about the footer order change and the new shared components (`ContactDetails`, `PrivacyNote`, `ContactPanel`). + +## Extension compliance (plan level) +- **Security**: e-mail still assembled in the browser; `contactChannels` only yields `mailto:`/`https:` links (property-tested); new-tab links with `noopener noreferrer`; no new dependencies or endpoints โ€” Compliant. +- **PBT**: PBT-01/03 (contactChannels invariants), PBT-07 (extended generators), PBT-08 (seed logging), PBT-10 (component examples) โ€” Planned; PBT-02/04/05 N/A for this unit beyond the oracle-style "same as visibleSocials" property; PBT-06 compliant (reducer unchanged). diff --git a/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-fd-questions.md b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-fd-questions.md new file mode 100644 index 0000000..9b50a70 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-fd-questions.md @@ -0,0 +1,52 @@ +# Functional Design-vragen โ€” Unit 2: Gedeelde contactblokken + +Al vastgelegd (geen vraag nodig): + +- **Nieuw tabblad**: Instagram en Facebook openen in een nieuw tabblad met `rel="noopener noreferrer"` en de voor screenreaders verborgen tekst "(opent in nieuw tabblad)", net als in de footer, de hero en het Instagram-blok. +- **E-mail**: het adres als linktekst, `mailto:` met het standaardonderwerp "Vraag via andreaslop.nl". Een ongeldig adres wordt weggelaten, en een kaart zonder geldige kanalen verschijnt niet. +- **Bedankbericht**: "Bedankt voor je bericht! Ik reageer binnen {reactietermijn}." met de termijn uit `siteContent`. +- **Homepage**: na het uitlichten van `ContactPanel` gedraagt het contactblok zich precies als nu (lazy laden, placeholder-hoogte, "Boek โ€ฆ" โ†’ voorselectie, URL opschonen, scrollen, focus op de kop). Het enige zichtbare verschil is de privacyregel. + +Vul per vraag de letter in na `[Answer]:`. Past geen enkele optie, kies dan de laatste (Anders) en licht toe. + +--- + +## Vraag 1: Volgorde van de kanalen in de kaart + +In het ontwerp staat de volgorde E-mail, Instagram, Facebook. In `siteContent` staat Facebook vรณรณr Instagram, en de footer volgt die volgorde. + +- A) **E-mail eerst, daarna de socials in de volgorde van de content**. Om op Instagram, Facebook uit te komen, draai ik de volgorde in `siteContent` om. Daardoor staat in de footer ook Instagram eerst. Eรฉn bron, รฉรฉn volgorde op de hele site. (aanbevolen: Instagram is het belangrijkste kanaal voor een fotograaf) +- B) E-mail eerst, daarna de socials in de volgorde van de content, en `siteContent` laten zoals hij is (dus Facebook, Instagram) +- C) Een vaste volgorde alleen in de kaart (e-mail, Instagram, Facebook), los van de content. De footer blijft Facebook, Instagram. +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 2: Linkteksten van Instagram en Facebook + +Met het nieuwe optionele veld `label` per sociale link. + +- A) Instagram "@andreaslopfotografie", Facebook "Andrea Slop Fotografie" (de naam van de pagina, zoals Facebook hem toont) (aanbevolen) +- B) Bij allebei "@andreaslopfotografie", zoals in het ontwerp +- C) Geen labels: bij allebei de naam van het platform ("Instagram", "Facebook") +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A + +## Vraag 3: De privacyregel zolang het formulier achter de gate staat + +De privacyregel staat in het formulier, onder de verzendknop. Zolang het formulier gedimd en onbedienbaar onder de "Binnenkort"-melding staat, is de regel daar niet te lezen of aan te klikken. + +- A) Zo laten: de regel hoort bij het versturen via het formulier, en zolang dat niet kan, mailt de bezoeker zelf. Zodra het formulier aan gaat, is de regel er vanzelf. (aanbevolen) +- B) De regel ook onder de "Binnenkort"-melding tonen, zodat hij nu al zichtbaar is +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: B + +## Vraag 4: Hoe ziet een kanaal in de kaart eruit bij hover en focus? + +- A) Zoals in de mockup en de footer: de tekst kleurt naar de accentkleur bij hover, met de focusring van het thema bij toetsenbordfocus. Het icoon behoudt zijn eigen accentkleur. (aanbevolen) +- B) Bij hover ook een onderstreping, zoals bij links in lopende tekst (variant `underline`) +- X) Anders (beschrijf hieronder na de [Answer]:-tag) + +[Answer]: A diff --git a/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-functional-design-plan.md b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-functional-design-plan.md new file mode 100644 index 0000000..4e7599d --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/plans/shared-contact-blocks-functional-design-plan.md @@ -0,0 +1,10 @@ +# Functional Design Plan โ€” Unit 2: Shared contact blocks + +Depth: minimal. Scope from the execution plan: which homepage behaviour `ContactPanel` must keep, which channels `ContactDetails` shows and how, the privacy line and the shared reply time, and the PBT properties of new pure logic (PBT-01). Questions: [shared-contact-blocks-fd-questions.md](shared-contact-blocks-fd-questions.md). + +- [x] Collect and analyse the answers in `shared-contact-blocks-fd-questions.md` +- [x] `domain-entities.md` โ€” `SocialLink.label`, `SiteContent.contactForm.replyTime`, the contact channel as derived data, `ContactPanel` inputs +- [x] `business-rules.md` โ€” channel selection and order, labels, link behaviour (mailto subject, new tab), privacy line, reply time, behaviour `ContactPanel` must preserve from `ContactSection` +- [x] `business-logic-model.md` โ€” from site content to the list of channels (pure function), the panel's loading and preselect flow, properties for PBT +- [x] `frontend-components.md` โ€” component hierarchy, props, ids and test ids, accessibility per element +- [x] Validate against requirements.md, application-design.md and the extension rules diff --git a/aidlc-docs/features/contact-page/construction/shared-contact-blocks/code/code-summary.md b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/code/code-summary.md new file mode 100644 index 0000000..e6ebc83 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/code/code-summary.md @@ -0,0 +1,39 @@ +# Code Summary โ€” Unit 2: Shared contact blocks + +## Created +- `web/src/lib/contactChannels.ts` (+ `.test.ts`) โ€” `ContactChannel` and `contactChannels(email, socials)` (BR-CD-01..05) +- `web/src/components/PrivacyNote/PrivacyNote.tsx` (+ test) โ€” the privacy line (BR-PR-01, 04) +- `web/src/components/ContactPanel/ContactPanel.tsx` (+ test) โ€” gate, form loading (`lazy` / `eager`), shoot options, preselect, mail subject (BR-CPN-01..06) +- `web/src/components/ContactDetails/ContactDetails.tsx` (+ test) โ€” the "Direct contact" card (BR-CD-06..08) + +## Modified +- `web/src/content/types.ts` โ€” `SocialLink.label?`, `SiteContent.contactForm.replyTime` +- `web/src/content/siteContent.ts` โ€” socials Instagram first, with labels; `replyTime: '1-2 werkdagen'` +- `web/src/test/arbitraries.ts` โ€” `socialLink` with optional label; `anySiteContent` with `replyTime` +- `web/src/components/ContactForm/ContactForm.tsx` (+ test) โ€” `replyTime` prop for the thank-you; `PrivacyNote` under the submit button +- `web/src/components/ContactForm/ContactFormGate.tsx` (+ test) โ€” `PrivacyNote` under the notice +- `web/src/components/home/ContactSection/ContactSection.tsx` (+ test) โ€” uses `ContactPanel load="lazy"`; keeps heading, URL clean-up, scroll and focus +- `web/src/routes/index.tsx` โ€” passes `replyTime` +- `web/src/components/Footer/Footer.test.tsx`, `web/src/components/Hero/Hero.test.tsx` โ€” find socials by platform / new order instead of assuming Facebook first + +## Deviation from the functional design +- **BR-CPN-05 (eager)**: the form is always its own chunk, also when `eager`. Importing it directly in `ContactPanel` would have put it in the homepage bundle and undone the lazy split (ยฑ0.03 mobile performance). `eager` now starts loading at once and keeps the measured space with the placeholder until it arrives, so nothing shifts. This also keeps the contact route chunk small (the Lighthouse risk noted for unit 3). +- **Hero socials** also follow the new content order (Instagram first), next to the footer; not listed in the functional design. + +## Measurements +- Form height with the privacy line (production build, Chrome): 649 px below `sm` (480 px), 546.6 px from `sm` โ†’ placeholder `{ base: '649px', sm: '547px' }` (was 604 / 502). +- `ContactForm` chunk: 14.9 kB (5.6 kB gzip), still separate from the main bundle. + +## Verification +- `pnpm test`: 69 files, 354 tests passed (seed 2106747721), coverage thresholds met; run without the rtk filter. +- `pnpm lint`, `pnpm format:check`, `pnpm build`: clean (existing accepted >500 kB main chunk warning). +- `pnpm lighthouse` (mobile + desktop, port 4173 claimed and released): all assertions passed; desktop `/` 0.99/1/1/1, `/over-mij` and `/soorten-fotoshoots` 1/1/1/1. + +## Tests added +| Area | Tests | +|---|---| +| `contactChannels` | 4 examples + 6 properties (e-mail first โ‡” valid, socials = visibleSocials in order, labels, only mailto:/https:, external = social, length bound) | +| `PrivacyNote` | text, link, axe | +| `ContactForm` / gate | reply time from content, privacy line in form and outside the inert part of the gate | +| `ContactPanel` | eager, options, lazy placeholder โ†’ load near screen, lazy load on package, valid/unknown/repeated package, gate off | +| `ContactDetails` | order and labels, mailto, new tab and hint, hidden icons, nothing without channels, portrait, rendered twice | diff --git a/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-logic-model.md b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-logic-model.md new file mode 100644 index 0000000..4880790 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-logic-model.md @@ -0,0 +1,69 @@ +# Business Logic Model โ€” Unit 2: Shared contact blocks + +## Pure logic + +### `contactChannels(email: EmailAddress, socials: readonly SocialLink[]): ContactChannel[]` +New, in `lib/contactChannels.ts` (100% coverage threshold applies to `lib/`). Implements BR-CD-01..04 and the `external` flag of BR-CD-05, using the existing `emailAddress`, `mailtoLink`, `mailSubject`, `visibleSocials` and the platform names. `ContactDetails` only renders what it returns (and renders nothing for an empty list, BR-CD-06). + +### Reused unchanged +`shootOptions`, `packageFromSearch`, `visiblePackages`, `mailSubject`, `contactFormReducer` (the form's state machine). + +## Flows + +### Card +```mermaid +graph TD + Content["siteContent: email, socials"] --> Fn["contactChannels()"] + Fn --> Empty{"Empty list?"} + Empty -->|"yes"| Nothing(["null"]) + Empty -->|"no"| Render["ContactDetails renders heading, list, one row per channel"] + classDef data fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + classDef logic fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000; + classDef decision fill:#FFF59D,stroke:#F57F17,stroke-width:1px,color:#000; + class Content data; + class Fn,Render,Nothing logic; + class Empty decision; +``` + +Text alternative: the site content goes through contactChannels; an empty result renders nothing, otherwise the card renders a heading and one row per channel. + +### Panel +```mermaid +graph TD + In["packages, enabled, email, replyTime, pakket, load"] --> Opts["shootOptions(packages)"] + In --> Pk{"New pakket value?"} + Pk -->|"valid id"| Pre["preselect key + 1, subject with package name"] + Pk -->|"invalid or none"| Keep["no change"] + Opts --> Gate{"enabled?"} + Pre --> Gate + Keep --> Gate + Gate -->|"no"| Notice["Gate: dimmed inert form, notice, mail button, privacy line"] + Gate -->|"yes"| FormOnly["Form only"] + Notice --> Load{"load"} + FormOnly --> Load + Load -->|"eager"| Now["Form rendered now"] + Load -->|"lazy"| Near{"Near screen or pakket?"} + Near -->|"no"| Placeholder["Placeholder of form height"] + Near -->|"yes"| Lazy["Load form chunk, keep it loaded"] + classDef data fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + classDef logic fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000; + classDef decision fill:#FFF59D,stroke:#F57F17,stroke-width:1px,color:#000; + class In data; + class Opts,Pre,Keep,Notice,FormOnly,Now,Placeholder,Lazy logic; + class Pk,Gate,Load,Near decision; +``` + +Text alternative: the panel derives the shoot options, applies a valid new package value as preselect with a matching mail subject, wraps the form in the gate when the form is off, and renders the form now (eager) or when it comes near the screen or a package value arrives (lazy), keeping a placeholder until then. + +## Properties for property-based testing (PBT-01) + +| Function | Property | Category | +|---|---|---| +| `contactChannels` | The e-mail channel is present and first โ‡” `emailAddress(email)` is not null | Invariant | +| `contactChannels` | The social channels are exactly `visibleSocials(socials)` in the same order (same platforms and hrefs) | Invariant / oracle | +| `contactChannels` | Every social channel's label is its trimmed label when non-empty, otherwise the platform name; never empty | Invariant | +| `contactChannels` | Every `href` is `mailto:` or `https:`; never `javascript:` or another scheme | Invariant (security) | +| `contactChannels` | `external` is true exactly for social channels | Invariant | +| `contactChannels` | Length โ‰ค 1 + `socials.length` | Invariant | + +Generators: extend `src/test/arbitraries.ts` โ€” `socialLink` gets an optional `label` (absent, empty, whitespace, text), reuse `anyEmail` and `anyHref`. `ContactPanel` behaviour is covered by example-based component tests (it is UI wiring over already property-tested helpers). diff --git a/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-rules.md b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-rules.md new file mode 100644 index 0000000..8d6d8bd --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/business-rules.md @@ -0,0 +1,71 @@ +# Business Rules โ€” Unit 2: Shared contact blocks + +Answers: [shared-contact-blocks-fd-questions.md](../../plans/shared-contact-blocks-fd-questions.md) (Q1 A, Q2 A, Q3 B, Q4 A). + +## Contact channels (`ContactDetails`) + +| Id | Rule | +|---|---| +| BR-CD-01 | The card lists the e-mail channel first, then the social links in the order of the content. *Q1 = A* | +| BR-CD-02 | The e-mail channel exists only when `emailAddress()` gives a valid address. Its link text is the address; its link is `mailto:` with the subject "Vraag via andreaslop.nl" (`mailSubject()`). The address is assembled in the browser only. | +| BR-CD-03 | A social channel exists only for links that `visibleSocials()` keeps (valid https). Invalid links are skipped; the order of the rest is kept. | +| BR-CD-04 | A social channel's link text is its `label` after trimming; an empty or missing label falls back to the platform name ("Instagram", "Facebook"). *Q2 = A* | +| BR-CD-05 | Social channels open in a new tab with `rel="noopener noreferrer"` and the visually hidden text "(opent in nieuw tabblad)", as in the footer. The e-mail channel opens in the same tab. | +| BR-CD-06 | No valid channel โ†’ the card is not rendered at all (no empty heading). | +| BR-CD-07 | Each channel shows its icon (platform icon or mail icon), hidden from assistive technology. | +| BR-CD-08 | Hover: the link text turns to the accent colour; the icon keeps its own colour; no underline. Keyboard focus: the theme focus ring. Each row is at least 44 px high. *Q4 = A* | + +```mermaid +graph TD + Start(["Site content"]) --> E{"Valid e-mail address?"} + E -->|"yes"| AddE["Add e-mail channel first"] + E -->|"no"| S + AddE --> S["Take social links in content order"] + S --> V{"Valid https link?"} + V -->|"no"| Skip["Skip it"] + V -->|"yes"| L{"Non-empty label?"} + L -->|"yes"| UseL["Link text = label"] + L -->|"no"| UseN["Link text = platform name"] + UseL --> Next["Next link"] + UseN --> Next + Skip --> Next + Next --> Any{"Any channel?"} + Any -->|"no"| None(["Render nothing"]) + Any -->|"yes"| Card(["Render the card"]) + classDef start fill:#CE93D8,stroke:#6A1B9A,stroke-width:1px,color:#000; + classDef decision fill:#FFF59D,stroke:#F57F17,stroke-width:1px,color:#000; + classDef step fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + class Start,None,Card start; + class E,V,L,Any decision; + class AddE,S,Skip,UseL,UseN,Next step; +``` + +Text alternative: a valid e-mail address becomes the first channel; each social link in content order is skipped when its link is invalid, otherwise it becomes a channel with its label or the platform name; the card is rendered only when at least one channel exists. + +## Privacy line + +| Id | Rule | +|---|---| +| BR-PR-01 | The text "Lees in de privacyverklaring wat ik met je gegevens doe." with "privacyverklaring" as an underlined router link to `/privacyverklaring`. | +| BR-PR-02 | Shown under the submit button inside `ContactForm` (every form that uses it). | +| BR-PR-03 | While the form is gated, the same line is also shown under the "Binnenkort" notice, so it can be read and followed now. *Q3 = B* | +| BR-PR-04 | One shared component renders the line in both places, so the text and link never drift apart. | + +## Reply time + +| Id | Rule | +|---|---| +| BR-RT-01 | The thank-you message is "Bedankt voor je bericht! Ik reageer binnen {replyTime}." with `replyTime` from `siteContent.contactForm.replyTime`. | +| BR-RT-02 | No other place hard-codes a reply time. | + +## `ContactPanel` โ€” behaviour kept from the homepage + +| Id | Rule | +|---|---| +| BR-CPN-01 | Shoot options = the shown packages in their order, then "Overig" (`shootOptions`). | +| BR-CPN-02 | A raw `pakket` value is validated with `packageFromSearch` against the shown packages; only a known id preselects. A new valid value (also the same one again) re-applies the preselect (`key` increments); an invalid value changes nothing. | +| BR-CPN-03 | The mail subject is "Aanvraag fotoshoot: {package name}" after a valid preselect, otherwise "Vraag via andreaslop.nl". It is used by the gate's mail button and the form's failure message. | +| BR-CPN-04 | `load="lazy"`: the form loads when its spot comes near the screen (`DEFERRED_LOAD_MARGIN`) or immediately when a `pakket` value arrives; until then a placeholder keeps its height (604 px on phones, 502 px from `sm`); once loaded it stays loaded. | +| BR-CPN-05 | `load="eager"`: the form is part of the page and renders right away, without a placeholder. | +| BR-CPN-06 | The gate is shown whenever `enabled` is false, with the mail button (subject per BR-CPN-03) and the privacy line (BR-PR-03). | +| BR-CPN-07 | Not the panel's job: heading, URL clean-up, scrolling and focus. On the homepage `ContactSection` keeps doing these exactly as today. | diff --git a/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/domain-entities.md b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/domain-entities.md new file mode 100644 index 0000000..54b1585 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/domain-entities.md @@ -0,0 +1,55 @@ +# Domain Entities โ€” Unit 2: Shared contact blocks + +## Entity relationships + +```mermaid +graph TD + Site["SiteContent"] -->|"has"| Email["EmailAddress (user, domain)"] + Site -->|"has 0..n, in display order"| Social["SocialLink (platform, href, label?)"] + Site -->|"has"| FormCfg["contactForm (enabled, replyTime)"] + Social -->|"platform refers to"| Platform["socialPlatforms entry (name, icon)"] + Email -->|"becomes 0..1"| Channel["ContactChannel"] + Social -->|"becomes 0..1 when valid"| Channel + Packages["PricingPackage list"] -->|"gives"| Options["ShootOption list (+ Overig)"] + Panel["ContactPanel input"] -->|"uses"| FormCfg + Panel -->|"uses"| Options + Panel -->|"raw pakket"| Preselect["Preselect (shoot id, key)"] + classDef content fill:#9ae6b4,stroke:#2f855a,stroke-width:1px,color:#000; + classDef derived fill:#FFA726,stroke:#E65100,stroke-width:1px,color:#000; + classDef registry fill:#e2e8f0,stroke:#4a5568,stroke-width:1px,color:#000; + class Site,Email,Social,FormCfg,Packages content; + class Channel,Options,Preselect,Panel derived; + class Platform registry; +``` + +Text alternative: site content holds the e-mail address, the social links and the form settings; each valid e-mail or social link becomes one contact channel; the packages give the shoot options; the panel combines form settings, options and the preselect derived from the raw package value. + +## Content entities (API-shaped, `content/types.ts`) + +| Entity | Field | Type | Change | Notes | +|---|---|---|---|---| +| `SocialLink` | `platform` | `SocialPlatform` | โ€” | `facebook` or `instagram` | +| | `href` | `string` | โ€” | shown only as a valid https URL | +| | `label` | `string?` | **new** | visible link text in the contact card; without it, the platform name | +| `SiteContent` | `contactForm.enabled` | `boolean` | โ€” | the gate switch | +| | `contactForm.replyTime` | `string` | **new** | e.g. "1-2 werkdagen"; one value for the thank-you and the contact page intro | +| | `socials` | `SocialLink[]` | **order changed** | Instagram first, then Facebook (Q1 = A); footer follows | + +### Values in `siteContent.ts` +- Instagram: `href` unchanged, `label: '@andreaslopfotografie'` +- Facebook: `href` unchanged, `label: 'Andrea Slop Fotografie'` (Q2 = A) +- `contactForm: { enabled: false, replyTime: '1-2 werkdagen' }` + +## Derived entities (pure, not stored) + +### `ContactChannel` (`lib/contactChannels.ts`) +| Field | Type | Meaning | +|---|---|---| +| `kind` | `'email' \| 'social'` | which kind of channel | +| `platform` | `SocialPlatform?` | for `social` only; selects name and icon | +| `href` | `string` | `mailto:` link with the default subject, or the profile URL | +| `label` | `string` | visible link text | +| `external` | `boolean` | `true` for socials: open in a new tab with the hidden hint | + +### `ContactPanel` input +`idPrefix`, `packages`, `enabled`, `email`, `replyTime`, raw `pakket?`, `load: 'lazy' | 'eager'` (see [component-methods.md](../../../inception/application-design/component-methods.md)). The preselect `{ shoot, key }` and the mail subject are derived inside, exactly as `ContactSection` does today. diff --git a/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/frontend-components.md b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/frontend-components.md new file mode 100644 index 0000000..9b8a059 --- /dev/null +++ b/aidlc-docs/features/contact-page/construction/shared-contact-blocks/functional-design/frontend-components.md @@ -0,0 +1,63 @@ +# Frontend Components โ€” Unit 2: Shared contact blocks + +## Hierarchy + +```mermaid +graph TD + Home["routes/index.tsx"] --> Section["home/ContactSection (heading, URL clean-up, scroll, focus)"] + Section --> Panel["ContactPanel (load lazy)"] + Panel --> Gate["ContactFormGate"] + Gate --> Privacy1["PrivacyNote (under the notice)"] + Panel --> Form["ContactForm (lazy chunk or direct)"] + Form --> Privacy2["PrivacyNote (under the submit button)"] + Details["ContactDetails (used by the contact page in unit 3)"] --> Eyebrow["Eyebrow as h2"] + Details --> Row["channel row: icon + link"] + classDef page fill:#2196F3,stroke:#0d47a1,color:#000; + classDef shared fill:#4CAF50,stroke:#2e7d32,color:#000; + classDef small fill:#e2e8f0,stroke:#4a5568,color:#000; + class Home,Section page; + class Panel,Gate,Form,Details shared; + class Privacy1,Privacy2,Eyebrow,Row small; +``` + +Text alternative: the homepage renders ContactSection, which renders ContactPanel; the panel wraps the form in the gate; both the gate notice and the form show PrivacyNote; ContactDetails (for the contact page) renders an eyebrow-style h2 and one row per channel. + +## Components + +### `ContactPanel` (new, `components/ContactPanel/`) +- **Props**: see [component-methods.md](../../../inception/application-design/component-methods.md). +- **State**: `seenPakket`, `preselect { shoot, key }`, `chosenName` (moved from `ContactSection`); `formLoaded` for `lazy`. +- **Test ids**: keeps `contact-gate`, `contact-gate-notice`, `contact-gate-mail`, `contact-form*` from the existing components. +- **Accessibility**: unchanged (gate uses `inert`; the notice is outside the inert part). + +### `home/ContactSection` (changed) +- Keeps `TITLE_ID`, heading, `PageSection id="contact"`, the `?pakket=` clean-up effect (navigate replace, hash scroll respecting reduced motion, focus on the heading). +- Renders `` inside its `Reveal`. + +### `ContactForm` (changed) +- New prop `replyTime`; thank-you text per BR-RT-01. +- `PrivacyNote` under the submit button (BR-PR-02). + +### `ContactFormGate` (changed) +- `PrivacyNote` under the mail button in the notice (BR-PR-03), only when the gate is shown. + +### `PrivacyNote` (new, small, `components/PrivacyNote/`) +- Renders BR-PR-01: `Text` in small size, `ink.soft`, with `Link variant="underline"` + `RouterLink to="/privacyverklaring"`. +- Test id: `privacy-note`. + +### `ContactDetails` (new, `components/ContactDetails/`) +- **Props**: `titleId`, `title`, `email`, `socials`, `portrait?`, `data-testid?`. +- **Structure**: a card (`bg` white, border `line`, shadow `panel`); header: optional round portrait (decorative, `alt=""`) next to the h2 (`Eyebrow as="h2"` with `id={titleId}`); a `ul` with `aria-labelledby={titleId}`; one `li` per channel with a link containing the icon (`aria-hidden`) and the label (+ hidden new-tab hint for socials). +- **Styling**: rows `minH="44px"`, icon in `accent.deep`, text `ink.soft` โ†’ `accent.deep` on hover, theme focus ring (BR-CD-08); all from theme tokens. +- **Test ids**: `{testid}` on the card, `contact-details-{kind or platform}` on each link. +- **Portrait size and layout variants** are used in unit 3; in this unit the component supports the prop and is tested with and without it. + +## Interactions +- E-mail row: opens the mail app (`mailto:` with subject). +- Social rows: open the profile in a new tab. +- Privacy link: in-app navigation to `/privacyverklaring`. +- Homepage: unchanged flows ("Boek โ€ฆ" โ†’ preselect โ†’ URL clean-up โ†’ scroll โ†’ focus). + +## Visible change on existing pages +- Homepage contact section: the privacy line under the "Binnenkort" notice (and under the form once enabled). +- Footer: Instagram now listed before Facebook (content order, Q1 = A).