a selected page opens the builder, not a highlighted row
The nav already said it: Pages is a section, and the pages are rows under it. Two things, two screens. The detail panel was showing one screen with a row lit up, which made the list the answer to both questions. ?section=pages the list — what exists, what it is called, where it lives, in what order ?section=pages&page=4 that page — what is on it Both addressable, which is why the distinction is a query parameter rather than state. Pressing PAGES itself now clears `page`. Without that the section row and the row for whichever page was last open lead to the same screen and there is no way back to the list but the browser's back button. Scoped exactly like `media`, and for the same reason: a parameter belonging to one section should not ride along into the others. The list stops having a selection — selecting a page leaves the screen entirely — so its rows are plain rows again and the panel no longer reads or writes the URL at all. Adding a page deliberately does NOT open it. The next thing anybody does is name it, and the name lives on the list; jumping into the builder would mean coming straight back. SitePreview is now shared, lifted out of LayoutPanel with the dev-port lookup beside it. Layout passes the theme it is editing; a page passes nothing and just gets its own page. The builder shows the real page at its real address today, which is what the blocks will be judged against when they exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,16 @@ export const NavPanel = () => {
|
||||
*/
|
||||
if (section.key !== 'media') search.delete('media');
|
||||
|
||||
/*
|
||||
`page` is Pages' own, and pressing PAGES ITSELF clears it.
|
||||
|
||||
Without this the section row and the row for whichever page was last open lead to the same
|
||||
screen — the builder — and there is no way back to the list except the browser's back button.
|
||||
Scoped like `media` above, and for the same reason: a parameter that belongs to one section
|
||||
should not ride along into the others.
|
||||
*/
|
||||
search.delete('page');
|
||||
|
||||
const body = (
|
||||
<>
|
||||
<Icon className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
|
||||
|
||||
Reference in New Issue
Block a user