From 01fcfeefea3d4eb16c088a478541a946b470cab9 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sat, 31 Oct 2026 23:09:33 +0100 Subject: [PATCH] Adds the fallbacks for visitors without JavaScript The mobile menu works through CSS, and controls that need JavaScript are hidden without it. The contact photo gets its own preload, and the tests cover the new Reveal behaviour, the first row and the noscript markup. Co-Authored-By: Claude Opus 5.5 --- .../features/prerendering/aidlc-state.md | 2 +- .../code/verification-log.md | 2 +- .../display-fallbacks-code-generation-plan.md | 19 ++- .../ContactDetails/ContactDetails.test.tsx | 10 ++ .../ContactDetails/ContactDetails.tsx | 1 + .../DeferredImage/DeferredImage.test.tsx | 81 +++++++++ .../components/FilterBar/FilterBar.test.tsx | 18 ++ web/src/components/FilterBar/FilterBar.tsx | 1 + web/src/components/Footer/Footer.test.tsx | 10 ++ web/src/components/Footer/Footer.tsx | 2 +- web/src/components/Footer/FooterColumn.tsx | 10 +- web/src/components/Hero/Hero.tsx | 1 + web/src/components/Hero/HeroArrows.tsx | 2 + web/src/components/Hero/HeroPauseButton.tsx | 1 + .../components/Hero/hero.noscript.test.tsx | 26 +++ .../components/NavigationBar/MobileNav.tsx | 2 + .../NavigationBar/MobileNavGroup.tsx | 1 + .../components/NavigationBar/NavSubmenu.tsx | 3 + .../NavigationBar/NavigationBar.tsx | 12 +- .../NavigationBar/NoScriptNav.test.tsx | 91 ++++++++++ .../components/NavigationBar/NoScriptNav.tsx | 35 ++++ .../components/NoScript/noScriptCss.test.tsx | 112 ++++++++++++ web/src/components/NoScript/noScriptCss.ts | 59 ++++++- .../PortfolioGrid/PortfolioGrid.test.tsx | 142 +++++++++++++++- .../PortfolioGrid/PortfolioGrid.tsx | 21 ++- web/src/components/Reveal/Reveal.test.tsx | 71 +++++++- .../home/Testimonials/Testimonials.test.tsx | 16 ++ .../home/Testimonials/Testimonials.tsx | 2 +- .../PortfolioGallery.test.tsx | 19 ++- web/src/displayHydration.test.tsx | 160 +++++++++++++++++- web/src/displayPrerender.test.tsx | 76 +++++++++ web/src/hooks/useReveal.test.tsx | 111 ++++++++++-- web/src/lib/firstRow.test.ts | 160 ++++++++++++++++++ web/src/lib/revealPhase.test.ts | 126 ++++++++++++++ web/src/routes/contact.tsx | 27 ++- web/src/seo.test.ts | 59 +++++++ web/src/test/firstRowArbitraries.ts | 41 +++++ web/src/test/revealArbitraries.ts | 45 +++++ 38 files changed, 1510 insertions(+), 67 deletions(-) create mode 100644 web/src/components/Hero/hero.noscript.test.tsx create mode 100644 web/src/components/NavigationBar/NoScriptNav.test.tsx create mode 100644 web/src/components/NavigationBar/NoScriptNav.tsx create mode 100644 web/src/components/NoScript/noScriptCss.test.tsx create mode 100644 web/src/displayPrerender.test.tsx create mode 100644 web/src/lib/firstRow.test.ts create mode 100644 web/src/lib/revealPhase.test.ts create mode 100644 web/src/test/firstRowArbitraries.ts create mode 100644 web/src/test/revealArbitraries.ts diff --git a/aidlc-docs/features/prerendering/aidlc-state.md b/aidlc-docs/features/prerendering/aidlc-state.md index 0e430d1..7f0a449 100644 --- a/aidlc-docs/features/prerendering/aidlc-state.md +++ b/aidlc-docs/features/prerendering/aidlc-state.md @@ -5,7 +5,7 @@ - **Feature Slug**: prerendering - **Project Type**: Brownfield - **Start Date**: 2026-10-31T14:15:01Z -- **Current Stage**: CONSTRUCTION - Code Generation (unit 2: display-fallbacks): B0 and B1 done; B2, B3 and B4 running +- **Current Stage**: CONSTRUCTION - Code Generation (unit 2: display-fallbacks): B0 to B4 done; B5 browser tests running - **Branch**: feature/prerendering (from master c4c2f83); commits and pushes allowed for this feature (owner, 2026-10-31) - **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-prerendering diff --git a/aidlc-docs/features/prerendering/construction/display-fallbacks/code/verification-log.md b/aidlc-docs/features/prerendering/construction/display-fallbacks/code/verification-log.md index 381eb8e1..d23f6e8 100644 --- a/aidlc-docs/features/prerendering/construction/display-fallbacks/code/verification-log.md +++ b/aidlc-docs/features/prerendering/construction/display-fallbacks/code/verification-log.md @@ -6,7 +6,7 @@ Status values: `open` (not yet settled), `OK`, `BLOCKED`, `DEVIATION`. |---|---|---|---|---|---| | V-D1 | `useLayoutEffect` in `Reveal` during `renderToString`, `hydrateRoot` and StrictMode (double effect): no warning, no mismatch, the hide step runs once visibly. | 2 | No warning, no mismatch, hide step visible once. | Unit test src/displayHydration.test.tsx (hydrate() under StrictMode, rectangles stubbed): no recoverable error, in-view Reveal stays visible, below-the-fold becomes hidden after hydration and visible after the fake observer fires; no console warning in the run. Browser probe on the built site (rAF sampling of getComputedStyle opacity from the first frame, 2.5 s; /over-mij, /soorten-fotoshoots, /portfolio at 412x823; /, /over-mij at 1350x940; / at 412x823): elements in view at the first sample (2, 2, 1, 0, 2, 0 of 5, 11, 3, 14, 5, 14) were 1 in every frame; elements below the fold (3, 9, 2, 14, 3, 14) ended hidden with opacity values only 0 or 1, never an intermediate value; no console error or warning. /soorten-fotoshoots: first frame with a 0 is frame 16 of 456 (the hide happens after hydration, no transition). reducedMotion reduce (/ and /over-mij at 412x823, /soorten-fotoshoots): every sample 1, nothing hidden. /portfolio grid wrapper at 412x823 now stays visible (the BR-RVL-13 defect). | OK | | V-D2 | With JavaScript on, the twin image is never requested (request log on `/soorten-fotoshoots` and `/portfolio` before any scroll), and the preload scanner does not read inside `noscript`. Also that Emotion writes the shared class once (one `