Loads the light logo after the page load
Lazy loading saved its bytes during page load, but left the logo empty for a moment when navigating to the homepage on a wide screen. Also adds the second unit's code summary and the shared docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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): measured; logo fix and summary running
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation (unit 2: display-fallbacks): built; awaiting approval
|
||||
- **Branch**: feature/prerendering (from master c4c2f83); commits and pushes allowed for this feature (owner, 2026-10-31)
|
||||
- **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-prerendering
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
- [ ] NFR Requirements - SKIP
|
||||
- [ ] NFR Design - SKIP
|
||||
- [ ] Infrastructure Design - EXECUTE (unit 3)
|
||||
- [ ] Code Generation - EXECUTE (per unit): 1 Start migration and script step ✅ (a1d5c1e; continue with Start, owner, 2026-10-31) → 2 Fade-in, no JavaScript, first photo → 3 Hosting and targets
|
||||
- [ ] Code Generation - EXECUTE (per unit): 1 Start migration and script step ✅ (a1d5c1e; continue with Start, owner, 2026-10-31) → 2 Fade-in, no JavaScript, first photo (built, awaiting approval) → 3 Hosting and targets
|
||||
- [ ] Build and Test - EXECUTE
|
||||
|
||||
### 🟡 OPERATIONS PHASE
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# Code Summary - Unit 2: Display fallbacks
|
||||
|
||||
Plan: [display-fallbacks-code-generation-plan.md](../../plans/display-fallbacks-code-generation-plan.md). Worktree `AndreaSlopFotografie-prerendering`, branch `feature/prerendering`, on top of unit 1 (`8dc120e`). File list from `git diff --name-status 8dc120e HEAD -- web` plus the uncommitted logo fix (see below).
|
||||
|
||||
## Status
|
||||
- Steps 1 to 29 done (checked in the plan). Verification (Step 23): lint, format, test, build, e2e, audit:deps, audit:dev green.
|
||||
- Measurement (Part H) done: [measurement-display.md](measurement-display.md). BR-DMS-05 decision rule not triggered (`/portfolio` mobile E 0.93, D 0.91, E2 0.93; desktop 0.99).
|
||||
- After the measurement the logo flash (V-D7) was fixed; see "Logo fix".
|
||||
|
||||
## Commits
|
||||
`4412515` Reveal, deferred images and the first row; `01fcfee` fallbacks without JavaScript; `2754890` browser tests; `d11fcb1` verified before measuring; `b965b8a` measurement. The logo fix is to be committed by the main session (to be filled by the main session).
|
||||
|
||||
## Files
|
||||
|
||||
### Reveal (BR-RVL-01 to 14; FR-PR-09, 10)
|
||||
- Created: `web/src/lib/revealPhase.ts` (+ test, P18 to P21), `web/src/test/revealArbitraries.ts`.
|
||||
- Modified: `web/src/hooks/useReveal.ts` (+ test), `web/src/components/Reveal/Reveal.tsx` (+ test): visible in the HTML and first render, a layout effect hides an element wholly below the viewport, no transition on hiding.
|
||||
|
||||
### Deferred images and no-JavaScript CSS (BR-IMG-01 to 10; FR-PR-11)
|
||||
- Created: `web/src/components/NoScript/noScriptCss.ts` (+ test), `NoScriptStyles.tsx`.
|
||||
- Modified: `web/src/components/DeferredImage/DeferredImage.tsx` (+ test) (`<noscript>` twin), `web/src/routes/__root.tsx` (head `<noscript><style>`).
|
||||
|
||||
### Menu without JavaScript (BR-NAV-01 to 12; FR-PR-12)
|
||||
- Created: `web/src/components/NavigationBar/NoScriptNav.tsx` (+ test).
|
||||
- Modified: `NavigationBar.tsx` (+ test), `MobileNav.tsx`, `MobileNavGroup.tsx`, `NavSubmenu.tsx` (ids and `data-*` markers).
|
||||
|
||||
### Other fallbacks (BR-NJS-01 to 11; FR-PR-13, 22)
|
||||
- Modified: `Hero/Hero.tsx`, `HeroArrows.tsx`, `HeroPauseButton.tsx` (+ `hero.noscript.test.tsx`), `FilterBar/FilterBar.tsx`, `home/Testimonials/Testimonials.tsx`, `Footer/Footer.tsx`, `FooterColumn.tsx` (+ tests): `data-requires-js` markers.
|
||||
|
||||
### First photo and preload (BR-PRE-01 to 12; FR-PR-21)
|
||||
- Created: `web/src/lib/firstRow.ts` (+ test, P24, P25), `web/src/test/firstRowArbitraries.ts`.
|
||||
- Modified: `web/src/seo.ts` (`preloadImage`, P22) (+ test), `PortfolioGrid/PortfolioGrid.tsx` (`eagerFirstRow`, `<picture>` tiles) (+ test), `portfolio/PortfolioGallery/PortfolioGallery.tsx` (+ test), `routes/portfolio.tsx`, `routes/contact.tsx`, `ContactDetails/ContactDetails.tsx` (+ test).
|
||||
|
||||
### Tests (BR-DTS-01 to 05)
|
||||
- Created: `web/src/displayHydration.test.tsx`, `web/src/displayPrerender.test.tsx`, `web/e2e/{displayHtml,noJs,noJsMenu,reveal,images}.e2e.ts`.
|
||||
- Modified: `web/e2e/interaction.e2e.ts` (comment only), `web/e2e/support/browser.ts`.
|
||||
|
||||
### Documentation
|
||||
- `construction/display-fallbacks/code/`: `baseline-checks.md`, `verification-log.md`, `proof-report.md`, `measurement-display.md`, this file. BR-PRE-05 and the `NavigationBar` row in the functional design were amended for the logo fix.
|
||||
|
||||
## Logo fix (after V-D7)
|
||||
The measurement showed that a permanently lazy light logo flashes (one empty frame, local server) on a client navigation from a page other than `/` to `/` at 1350 px, because a lazy `display: none` image is only fetched once shown. Fix (owner decided): `NavigationBar` sets `loading="lazy"` on the light logo only while `!isHome && !pageLoaded` (`usePageLoaded`; the first render equals the HTML). Evidence in Chrome (probe and `images.e2e.ts`): at 412 and 1350 px on `/over-mij` the light logo is requested once, after `load`, never before; the flash is gone on navigation to `/` after load. A navigation before `load` may still flash briefly (accepted). Tests: a case in `NavigationBar.test.tsx`; `images.e2e.ts` "logo's" (requested once after load off `/`, before load only on `/`, no flash on navigation) replaces the old "only on `/`" test.
|
||||
|
||||
`/privacyverklaring` and the 404 page: the LCP element is the lazy footer logo (alt "Andrea Slop Fotografie", lazy since before this unit); the header logo is eager. Lab effect, nothing changed.
|
||||
|
||||
## Test inventory
|
||||
- Unit: 130 files, 1277 tests (baseline 123 files, 1179 tests), coverage thresholds met, seed 2056055883 in the last run. Properties: P18, P19 (`startsHidden`), P20, P21 (`nextRevealPhase`), P22 (`preloadImage`), P24, P25 (`firstRow`, `firstRowPreloads`); P23 is an example test.
|
||||
- Browser: 9 files, 214 tests (baseline 4 files, 77 tests in the Step 1 count; 212 before the logo fix, +2).
|
||||
- Existing tests changed: see plan section 6 (the `useReveal` cases, `PortfolioGrid`, `PortfolioGallery`, the `noScriptCss` group rule, `interaction.e2e.ts` comment, and now the logo test).
|
||||
|
||||
## Verification points (condensed, details in verification-log.md)
|
||||
V-D1, V-D2, V-D3, V-D5, V-D6, V-D7, V-D8, V-D9, V-D11, V-D12, V-D13, V-D14, V-D15 OK. V-D4: Chrome OK (scroll position kept); **Firefox, Safari and Chrome on Android need a person**. V-D10: **BLOCKED**, no trace (`pnpm exec lighthouse` does not exist); the heading is the LCP element on `/` in the report and the probe.
|
||||
|
||||
## Deviations
|
||||
None from the design. V-D7 found the logo flash, fixed as above (amends BR-PRE-05).
|
||||
|
||||
## What unit 3 can rely on
|
||||
Every page is visible without JavaScript; photos show through `<noscript>` twins; the menu works through `:target`; the head `<noscript><style>` carries all no-JS CSS; `preloadImage` and `firstRow` exist for preload links; nothing in server rules was changed (nginx, IIS, CSP untouched). Unit 3 measures again at the end.
|
||||
|
||||
## Open points for the owner
|
||||
- V-D4 in Firefox, Safari and Chrome on Android (human check).
|
||||
- V-D10 (no trace).
|
||||
- Mobile scores still under 0.9: `/` 0.85, gezin 0.89, loveshoot 0.88 (BR-DMS-04); `/portfolio` LCP 3232 ms (photo is the largest paint) with score 0.93.
|
||||
- A navigation before `load` can still flash the light logo briefly.
|
||||
+3
-3
@@ -72,7 +72,7 @@ Script transfer on mobile (median, bytes): `/` 222,660 (A 221,110), `/over-mij`
|
||||
- `/contact`: equal to A (0.94, 3007 ms); better than master.
|
||||
- `/portfolio`: 0.93 against A 0.94, LCP 3232 against 3007 (+225 ms), because a photo is now the largest paint. Better than B (0.90, 3607) and than D (0.91, 3459).
|
||||
- `/`: 0.85 and 4356 ms, equal score and +76 ms against A (expected "unchanged").
|
||||
- `/privacyverklaring` (+150 ms) and not found (+73 ms) LCP are later than A with equal scores; the LCP element is the dark logo, now lazy. Not an expected change; reported.
|
||||
- `/privacyverklaring` (+150 ms) and not found (+73 ms) LCP are later than A with equal scores; the LCP element is the footer logo (`alt` "Andrea Slop Fotografie", `loading="lazy"`, unchanged by this unit), the header logo being eager. A lab effect; nothing changed.
|
||||
|
||||
## BR-DMS-04: still open
|
||||
|
||||
@@ -91,9 +91,9 @@ Script transfer on mobile (median, bytes): `/` 222,660 (A 221,110), `/over-mij`
|
||||
## V-D7: lazy logos and contact portrait
|
||||
|
||||
- Image KB requested before the real LCP on non-home pages: the light logo (24.8 KB) is no longer in the list; only the dark logo (23.5 KB) is (`/over-mij` 107 KB, soorten 97 KB). `/` still requests both logos (total 272 KB with the 224 KB hero). The contact portrait is 5.9 KB on mobile contact, where it is displayed.
|
||||
- Score and LCP A to U2: see the BR-DMS-03 list. The gains on photo pages combine this with the visible `Reveal`; this measurement does not separate the two.
|
||||
- `/privacyverklaring` and not found: the LCP element is the lazy footer logo (alt "Andrea Slop Fotografie"); the header logo is eager. The footer is unchanged by this unit, so the +150 and +73 ms are a lab effect, not the logo change. Score and LCP A to U2: see the BR-DMS-03 list. The gains on photo pages combine this with the visible `Reveal`; this measurement does not separate the two.
|
||||
- Logo flash, probe on client navigation `/` to `/over-mij` and back (logos already cached from `/`): no frame with a displayed, incomplete logo.
|
||||
- **Finding**: fresh load of `/over-mij`, then client navigation to `/` at 1350 px: the light logo is requested only then, and 1 sampled frame shows the light logo displayed (46 px) while incomplete with the dark logo already hidden (an empty logo area for that frame on a local server; longer on a slow network). At 412 px no such frame (light logo not displayed). Not fixed; for the owner.
|
||||
- **Finding**: fresh load of `/over-mij`, then client navigation to `/` at 1350 px: the light logo is requested only then, and 1 sampled frame shows the light logo displayed (46 px) while incomplete with the dark logo already hidden (an empty logo area for that frame on a local server; longer on a slow network). At 412 px no such frame (light logo not displayed). **Fixed afterwards**: the light logo is lazy only until `load`, then eager; verified in Chrome and in `images.e2e.ts`. A navigation before `load` may still flash briefly (accepted).
|
||||
|
||||
## V-D10: hero photo and LCP in a trace
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ Status values: `open` (not yet settled), `OK`, `BLOCKED`, `DEVIATION`.
|
||||
| V-D4 | Fragment navigation to a fixed element does not scroll in Firefox and Safari, and Chrome on Android (only desktop Chrome was probed). If one scrolls, the fixed `header` target moves to a zero-size fixed element. | 17 | Chrome part OK; Firefox, Safari and Chrome on Android need a person. | e2e/noJsMenu.e2e.ts: opening via #mobile-nav and closing via #site-header leave scrollY at 300 on /over-mij and / at 390 x 800. | open (Chrome OK, other browsers need a person) |
|
||||
| V-D5 | The comparison of BR-DMS-05 (E against D on mobile, three runs each, same machine) and its report to the owner when E is below 0.9 or below D. | 26 | E mobile 0.93, D 0.91, E2 0.93; desktop 0.99 for all; rule not triggered | measurement-display.md | OK |
|
||||
| V-D6 | Height of every `Reveal` at 320, 360, 412, 768, 1350 px wide against the limit of BR-RVL-13. | 18 | Every hidden Reveal stays far below the limit (320: 4233 px, 360: 4833, 412: 6358, 768: 8033, 1350: 7333). | e2e/reveal.e2e.ts, hidden Reveals after hydration plus 2 s, tallest per page (px) at 320/360/412/768/1350: / 649/649/649/998/585; /over-mij 465/443/512/230/408; /portfolio 481/541/619/511/223; /soorten-fotoshoots 551/479/391/470/470; newborn 784/712/712/600/624; zwangerschap 784/712/712/600/600; gezin 784/712/712/600/600; loveshoot 736/688/688/568/336; portret 736/688/688/568/336; /contact 670/0/0/0/0; /privacyverklaring 0. | OK |
|
||||
| V-D7 | After the gate measurement: whether `loading="lazy"` on the light logo and the contact portrait changes score and LCP as estimated; that the logo does not flash on `/` or on a client navigation from `/` to another page and back. | 24, 25 | Light logo gone from pre-LCP bytes off the home page; no flash with cached logos; one empty-logo frame on fresh /over-mij then client nav to / at 1350 px | measurement-display.md | DEVIATION |
|
||||
| V-D7 | After the gate measurement: whether `loading="lazy"` on the light logo and the contact portrait changes score and LCP as estimated; that the logo does not flash on `/` or on a client navigation from `/` to another page and back. | 24, 25 | Light logo gone from pre-LCP bytes off the home page; no flash with cached logos; one empty-logo frame on fresh /over-mij then client nav to / at 1350 px; fixed: light logo lazy only until load (usePageLoaded), requested once after load at 412 and 1350 px, no flash after load; a navigation before load may still flash (accepted) | measurement-display.md, e2e/images.e2e.ts | OK |
|
||||
| V-D8 | The raw-HTML e2e tests that count `img` or links (`rawHtml.e2e.ts`) with `noscript` content present. | 20 | The unit-1 raw-HTML tests pass unchanged with noscript content present. | rawHtml.e2e.ts uses toContain on nav targets and removes noscript before reading text; it counts no img and no links, so no change was needed. Only the comment in the interaction.e2e.ts V15 block was updated. | OK |
|
||||
| V-D9 | The visible focus ring of the two menu links in Chakra's reset (a bare `a` outside Chakra components). | 17 | The focused open and close links have a visible focus ring. | e2e/noJsMenu.e2e.ts: computed outline width of nav-noscript-open and nav-noscript-close, reached with Tab, is at least 2 px. | OK |
|
||||
| V-D10 | Whether Chrome really excludes the viewport-filling hero photo from LCP (so text is the candidate on `/`), by a trace. Only explains `/`; changes no rule. | 25 (only if a trace exists) | Trace not obtained: pnpm exec lighthouse not found | measurement-display.md | BLOCKED |
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ Text alternative: a plain high-priority photo is preloaded by React, a photo in
|
||||
| BR-PRE-02 | Explicit links are only for images React cannot hoist. That is `/contact` from `lg`: the photo is a `<source media="(min-width: 64em)" srcSet>` in a `<picture>` and the `<img>` has a `data:` placeholder, so nothing is preloaded today and it is the largest paint at 1350 x 940. The contact route's `head()` adds `preloadImage(image, { media: ASIDE_MEDIA })`: `rel="preload"`, `as="image"`, `href` the hashed URL, `fetchPriority="high"`, `media="(min-width: 64em)"`. Below `lg` the media query keeps it from downloading. | FR-PR-21 |
|
||||
| BR-PRE-03 | `preloadImage(image: ContentImage, options?: { media?: string }): HeadLink` is added to `seo.ts` (component-methods.md named it `preloadImage(src)`). It returns a plain object with `rel`, `as`, `href` (= `image.src`), `fetchPriority` and, only when given, `media`. `seo.ts` has a 100 % coverage threshold: examples and property P22 cover it. `pageHead` is not changed: passing every page's first photo to it would write the same preload twice (BR-PRE-04). The application design said pages pass their first photo to `pageHead`; the investigation shows React already does it. | FR-PR-21; D8 |
|
||||
| BR-PRE-04 | A photo is declared once. A build test over all 12 HTML files asserts: every `preload as="image"` `href` occurs once; every page that has a `priority` photo has its preload; `/contact` has the `media` link and no other link for that file; `/portfolio` has React's link for tile 1 and exactly two `media` links (48em and 64em) for tiles 2 and 3. This also catches a React upgrade that changes the hoisting. | FR-PR-21; NFR-PR-Q-01 |
|
||||
| BR-PRE-05 | Nothing is preloaded that is not shown. Measured on `dist/client`: every page preloads both logos, `/contact` preloads the 72 px portrait (5 KB) that is `display: none` from `lg`. Fixes, both by `loading="lazy"` (a lazy image is neither fetched while `display: none` nor hoisted by React): the contact page's narrow portrait; the light logo on every page except `/` (on those pages the header is never transparent, so the light logo is never shown). `NavigationBar` knows `isHome` from the pathname in its first render, which is the same on the server and in the browser (the prerendered 404 has `/404`, never `/`). On `/` both logos stay eager, because both are shown in some state (dark below `lg` and after scrolling 150 px, light over the hero from `lg`). The light logo is 25 KB, about 140 ms of simulated LCP at the Lighthouse throttle on ten pages (estimate from the 5.4 ms per KB slope in the business logic model, to be measured). Verified in Chrome on the built `/over-mij`: with `loading="lazy"` on the light logo and its preload link removed, only the dark logo is requested. **Decided (O4);** the effect on score and LCP is measured (BR-DMS-03, V-D7). | FR-PR-21; NFR-PR-P-01 |
|
||||
| BR-PRE-05 | Nothing is preloaded that is not shown. Measured on `dist/client`: every page preloads both logos, `/contact` preloads the 72 px portrait (5 KB) that is `display: none` from `lg`. Fixes, both by `loading="lazy"` (a lazy image is neither fetched while `display: none` nor hoisted by React): the contact page's narrow portrait; the light logo on every page except `/` (on those pages the header is never transparent, so the light logo is never shown). `NavigationBar` knows `isHome` from the pathname in its first render, which is the same on the server and in the browser (the prerendered 404 has `/404`, never `/`). On `/` both logos stay eager, because both are shown in some state (dark below `lg` and after scrolling 150 px, light over the hero from `lg`). The light logo is 25 KB, about 140 ms of simulated LCP at the Lighthouse throttle on ten pages (estimate from the 5.4 ms per KB slope in the business logic model, to be measured). Verified in Chrome on the built `/over-mij`: with `loading="lazy"` on the light logo and its preload link removed, only the dark logo is requested. **Amended after the measurement (V-D7):** the light logo is lazy only until the page has loaded (`loading` is `lazy` while `!isHome && !pageLoaded`, `usePageLoaded`; the first render still equals the HTML). A lazy `display: none` image is not fetched until it is shown, so it flashed on a client navigation to `/`; after `load` it is fetched, so it is ready. A navigation before `load` may still flash briefly (accepted). **Decided (O4);** the effect on score and LCP is measured (BR-DMS-03, V-D7). | FR-PR-21; NFR-PR-P-01 |
|
||||
| BR-PRE-06 | Largest paint per page and screen size, measured in Chrome 2026-10-31 at 412 x 823, 768 x 1024 and 1350 x 940 (unthrottled, Reveal forced visible to simulate this unit) and checked against the Lighthouse reports: `/`: the h1 text at every size (the hero photo is never reported, probably because it covers the whole viewport; not confirmed); `/over-mij`, `/soorten-fotoshoots` and the five shoot pages: their `priority` photo at every size; `/contact`: the intro text below `lg`, the aside photo from `lg`; `/portfolio`: a grid photo at every size once the grid is visible (a different tile per width, always one of the first-row tiles); `/privacyverklaring` and the 404 page: text or the footer logo. Table with names: [domain-entities.md § 6](domain-entities.md). | FR-PR-21 |
|
||||
| BR-PRE-07 | The hero photo on `/` keeps its React-written preload with `fetchPriority="high"` although the largest paint there is text: it is the first thing a visitor sees. No explicit link is added. | FR-PR-21 |
|
||||
| BR-PRE-08 | **The first row of the portfolio grid is eager and preloaded** (O2, final; FR-PR-21 has no exception for `/portfolio`). "First row" is a number of tiles that depends on the column count, which is CSS only (`base` 1 column, `md` from 48em 2 columns, `lg` from 64em 3 columns, the values `PortfolioGrid` uses for `gridTemplateColumns`; the build does not know the width). The grid places tiles row by row in reading order of the unfiltered list, so tile 1 is in the first row at every width, tile 2 from `md`, tile 3 from `lg` (probe: at 320 to 640 px only tile 1 starts in the first screen, at 768 to 1023 px tiles 1 and 2 form the first row, from 1024 px tiles 1 to 3). Tiles 4 and up stay deferred (`DeferredImage`, loaded after the `load` event when near); on a screen taller than one row, such as 768 x 1024 where tiles 3 and 4 start inside the screen, they are not eager either: "first row" is a column count, not a screen height. The rule is pure logic in `src/lib/firstRow.ts`: `firstRow(index, columns)` returns `'always'`, `{ media }` (the `min-width` query of the first breakpoint whose column count exceeds the index) or `null`. `PortfolioGrid`'s `eagerCount` prop (default 3) is replaced by `eagerFirstRow` (default `true`), and `PortfolioGallery` stops passing 0. History: the shared `PortfolioGrid` has had `eagerCount` (default 3, "the first row on desktop") since commit 18bf031; `PortfolioGallery` set it to 0 in 9efa7fc (2026-10-27) after measuring 0.80 eager against 0.91 deferred on mobile, when the grid faded in and its photos could never be the largest paint. That reason no longer holds for a grid in view (BR-RVL-03), the owner chose FR-PR-21 literally, and BR-DMS-05 re-checks the old result. The comment in `PortfolioGallery` ("No photo loads before the page has: the grid fades in, so its photos are never the largest paint, ... decision 2026-10-27") is replaced by: the first row loads eagerly, with preloads, because it is in view and is the largest paint; later rows wait for the page and for proximity; the 2026-10-27 measurement is repeated in BR-DMS-05. | FR-PR-21; decision 2026-10-27 (superseded) |
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ Text alternative: the shell holds the noscript CSS, navigation the noscript menu
|
||||
| `components/Reveal/Reveal.tsx` | Props unchanged. `data-reveal` `visible` or `hidden`. Style per phase as in [domain-entities.md § 2](domain-entities.md); the transition props only when `animated`; `_motionReduce` `{ opacity: 1, transform: 'none', transition: 'none' }`. |
|
||||
| `components/DeferredImage/DeferredImage.tsx` | Props unchanged. Returns a fragment: the existing `Image` plus `data-deferred`, and `<noscript><Image src={image.src} alt width height decoding="async" {...rest minus id, data-testid} /></noscript>` (BR-IMG-01). `ref`, `loading="lazy"` and the `src` logic stay on the first image only. |
|
||||
| `routes/__root.tsx` | `RootDocument` adds `<NoScriptStyles />` after `<HeadContent />` in `<head>`. |
|
||||
| `NavigationBar` | `chakra.header` gets `id={HEADER_ID}`; the hamburger gets `data-requires-js`; `NoScriptMenuOpen` renders before the button in the right-hand `div`; the light logo gets `loading="lazy"` when `!isHome` (BR-PRE-05). No change to the reducer, ARIA or focus code. |
|
||||
| `NavigationBar` | `chakra.header` gets `id={HEADER_ID}`; the hamburger gets `data-requires-js`; `NoScriptMenuOpen` renders before the button in the right-hand `div`; the light logo gets `loading="lazy"` when `!isHome && !pageLoaded` (`usePageLoaded`; BR-PRE-05, amended after V-D7). No change to the reducer, ARIA or focus code. |
|
||||
| `MobileNav` | `NoScriptMenuClose` as the first child of the content `Box`, before the `nav`. |
|
||||
| `MobileNavGroup` | Chevron button gets `data-requires-js`. |
|
||||
| `NavSubmenu` | Wrapper `Box` gets `data-submenu`, the panel `Box` `data-submenu-panel`, the chevron `data-requires-js`. |
|
||||
@@ -83,7 +83,7 @@ Text alternative: the shell holds the noscript CSS, navigation the noscript menu
|
||||
| `DeferredImage` | Image without `src`, `data-deferred`, plus noscript twin (not rendered in the browser) | `src` set after load and in view, as unit 1 |
|
||||
| `PortfolioGrid` | Tile by index: eager `Image`, `<picture>` tiles, deferred tiles (unfiltered list) | Filter applies, same rule on the filtered list |
|
||||
| `NoScriptStyles`, `NoScriptMenuOpen`, `NoScriptMenuClose` | `noscript` with children | Browser ignores the children |
|
||||
| `NavigationBar` light logo | `loading="lazy"` unless `pathname` is `/` (same on both sides) | Unchanged |
|
||||
| `NavigationBar` light logo | `loading="lazy"` unless `pathname` is `/` or the page has loaded (false in the server render and hydrating render, so the same on both sides) | Unchanged |
|
||||
| Hero, FilterBar, chevrons, hamburger | As unit 1, plus the marker attribute | Unchanged |
|
||||
|
||||
## 4. The 21 `Reveal` call sites
|
||||
|
||||
+3
-2
@@ -475,13 +475,13 @@ Preconditions for all of Part H: Step 23 green; the main session has confirmed t
|
||||
|
||||
## Part I: Documents (batch B8)
|
||||
|
||||
### Step 28: Code summary [ ]
|
||||
### Step 28: Code summary [x]
|
||||
|
||||
- Executor: Sonnet.
|
||||
- Do: write `aidlc-docs/features/prerendering/construction/display-fallbacks/code/code-summary.md` in the format of `construction/start-migration/code/code-summary.md`: status; commits (leave "to be filled by the main session"); files created, modified and removed (from `git status --short` and `git diff --stat`), grouped by the component groups of frontend-components.md, with the rule ids each implements; test inventory (files, counts, which properties P18 to P25 where, which existing tests changed and why: § 6 and the Step 14 and 20 records); the verification log V-D1 to V-D15 condensed; the Step 23 outcome; deviations (should be none); what unit 3 can rely on; open points for the owner (the BR-DMS-05 outcome if it triggered, V-D4 browsers, `/` and shoot-page scores).
|
||||
- Done when: the file exists and every file of the diff is listed.
|
||||
|
||||
### Step 29: Shared reverse-engineering delta [ ]
|
||||
### Step 29: Shared reverse-engineering delta [x]
|
||||
|
||||
- Executor: Sonnet.
|
||||
- Implements: NFR-PR-Q-05.
|
||||
@@ -523,6 +523,7 @@ Preconditions for all of Part H: Step 23 green; the main session has confirmed t
|
||||
| `src/components/PortfolioGrid/PortfolioGrid.test.tsx` | `eagerCount={3}` becomes the new prop; eager tile assertions follow BR-PRE-08 | The prop is replaced | 14 |
|
||||
| `src/components/portfolio/PortfolioGallery/PortfolioGallery.test.tsx` | Only an assertion that the first photos have no `src` before load, if there is one | `eagerCount={0}` is gone | 14 |
|
||||
| `src/components/NoScript/noScriptCss.test.tsx` "group expanded" rule | Exact string split in two: the group keeps `grid-template-rows:1fr;transition:none`, `visibility:visible` moves to `#mobile-nav:target [id^="mobile-group-"]` | BR-NAV-06 against BR-NAV-08: a visible child of a hidden parent is focusable; owner ratified | 17 |
|
||||
| `src/components/NavigationBar/NavigationBar.test.tsx` (new case) and `e2e/images.e2e.ts` "logo's" | The light logo is lazy until the page has loaded, then eager: the e2e expectation "light logo only on `/`" becomes "requested after `load` once off `/`, before `load` only on `/`"; a flash check on navigation to `/` is added | V-D7 found a flash on a client navigation to `/` with a permanently lazy hidden logo; owner decided the fix | after B7 |
|
||||
| `e2e/interaction.e2e.ts` V15 block | Comment only | The no-JavaScript page now shows content | 20 |
|
||||
| `e2e/rawHtml.e2e.ts` link and image counts | Exclude `noscript` content from the counts | `DOMParser` parses `noscript` as markup | 20 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user