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
@@ -5,7 +5,7 @@
- **Feature Slug**: homepage-sections
- **Project Type**: Brownfield
- **Start Date**: 2026-10-19T19:19:38Z
- **Current Stage**: CONSTRUCTION - Unit 4 Lieve woorden - Code Generation (awaiting approval)
- **Current Stage**: CONSTRUCTION - Unit 5 Contact - Functional Design
- **Branch**: feature/homepage-sections
## Workspace State
@@ -66,7 +66,7 @@
- [ ] NFR Requirements - SKIP
- [ ] NFR Design - SKIP
- [ ] Infrastructure Design - SKIP
- [ ] Code Generation - EXECUTE (per unit) — Unit 1 Lifestyle fotografie ✅, Unit 2 Over mij ✅ (desktop review deferred by user), Unit 3 Prijzen ✅
- [ ] Code Generation - EXECUTE (per unit) — Unit 1 Lifestyle fotografie ✅, Unit 2 Over mij ✅ (desktop review deferred by user), Unit 3 Prijzen ✅, Unit 4 Lieve woorden ✅
- [ ] Build and Test - EXECUTE
### 🟡 OPERATIONS PHASE
@@ -74,8 +74,8 @@
## Current Status
- **Lifecycle Phase**: CONSTRUCTION
- **Current Stage**: Unit 4 Lieve woorden — Code Generation complete, awaiting approval
- **Next Stage**: Unit 4 Lieve woorden — Code Generation
- **Current Stage**: Unit 5 Contact — Functional Design
- **Next Stage**: Unit 5 Contact — Code Generation
## Reverse Engineering Status
- [x] Reverse Engineering - Artifacts refreshed on 2026-10-19T19:19:38Z at commit 38c5c3e (approved 2026-10-19T19:31:00Z)
@@ -527,3 +527,80 @@ Nou is het nog een statische site zonder back-end dus het contactformulier kan n
**Context**: CONSTRUCTION - change request on unit 3; push and test deploy (units 1–4)
---
## Feedback — Review Photo Size and Hero After Back-to-Top
**Timestamp**: 2026-10-20T21:20:00Z
**User Input**: "Ik heb even gekeken. De lieve woorden Carousel is grotendeels goed, maar op mobiel is het plaatje enorm en vult het scherm. Op desktop moet ik later even controleren, tenzij je hier een screenshot kan tonen van de desktop versie. Functioneel geloof ik het wel. Ik wil vooral de layout checken.
Dan zie ik ook het volgende gebeuren:
Ik navigeer naar de pagina en ik zie een beeldvullende hero. Ik scroll naar beneden en de back to top knop komt tevoorschijn en van de browser verdwijnen de ui balken boven en onder.. Ik klik op de knop en ga terug naar boven. Dat werkt zoals verwacht, maar vervolgens is de Hero niet schermvullend meer omdat die browserbalken weg zijn. Als ik gewoon naar boven scroll handmatig komen die balken terug en is de Hero wel schermvullend. Is daar wat aan te doen zonder vieze workarounds of iets? Anders accepteer ik het wel en dan is het geen probleem."
**AI Response**: "Review photo: limited to 240px wide on phones and 320px on tablets (was up to 420px), left-aligned; placeholder heights re-measured (390: 772px, 768: 813px). Sent desktop (1440) and phone (390) screenshots. Hero: explained the cause — the hero is 100svh (small viewport, toolbars shown); mobile browsers only bring their toolbars back on a user scroll, not on a scroll from JavaScript, and there is no API to show them; the clean alternative is 100dvh (always fills, but the hero and everything below change height whenever the toolbars slide in or out); recommended accepting. Changes not yet committed (awaiting the user's call)."
**Context**: CONSTRUCTION - Unit 4 review feedback
---
## Feedback — Viewport Units and Review Photo Size
**Timestamp**: 2026-10-20T21:40:00Z
**User Input**: "Ah ja dat is inderdaad een vieze oplossing. Heel irritant als alles constant verspringt. Dus dat scrollen lekker laten. Wel vraag ik me af wat de verschillen zijn tussen de verschillende view height waarden. Vh, dvh en volgens mij svh?
De foto mag nog iets kleiner? 75% van huidige groote maken is denk ik goed. Het moet ook niet te klein worden. Kan je de afbeelding wel in het midden uitlijnen op mobiel?"
**AI Response**: "Hero stays at 100svh (accepted). Explained vh, svh, lvh and dvh. Interpreted '75%' as the answer to the desktop question: desktop grid 5fr 7fr → 5fr 11fr (photo ±75%, ±395×495 at 1440; block fits a ±1000px screen); phones keep 240px (not too small), now centred, tablets 320px centred. Placeholder heights re-measured; static design and functional design updated; screenshots sent; tests green. Not committed yet."
**Context**: CONSTRUCTION - Unit 4 review feedback (applied)
---
## Correction — Review Photo Size
**Timestamp**: 2026-10-20T21:50:00Z
**User Input**: "Ik zei dat je de grootte van de mobiele versie op ongeveer 75% moest zetten van de huidige grootte. Desktop wilde ik eerst zien met een screenshot voordat we daar wat aan gaan doen"
**AI Response**: "Misread the previous request. Reverted the desktop change (back to 5fr 7fr) and set the phone photo to 180px (75% of 240px), centred; tablets stay 320px. Static design, functional design and code summary aligned; placeholder heights re-measured (phones ±700px). Sent desktop (unchanged) and phone screenshots for review. CI run 553 (test deploy of 02a7b84) completed successfully. Not committed yet."
**Context**: CONSTRUCTION - Unit 4 review feedback (corrected)
---
## Feedback — Desktop Review Photo
**Timestamp**: 2026-10-20T21:55:00Z
**User Input**: "Hoe je desktop net had aangepast was mooier. De afbeelding nu is misschien toch wat te groot."
**AI Response**: "Re-applied the smaller desktop layout (grid 5fr 11fr, photo ±395×495 at 1440); phones stay 180px centred, tablets 320px. Docs, static design and placeholder heights (lg 460, xl 625) updated; tests green. Not committed yet."
**Context**: CONSTRUCTION - Unit 4 review feedback (applied)
---
## Feedback — Review Alignment on Phones
**Timestamp**: 2026-10-20T22:05:00Z
**User Input**: "Nee nog niet. Op mobiel is de uitlijning niet goed voor lieve woorden. Ze moeten verticaal omhoog uitgelijnd worden. De kleinere items met minder tekst worden nu gecentreerd ofzo. Dat ziet er gek uit. Ook mag de witruimte tussen de afbeelding en de tekst iets minder op mobiel"
**AI Response**: "Cause: all slides share the tallest one's height, and the stacked grid centred its content (alignItems center), so the short review floated in the middle. Below lg the slide grid now aligns content and rows to the top; desktop keeps vertical centring. Gap between photo and text below lg reduced to 1.25rem. Verified with screenshots of both reviews at 390px; placeholder heights re-measured; docs updated; tests green. Not committed (user: 'nog niet')."
**Context**: CONSTRUCTION - Unit 4 review feedback (applied)
---
## Unit 4 Lieve woorden — Approval, Push and Test Deploy
**Timestamp**: 2026-10-20T22:15:00Z
**User Input**: "Commit, push en deploy naar test. Ga dan verder naar de volgende stage"
**AI Response**: "pnpm check green (190 tests; Lighthouse mobile 0.83, desktop 1.0). Committing the review-photo layout changes, pushing feature/homepage-sections and dispatching CI with deploy_test=true. Unit 4 approved; proceeding to Unit 5 Contact — Functional Design."
**Context**: CONSTRUCTION - Unit 4 complete; Unit 5 start
---
@@ -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`).
@@ -854,7 +854,7 @@ p:last-child { margin-bottom: 0; }
.testimonial {
display: grid;
grid-template-columns: 5fr 7fr;
grid-template-columns: 5fr 11fr;
gap: clamp(2rem, 6vw, 5.5rem);
align-items: center;
animation: testimonial-in var(--dur) var(--ease);
@@ -1374,7 +1374,7 @@ p:last-child { margin-bottom: 0; }
.testimonial,
.contact-layout { grid-template-columns: 1fr; }
.testimonial__media { max-width: 420px; }
.testimonial__media { width: 100%; max-width: 320px; margin-inline: auto; }
.about--reverse .about__media,
.shoot:nth-child(even) .shoot__media { order: 0; }
@@ -1424,6 +1424,7 @@ p:last-child { margin-bottom: 0; }
.footer__bottom { flex-direction: column; text-align: center; }
.about__media::before { display: none; }
.testimonial__media { max-width: 180px; }
}
/* ==========================================================================
@@ -7,19 +7,30 @@ type TestimonialSlideProps = {
};
// One review (design .testimonial): framed photo next to a large quotation
// mark, the shoot type, the quote and the names. Stacked below `lg`.
// mark, the shoot type, the quote and the names. Stacked below `lg`, with
// the photo centred.
export default function TestimonialSlide({
testimonial,
}: TestimonialSlideProps) {
return (
<Grid
data-testid={`testimonial-${testimonial.id}`}
templateColumns={{ base: '1fr', lg: '5fr 7fr' }}
gap="clamp(2rem, 6vw, 5.5rem)"
alignItems="center"
// 5:11 makes the photo column about 75% of the design's 5:7
templateColumns={{ base: '1fr', lg: '5fr 11fr' }}
gap={{ base: 5, lg: 'clamp(2rem, 6vw, 5.5rem)' }}
// Stacked, all slides share the tallest one's height: keep the
// content at the top, or a short review floats in the middle
alignContent={{ base: 'start', lg: 'center' }}
alignItems={{ base: 'start', lg: 'center' }}
h="100%"
>
<Box maxW={{ base: '420px', lg: 'none' }} w="100%">
{/* Kept small and centred on phones and tablets, so the photo
does not fill the screen above the quote */}
<Box
maxW={{ base: '180px', md: '320px', lg: 'none' }}
w="100%"
mx={{ base: 'auto', lg: 0 }}
>
<FramedImage image={testimonial.image} aspectRatio="4 / 5" />
</Box>
<Box>
@@ -18,9 +18,14 @@ const TestimonialCarousel = lazy(() => import('./TestimonialCarousel'));
const TITLE_ID = 'testimonials-title';
// Keeps about the space of the carousel while it loads, so the page below
// does not jump when it arrives (measured: ±920px on phones and tablets,
// ±570px at 1024px, ±790px at 1440px)
const PLACEHOLDER_HEIGHT = { base: '920px', lg: '570px', xl: '790px' };
// does not jump when it arrives (measured: ±685px on phones, ±790px on
// tablets, ±460px at 1024px, ±625px at 1440px)
const PLACEHOLDER_HEIGHT = {
base: '685px',
md: '790px',
lg: '460px',
xl: '625px',
};
type TestimonialsProps = {
content: HomeContent['testimonials'];