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:
@@ -23,7 +23,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/u
|
||||
* A kind the server would accept and this has never heard of is not creatable anyway.
|
||||
*/
|
||||
|
||||
export type ComponentKind = 'free-text' | 'video';
|
||||
export type ComponentKind = 'free-text' | 'video' | 'gallery';
|
||||
|
||||
type Choice = {
|
||||
kind: ComponentKind | null;
|
||||
@@ -35,15 +35,16 @@ type Choice = {
|
||||
/**
|
||||
* `kind: null` means not built.
|
||||
*
|
||||
* Named rather than omitted, and the three named are things the site already HAS — media, video and
|
||||
* Named rather than omitted, and the ones named are things the site already HAS — media, video and
|
||||
* galleries all exist as concepts here. That is the difference between saying what is coming and
|
||||
* inventing a roadmap.
|
||||
* inventing a roadmap. Gallery stopped being one of them on 2026-08-31: the set, its ordering and the
|
||||
* carousel that draws it were all already built, so the block is a reference to one.
|
||||
*/
|
||||
const CHOICES: Choice[] = [
|
||||
{ kind: 'free-text', label: 'Text', hint: 'Words, headings and links', Icon: Type },
|
||||
{ kind: null, label: 'Image', hint: 'One picture from the media store', Icon: Images },
|
||||
{ kind: 'video', label: 'Video', hint: 'No controls, a poster, autoplay and loop', Icon: Video },
|
||||
{ kind: null, label: 'Gallery', hint: 'A named set of media', Icon: Images },
|
||||
{ kind: 'gallery', label: 'Gallery', hint: 'A named set of media', Icon: Images },
|
||||
];
|
||||
|
||||
export const AddComponentDialog = ({
|
||||
|
||||
Reference in New Issue
Block a user