From 671f049fb31184dc7538059164ff01978be712dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Fri, 4 Sep 2026 14:58:54 +0100 Subject: [PATCH] the lead photograph, and names for the subject blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `collection-cover` draws the FIRST photograph in the gallery, large, beside the words — the shape the client's sitemap draws. Not a second way to choose one: a gallery is ordered and reordering it is how the lead changes, which is the rule everywhere else here. The five subject blocks are places-only, like the contact form and the partner row. They hold nothing at all — what they draw is the collection the URL names. Co-Authored-By: Claude Opus 5 (1M context) --- web/sections/AddComponentDialog.tsx | 3 +++ web/sections/PageBuilderPanel.tsx | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/web/sections/AddComponentDialog.tsx b/web/sections/AddComponentDialog.tsx index e5cb9cd..0c3f72d 100644 --- a/web/sections/AddComponentDialog.tsx +++ b/web/sections/AddComponentDialog.tsx @@ -30,6 +30,7 @@ export type ComponentKind = | 'contact-form' | 'partners' | 'collections' + | 'collection-cover' | 'collection-title' | 'collection-description' | 'collection-specs' @@ -42,6 +43,7 @@ export type ComponentKind = block: one that is available, adds cleanly, and silently does nothing. */ export const SUBJECT_KINDS: ComponentKind[] = [ + 'collection-cover', 'collection-title', 'collection-description', 'collection-specs', @@ -96,6 +98,7 @@ export const CHOICES: Choice[] = [ They hold nothing — not even a reference. The subject is the URL, so one block draws a different collection on every request, and that is what lets one arrangement serve all of them. */ + { kind: 'collection-cover', label: 'Its lead photograph', hint: 'The first in its gallery, large', Icon: Image }, { kind: 'collection-title', label: 'Its name', hint: 'The collection this page is about', Icon: Heading }, { kind: 'collection-description', label: 'Its description', hint: 'What was written about it', Icon: Type }, { kind: 'collection-specs', label: 'Its specs', hint: 'Measurement, material, colours, delivery', Icon: Ruler }, diff --git a/web/sections/PageBuilderPanel.tsx b/web/sections/PageBuilderPanel.tsx index 11c5faf..2f85ad4 100644 --- a/web/sections/PageBuilderPanel.tsx +++ b/web/sections/PageBuilderPanel.tsx @@ -23,6 +23,11 @@ const LABELS: Record = { 'contact-form': 'Contact form', partners: 'Partners', collections: 'Collections', + 'collection-cover': 'Lead photograph', + 'collection-title': 'Name', + 'collection-description': 'Description', + 'collection-specs': 'Specs', + 'collection-gallery': 'Photographs', }; /* @@ -31,7 +36,17 @@ const LABELS: Record = { Both the picker and the canvas ask the same question — one to decide whether to open an editor, the other whether to draw an Edit button — and two lists would drift into a button that opens nothing. */ -const PLACES_ONLY: string[] = ['contact-form', 'partners', 'collections']; +const PLACES_ONLY: string[] = [ + 'contact-form', + 'partners', + 'collections', + // The subject blocks hold nothing either: what they draw is the collection the URL names. + 'collection-cover', + 'collection-title', + 'collection-description', + 'collection-specs', + 'collection-gallery', +]; import { AddSectionDialog, type SectionLayout } from './AddSectionDialog'; import { FreeTextEditor } from './FreeTextEditor'; import { SpacingEditor, type Padding } from './SpacingEditor';