Continuous Integration / check (pull_request) Successful in 1m57s
Continuous Integration / build-test (pull_request) Skipped
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / lighthouse (pull_request) Successful in 9m0s
Continuous Integration / deploy-production (pull_request) Skipped
The plain HTML is painted at scale 1.06 and the slider zooms it out to 1 after hydration, like the other photos: same first frame (no CLS), and the LCP does not wait for hydration. Assumptions 15 and 16 recorded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
13 KiB
13 KiB
Hero module: assumptions and deferred questions (ASF side)
Written while Bryan was away; he decides later. Each point: question, assumption, what changes with another answer, where in the code.
| # | Question | Assumption | If the answer differs | Where |
|---|---|---|---|---|
| 1 | Focus points of the 8 photos | Estimates from the seed (e.g. hero-8 0.50/0.55) | Change x/y in the seed (CMS) and in the baked values | web/src/content/heroContent.ts, web/contract/host-injection/hero/seed.json |
| 2 | Is the baked hero cropped around the focus point too? | Yes: object-position from the estimates, so baked and live look the same | Pass focus: null for the baked slides to get plain centre crop |
heroContent.ts |
| 3 | Button target #anchor and https: plain link, /path: router link |
As said | Make all plain links | web/src/components/Hero/HeroButton.tsx |
| 4 | Single display (one photo) or slideshow with one slide | No arrows, pause or progress bar for one slide | Show controls anyway | Hero.tsx (shown.length > 1) |
| 5 | Title with a new line | <br> in the plain HTML, pre-line in the slider |
One line only | heroHtml.ts, Hero.tsx |
| 6 | Where does the head preload marker come from | Build step adds it to the finished HTML (React cannot write a head comment) | Host adds the head region itself | web/config/heroPreload.ts |
| 7 | Hero texts (aria, baked title, alts) | In nl.json, block hero |
Other wording: edit the file | web/src/i18n/nl.json |
| 8 | Without a host block the site asks /api/v1/hero (8 s time-out) |
Yes, like packages and banners | Remove the call: baked only | web/src/components/Hero/useHero.ts |
| 9 | Style of the plain hero before hydration | Matches the slider's first frame (checked by screenshot at 1280 and 390 px) | Adjust CSS | .cms-hero-* in web/src/theme.ts |
| 10 | AVIF for slides 2..n only | As agreed with the CMS session | Add AVIF to the first photo and its preload (then two fetches) | Hero.tsx (SlidePicture) |
| 11 | The first photo, title and buttons stay the plain HTML after hydration (never replaced); the slider adds the other photos on top | Yes: replacing the nodes at hydration risks a late LCP. Side effect: the first photo has no slow zoom and is not in a role=group slide | Go back to a full slider render (one component), accepting the DOM replacement | Hero.tsx (HeroFrame), useHero.ts (regionHero) |
| 12 | Planning (from/to dates) and a hero-wide on/off switch | Deliberately not built: the hero is always there, a hero without usable slides keeps the baked one | Add in the CMS; the site already handles a 204 and an empty hero | CMS (module), useHero.ts |
| 13 | Content of the ASF test seed | The 8 existing photos with focus estimates (#1), texts like the baked ones | Edit in the CMS admin; update heroContent.ts if the baked fallback should match |
web/contract/host-injection/hero/seed.json |
| 14 | Baked hero after a CMS change | The baked hero is only a fallback and is not rebuilt from the CMS any more (no nightly build) | Re-bake by hand in heroContent.ts when the real hero changes for good |
heroContent.ts |
| 15 | Pause on mouse hover | Removed on purpose (Bryan, 2026-11-17): a full-screen hero almost always has the pointer over it. Kept: the explicit pause button (WCAG 2.2.2), no autoplay with prefers-reduced-motion, pause when the tab is hidden, and pause while keyboard focus is on the controls (a deliberate action; a click on an arrow does not pause). Touch and swipe do not pause either: a swipe restarts the progress bar of the new slide |
Add hover back: onPointerEnter/onPointerLeave in useHeroSlider.ts |
web/src/components/Hero/useHeroSlider.ts |
| 16 | Slow zoom on the first photo (supersedes #11 in part; Bryan chose the full slider render, 2026-11-17) | The first photo zooms like the others, without replacing the plain HTML: the plain HTML is painted at scale 1.06 (CSS .cms-hero-image), the slider sets data-zoom after hydration and it zooms out to 1 over 9 s. Same first frame before and after hydration, so no CLS, and the LCP does not wait for hydration (replacing the nodes made the LCP 5.3 s in the first design). Reduced motion: no scale at all |
Replace the nodes at hydration (one component); measure LCP first | theme.ts, Hero.tsx |
What Bryan has to check later
- Look at the home page on ASF-test after the seed, on phone and desktop: crop around the focus points (#1, #2), the first frame before the slider starts (#9, #11), the title and buttons (#3, #5).
- Does the first photo without slow zoom (#11) bother you? Then choose the full slider render and accept the later LCP.
- Wording of the hero texts in
nl.json(#7). - Whether planning and an on/off switch are wanted (#12).
- Keep an eye on the LCP of
/in the Lighthouse run on test (the host measures it after the seed).