a collection is made, and points at a gallery
The version before this made a collection out of every folder under originals/COLLECTIONS/. It kept the disk and the database in step for free, and it also let whoever last tidied a directory decide the website's structure. A collection is editorial: it exists because somebody made it, named it and put photographs in it. Its photographs are a GALLERY — the feature that already means "a named, ordered set of media", with a picker and an order somebody dragged into place. A collection points at one rather than growing a private copy, so ordering stays maintained in the one screen that owns ordering, and the same set can appear in a collection and on a page without being chosen twice. That is why the grid here is not draggable and has no Add: both belong to Galleries. What is decided HERE is which photograph leads, because that is a fact about the collection rather than about the set. Creating is a name and a button under the list it adds to, and it selects what it made — a dialog for one field is a dialog nobody thanks you for. Deleting removes the collection and never the photographs, which the button says out loud rather than leaving somebody to find out. Changing the gallery clears the cover. The new set is different photographs, so a cover chosen from the old one is a path that may not be there, and falling back silently would be a choice quietly reverting itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,9 +14,9 @@ import type { Collection } from './collections';
|
||||
* by reading it. This is the other half: the name it goes by, the address it lives at, and the specs
|
||||
* from the client's sitemap. None of it can be derived, so all of it is typed.
|
||||
*
|
||||
* `folder` is shown and not editable. It is an address — renaming it moves files — and the API refuses
|
||||
* to write it for the same reason. Showing it anyway matters: it is the only thing that says WHICH
|
||||
* folder a collection is, and somebody looking at two similarly named ones needs to be able to tell.
|
||||
* The gallery is not here. It is chosen beside the photographs it puts on screen, in the panel, where
|
||||
* the consequence of choosing it is visible — a dropdown in a column of text fields would be the one
|
||||
* control whose effect you cannot see.
|
||||
*
|
||||
* ── One draft, one save ──
|
||||
*
|
||||
@@ -103,12 +103,6 @@ export const CollectionFields = ({
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* Read-only, and shown rather than hidden: it is the only thing that says which folder this is,
|
||||
and the API refuses to write it because renaming one moves files on disk. */}
|
||||
<div className="space-y-1.5 border-t border-border pt-4">
|
||||
<label className="text-xs text-muted-foreground">Folder</label>
|
||||
<p className="font-mono text-[11px] break-all text-muted-foreground/70">{collection.folder ?? '—'}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user