Skip to content
SprecherEast
Issue 794

Follow-ups to the page backdrop: theme token, quality type, image preload, photo edge

Back to our plan
Open
frontendtech-debtpriority: low

Summary

Small leftovers from the independent review of PR #793 (page backdrop, #777). None of them changes what visitors get today.

Details

  • Move the 80% text mix used inside PageBackdrop into a theme token, with its contrast documented and covered by the theme contract test (the theme was off-limits for #777).
  • Make MediaProps.quality accept only the values in src/imageQualities.js (a /** @type {const} */ cast on IMAGE_QUALITIES); today it is any number.
  • priority is deprecated in Next 16 in favour of preload. Move the kit (Media for PageHero, PageHeader and PageBackdrop) to the new prop, and skip the backdrop's preload when the hero draws its own photo, so a page doesn't preload two candidate LCP images.
  • On Get Involved the first opaque bg-surface band cuts the photo while it is still visible. Consider ending the wash at the hero's height so the photo fades out first.

Acceptance criteria

  • Not done: No literal in PageBackdrop for the text mix; the theme test covers it
  • Not done: MediaProps.quality rejects a value not listed in IMAGE_QUALITIES at type-check
  • Not done: A page with a backdrop and an image hero preloads one image
  • Not done: The photo fades out before the first card band on Get Involved, in light and dark at six widths

Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab