Gallery is a component you can add

The picker listed it as `soon` beside Image. It is not soon any more — the set, its ordering and the
carousel that draws it were already built on the site, so the block is a reference to one and the
admin's whole job is choosing which.

`GalleryPicker` chooses a SET and nothing else. Editing what is IN the set stays under Galleries: a
block that could also rearrange its own pictures would be a second place to do one job, and the two
would disagree. No thumbnails — every stored path names an original a browser cannot display, and the
plugin has no way to address a rendition, so the name and the count identify it instead.

Saved on choose, like a video and for the same reason: picking one thing is one act with one outcome,
so there is nothing to draft and nothing to cancel out of.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-31 06:56:36 +01:00
co-authored by Claude Opus 5
parent 18c01de6f2
commit 2ab9e78790
4 changed files with 194 additions and 6 deletions
+6 -1
View File
@@ -53,7 +53,12 @@ export type CanvasComponent = {
id: number;
column: number;
kind: string;
content?: { html?: string };
/*
One optional field per kind that the panel reads back. Not `Record<string, unknown>`: every reader
would then need a cast, and the point of naming them is that the compiler knows `free-text` holds
`html` and `gallery` holds `galleryId`.
*/
content?: { html?: string; galleryId?: number | null };
padding?: Record<string, { x?: number; y?: number }>;
};
export type CanvasSection = {