Website 1.7.0: move and zoom photos in their frame; delete unused photos

- A section's photo (hero, welcome, invitation, image-text) shows in the
  shape of its frame for the current template and layout, with a Move and
  zoom dialog: drag or arrow keys to choose what stays in view, zoom to
  300%. Saved with the section as data.framing ({ x, y, zoom } by media
  id), a draft until published. The site draws it with object-position
  and scale() around that point; Bold split/collage frames now clip, and
  a zoomed photo stays inside Heritage's mat. Framing for photos a section
  no longer shows is dropped on save.
- Media library: each photo says where it's used; one used nowhere can be
  deleted with its files (DELETE /admin/media/:id, 409 IN_USE otherwise,
  audited as media_deleted).

Checked: Website backend tests (135) and typecheck, frontend typecheck,
lint and production build, and an e2e test of both flows in Chromium.
Lighthouse not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 23:34:10 +02:00
co-authored by Claude Opus 5.5
parent 25100bd749
commit a9215ac4e4
22 changed files with 494 additions and 50 deletions
+23
View File
@@ -1,5 +1,28 @@
# Changelog — Church Website
## [1.7.0] — 2026-11-27
No migration, no new environment settings.
### Added
- **Move and zoom a photo in its frame.** In a section's form (the top of the page, Welcome,
Invitation, Image and text), a chosen photo shows in the shape of the frame the site puts it in
for the current template and layout (`admin/framing.tsx`, `frameFor`), with **Move and zoom**:
drag (or arrow keys) to choose what stays in view, zoom up to 300% to crop closer, Reset. It's
saved with the section as `data.framing` (by media id: `{ x, y, zoom }`), so it's a draft
like any other edit: the live preview shows it on Save, visitors after Publish. The site draws it
with `object-position` and `scale()` around the same point (`focusStyle` in `site/parts.tsx`);
the Bold split and collage frames now clip (`overflow-hidden`), and a zoomed photo in a
Heritage frame stays inside its mat. Framing for a photo the section no longer shows is dropped
when it's saved.
- **Delete photos from the media library.** Each photo says where it's used (draft pages and
their sections, ministries, leaders, series, events, the site icon, the live site, the church's
logo); one used nowhere has **Delete** (Editors and up), which removes the row and its files
(the photo and its responsive sizes, never outside the uploads folder) and frees the storage.
`DELETE /api/v1/admin/media/:id` refuses one in use (409 `IN_USE`, saying where); audited as
`media_deleted`.
## [1.6.1] — 2026-11-27
No migration, no new environment settings.