diff --git a/Makefile b/Makefile index 43af199..c0303b1 100644 --- a/Makefile +++ b/Makefile @@ -103,9 +103,19 @@ demo-load: cp /var/www/html/user/docs/demo/trips/italy-2026-demo/*.gpx /var/www/html/user/pages/01.trips/italy-2026-demo/ 2>/dev/null || true && \ chown -R 1000:1000 /var/www/html/user/pages/01.trips/italy-2026-demo && \ cd /var/www/html && php bin/grav clearcache" + # Load no-photos-demo fixture (AE4: no cover_image, no entry images -> text-only header, no banner). + # Guarded with `|| true` so runs whose user/ predates the fixture (e.g. the main + # checkout before this branch merges) skip it instead of failing globalSetup. + docker exec intotheeast_grav bash -c "\ + mkdir -p /var/www/html/user/pages/01.trips/no-photos-demo/01.dailies /var/www/html/user/pages/01.trips/no-photos-demo/04.stories && \ + cp /var/www/html/user/docs/demo/trips/no-photos-demo/trip.md /var/www/html/user/pages/01.trips/no-photos-demo/trip.md 2>/dev/null || true && \ + cp /var/www/html/user/docs/demo/trips/no-photos-demo/stories.md /var/www/html/user/pages/01.trips/no-photos-demo/04.stories/stories.md 2>/dev/null || true && \ + cp -r /var/www/html/user/docs/demo/trips/no-photos-demo/dailies/. /var/www/html/user/pages/01.trips/no-photos-demo/01.dailies/ 2>/dev/null || true && \ + chown -R 1000:1000 /var/www/html/user/pages/01.trips/no-photos-demo && \ + cd /var/www/html && php bin/grav clearcache" demo-reset: - docker exec intotheeast_grav bash -c "rm -rf /var/www/html/user/pages/01.trips/italy-2026-demo && cd /var/www/html && php bin/grav clearcache" + docker exec intotheeast_grav bash -c "rm -rf /var/www/html/user/pages/01.trips/italy-2026-demo /var/www/html/user/pages/01.trips/no-photos-demo && cd /var/www/html && php bin/grav clearcache" pixelfed-import: docker exec intotheeast_grav bash -c "which python3 || apt-get install -y python3 --no-install-recommends -q" diff --git a/docs/working/plans/2026-07-05-trip-description-and-hero.md b/docs/working/plans/2026-07-05-trip-description-and-hero.md index cdbc958..fe83e85 100644 --- a/docs/working/plans/2026-07-05-trip-description-and-hero.md +++ b/docs/working/plans/2026-07-05-trip-description-and-hero.md @@ -259,3 +259,35 @@ No lint/build step applies — the edited `css/style.css` and templates are serv | U3 | List cards show one-liners where set and sharp retina covers with correct fallback; U3 specs pass. | | U4 | Trip-page header shows one-liner, expandable description, and gated banner in HTD order; home view unchanged; U4 specs pass. | | U5 | Header/banner styled; description expands; split stays above the fold on mobile. | + +--- + +## Post-review follow-up (2026-07-07) + +A structured code review of the finished diff produced fixes and two +intentionally-deferred findings. + +**Applied** + +- Cover picker restricted to images (`accept:` on the `cover_image` + `pagemediaselect` field) + macro resolves against `media.images`, so a + non-image selection (e.g. a `.gpx` from the trip page media) can no longer + route a non-image Medium into `cropResize`. Also hardens R11. +- Test quality: replaced a vacuous `toContainText` in the description-clamp + spec with real clamp/un-clamp assertions; added the missing **AE4** coverage + (trip with no cover + no entry images → text-only header, no banner) via a + `no-photos-demo` fixture; corrected an R11 over-claim in the trips-list spec + header comment. + +**Intentionally deferred — explicit plan override (do not re-flag)** + +- **Macro re-queries dailies/first-entry (reviewer: efficiency/maintainability).** + Deferred by design: **KTD2** puts cover resolution *inside* the shared macro + precisely so the list card and trip banner cannot drift. Moving resolution + out to callers reopens that drift; the extra `grav.pages.find()` is cached and + negligible. +- **Inline `