Tidies the Lieve woorden layout after review

On phones the review photo is smaller and centred, the content sits at
the top of each slide so a short review no longer floats in the middle,
and the gap between photo and text is tighter. On desktop the photo
column is about three quarters of its earlier width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 23:33:22 +02:00
co-authored by Claude Opus 5.5
parent 02a7b8436d
commit 0b8e8d5f8b
7 changed files with 112 additions and 15 deletions
@@ -33,6 +33,9 @@ Plan: [lieve-woorden-code-generation-plan.md](../../plans/lieve-woorden-code-gen
- **Carousel cost on page load**: the carousel in the route chunk lowered home mobile Lighthouse from a median **0.83** (unit 3, 5 runs) to **0.81**; `React.lazy` alone did not help (the chunk still loaded at once). Now the section and heading render immediately, and the carousel chunk loads only when the section comes within 200 px of the screen (same rule as the deferred photos), with a placeholder of the measured height. Median back to **0.83** (LCP 3.84 s).
- **Testing approach**: jsdom has no layout, so Zag cannot page there. Unit tests check our wiring (calls to `scrollNext/scrollPrev/scrollTo` with the right `instant`, announcements, labels, loop option, deferred loading); paging, looping, dots and the hidden off-screen slide were checked in real Chrome via the DevTools protocol (next → "Review 2 van 2", next again → back to review 1, dot 2 → review 2).
## Change request after testing on test (2026-10-20)
The photo was too large on phones (it filled the screen). Now: phones max 180 px wide (±75% of a first 240 px step), tablets max 320 px, centred above the quote. Desktop grid `5fr 11fr` after reviewing screenshots of both, so the photo is ±75% of its earlier size (±395×495 px at 1440) and the whole block fits a ±1000 px high screen. Stacked slides align their content to the top (a short review no longer floats in the middle of the shared height) with a 1.25 rem gap between photo and text. Placeholder heights re-measured.
## Verification (`pnpm check`)
- Lint ✅, Prettier ✅, build ✅ — carousel in its own chunk (`TestimonialCarousel-*.js`, 43 KB raw)
- Tests: 42 files, **190 passed**; 100% coverage on the new `lib/` files
@@ -38,7 +38,7 @@ Text alternative: the home route renders Testimonials, which uses HomeSection, S
## TestimonialSlide
- **Props**: `{ testimonial: Testimonial }`
- **Layout**: grid `5fr 7fr` from `lg` with gap `clamp(2rem, 6vw, 5.5rem)`, centred vertically; stacked below `lg` with the photo max 420 px wide.
- **Layout**: grid `5fr 11fr` from `lg` (photo column ±75% of the design's `5fr 7fr`) with gap `clamp(2rem, 6vw, 5.5rem)`, centred vertically; stacked below `lg` with the photo centred, max 180 px wide on phones and 320 px on tablets, content aligned to the top (slides share the tallest height) and a 1.25 rem gap between photo and text (owner's choices after review).
- **Photo**: `FramedImage` with aspect `4 / 5` (the source photos are cropped to 4:5 when prepared).
- **Text**: decorative quotation mark (Marcellus, `clamp(5rem, 9vw, 7.5rem)`, `accent`, `aria-hidden`); shoot as eyebrow (`accent.deep`); `figure` > `Blockquote` (Marcellus, `clamp(1.35rem, 2.2vw, 1.75rem)`, line-height 1.5, `ink`) > `figcaption` with "— " + author in small caps (`ink.soft`).