Swipe-rij: actieve kaart afleiden i.p.v. via effect (race in trage omgeving en kort flikkeren)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 16:24:00 +01:00
co-authored by Claude Sonnet 5.5
parent 1681d033c7
commit f47528073d
4 changed files with 66 additions and 8 deletions
@@ -754,3 +754,15 @@
**Context**: Interim test build; CMS pipeline coordination.
---
## Interim Deploy 2 and SEO Unit Added
**Timestamp**: 2026-11-11T11:00:00Z
**User Input**: "Ik wil de nieuwe changes ook deployen naar test zodat ik het kan testen. over de SEO-unit. voeg die toe, maar exacte keuzes wil ik nu nog niet maken. De inhoud van de website wordt deels of helemaal dynamisch dus ik vraag mij af of pre-redneren dan wel de juiste keuze is."
**AI Response**: "Pushed 1681d03 and dispatched a test-only deploy (run 644, queued behind the PR run). Added unit U6 seo-and-performance to unit-of-work.md with a considerations document (current state, five options A-E, open questions); no technical choice made. Key point: build-time prerendering freezes dynamic content until the next build, so it fits only content that changes with releases; the CMS host already has a PrerenderedPages mode (Andrea) which is a candidate for dynamic content."
**Context**: Interim deploy and unit planning.
---
@@ -36,6 +36,11 @@
- **Design stages**: NFR Requirements and NFR Design (performance with effects, accessibility). No Functional Design (design exists).
- **Requirements**: FR-2, FR-12 (E part), FR-19 (E part), NFR-1, NFR-2, NFR-3.
### U6 — seo-and-performance (added 2026-11-11, choices open)
- **Purpose**: findability and speed of the public pages (prerendering or server rendering of content, structured data, robots/sitemap/meta per environment, measured performance budgets).
- **Status**: scope and options only, see `unit-u6-seo-and-performance.md`; **no technical choice made**; comes after U5 unless the owner moves it. Whether pre-rendering is the right approach depends on how dynamic the content becomes (open question 1).
- **Requirements**: new NFR group (to be added when planned).
## External units (CMS builder, SlpModularCms — feature `contact-forms-module`)
| Id | Content | Base |
|---|---|---|
@@ -0,0 +1,37 @@
# Unit U6 — SEO and performance (added 2026-11-11, choices deliberately open)
Added at the request of the product owner after the interim test build. **No technical choices have been made yet**; this document records the goal, the current state, the options and the questions to settle before the unit is planned. Position in the order: after U5 (variant E), unless the owner moves it.
## Goal
Make the public pages findable and fast: content visible to crawlers and to link previews without relying on JavaScript timing, structured data for the business and its packages, sensible indexing per environment, and measured performance budgets.
## Current state (measured or read from the code, 2026-11-11)
- Client-rendered SPA (React, Vite, hash routing, one page). `index.html` contains only title, description and `lang="nl"`; hero, about, process and contact text are rendered by JavaScript. Packages are fetched from `/api/v1/offerings` after load.
- Build output: JS 467 kB (152 kB gzip), CSS 59 kB; variant E is a separate lazy chunk; fonts self-hosted; the about photo is lazy with WebP variants.
- Missing: `robots.txt`, `sitemap.xml`, canonical URL, Open Graph/Twitter tags, structured data (JSON-LD), favicon set. Test and production share one bundle, so nothing environment-specific (such as "do not index test") can be baked into the build today.
- Accessibility is covered by unit tests (landmarks, contrast, focus, skip link); no Lighthouse or real screen-reader run has been done yet.
## The central question: is pre-rendering the right choice when the content becomes (partly) dynamic?
Pre-rendering at **build time** freezes the content at the moment of the build. If packages (and later more text) come from the CMS, the HTML would be stale until the next build, unless a CMS change triggers a rebuild. So build-time pre-rendering is only right for content that changes together with a release.
Options to compare (none chosen):
| Option | What it is | Fresh content | Cost / risk |
|---|---|---|---|
| A. Build-time prerender of the static parts only | Hero, about, process, contact text in the HTML at build; dynamic blocks (packages) still client-side | static parts yes, dynamic no | small; packages stay invisible to crawlers that do not run JS |
| B. Build-time prerender plus a data snapshot | Build fetches the offerings and bakes them in; client refreshes on load | stale until rebuild; needs a rebuild trigger on CMS change | pipeline coupling to the CMS API |
| C. Render in the CMS host on request or on publish | The .NET host that already serves the site (WebsiteMode `SpaFallback` for SLP; `PrerenderedPages` exists for the Andrea host) serves HTML that includes current data | yes | server-side work in the CMS repo; follows the pattern already used for Andrea |
| D. Client-only with JS-injected structured data | Keep the SPA; add JSON-LD, meta tags and sitemap, generated from the API data in the browser | yes, but depends on the crawler rendering JS | cheapest; weakest guarantee |
| E. Hybrid (A for static text + D or C for data) | Static text prerendered; dynamic parts via C or D | mixed | most flexible; two mechanisms |
## Elements that are independent of that choice
`robots.txt` and indexing rules per environment (test must not be indexed), `sitemap.xml`, canonical URL, Open Graph/Twitter tags, favicon set, JSON-LD for the organisation, performance budget and a Lighthouse CI/measurement step, image dimensions and `fetchpriority` on the LCP element, font preloading for the display face.
## Questions to settle before planning (not asked yet)
1. Which parts of the page will really be dynamic, and how often do they change (packages only, or also texts)?
2. Who serves the public HTML for SLP Software in production (the CMS host fallback or a separate static server), and can that host render HTML itself?
3. How strict must "fresh within minutes" be for crawlers, versus "fresh at the next release"?
4. How should test environments be kept out of search results (robots, headers, auth)?
5. Is a measured Lighthouse score a release gate?
## Requirements touched
New NFR group "SEO and performance" to be added to `requirements.md` when the unit is planned. Security Baseline applies to any new header or script (CSP, no new third-party scripts).