Pieces: the Gallery, as a section like Collections
The Gallery is a flat list of peças, each with a title, a gallery of mixed media, and the specs from the client's sitemap — measurement, raw material, colours, and NOTAS: production time and shipping conditions. That is a collection one level flatter, so the panel is shared rather than copied. SubjectPanel and SubjectFields take a section config (subjects.ts); CollectionsPanel and PiecesPanel are one line each. The five template blocks are renamed collection-* to subject-*. They never read anything collection-specific, and copying them per section would have meant twenty kinds by the time Drops and Collabs land. Called Pieces in the nav, not Gallery — there is already a Galleries section meaning a named set of media, and two rows called Gallery and Galleries is a question somebody has to answer every time they look at it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,11 +30,12 @@ export type ComponentKind =
|
||||
| 'contact-form'
|
||||
| 'partners'
|
||||
| 'collections'
|
||||
| 'collection-cover'
|
||||
| 'collection-title'
|
||||
| 'collection-description'
|
||||
| 'collection-specs'
|
||||
| 'collection-gallery';
|
||||
| 'pieces'
|
||||
| 'subject-cover'
|
||||
| 'subject-title'
|
||||
| 'subject-description'
|
||||
| 'subject-specs'
|
||||
| 'subject-gallery';
|
||||
|
||||
/*
|
||||
The blocks that draw whatever the page is ABOUT.
|
||||
@@ -43,11 +44,11 @@ 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',
|
||||
'collection-gallery',
|
||||
'subject-cover',
|
||||
'subject-title',
|
||||
'subject-description',
|
||||
'subject-specs',
|
||||
'subject-gallery',
|
||||
];
|
||||
|
||||
type Choice = {
|
||||
@@ -91,18 +92,23 @@ export const CHOICES: Choice[] = [
|
||||
{ kind: 'contact-form', label: 'Contact form', hint: 'The site\'s form, as it is', Icon: Mail },
|
||||
{ kind: 'partners', label: 'Partners', hint: 'The partner logos, from Site', Icon: Handshake },
|
||||
{ kind: 'collections', label: 'Collections', hint: 'Every collection, as a grid', Icon: LayoutGrid },
|
||||
{ kind: 'pieces', label: 'Pieces', hint: 'Every gallery piece, as a grid', Icon: LayoutGrid },
|
||||
|
||||
/*
|
||||
The four that draw THIS collection, on the template.
|
||||
The five that draw whatever the page is ABOUT, on a template.
|
||||
|
||||
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.
|
||||
|
||||
Called `subject-` rather than `collection-`: the same five draw a gallery piece, and the labels say
|
||||
"it" for that reason. What differs between the sections is a path and a few spec labels, and both
|
||||
travel with the subject.
|
||||
*/
|
||||
{ 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 },
|
||||
{ kind: 'collection-gallery', label: 'Its photographs', hint: 'The gallery it points at', Icon: Images },
|
||||
{ kind: 'subject-cover', label: 'Its lead photograph', hint: 'The first in its gallery, large', Icon: Image },
|
||||
{ kind: 'subject-title', label: 'Its name', hint: 'What this page is about', Icon: Heading },
|
||||
{ kind: 'subject-description', label: 'Its description', hint: 'What was written about it', Icon: Type },
|
||||
{ kind: 'subject-specs', label: 'Its specs', hint: 'Measurement, material, colours, and the rest', Icon: Ruler },
|
||||
{ kind: 'subject-gallery', label: 'Its photographs', hint: 'The gallery it points at', Icon: Images },
|
||||
];
|
||||
|
||||
export const AddComponentDialog = ({
|
||||
|
||||
Reference in New Issue
Block a user