Files
fofos-admin/web/panels.ts
T
pastilhasandClaude Opus 5 3dd4dd6592 one header instead of three rows, and the folder lives in the URL
THE TOP WAS THREE ROWS OF FURNITURE before any content: the workspace's chrome
header saying "Detail", the panel's own strip saying "Media — Photos and video the
site is built from", and then the browser's toolbar.

a panel meta may supply its own `header`, which is the mechanism for exactly this and
which gitea, invoices and desktop already use. so the section's name goes where a
panel's name goes, and the strip inside is gone. "Detail" was never information —
the panel is the detail panel, and the useful word is which section is open.

the hint went with it. "Photos and video the site is built from" earns its place in
the NAV, where somebody is choosing between ten sections. repeated above the one they
chose, it is a caption for a decision already made.

AND THE FOLDER IS IN THE QUERY STRING. `urlPath` puts it in `?path=`, so a reload
lands where you were and a link can be sent to somebody — which for a media folder
somebody else uploads into is the point. it is opt-in in the platform because a
screen with two browsers would have them fighting over one parameter; this screen has
one.

`panelId` stays alongside it: the URL covers a reload or a shared link, and panelId
covers a panel re-opened later, which the URL cannot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 08:56:15 +01:00

36 lines
1.2 KiB
TypeScript

import type { AppRegistryMeta } from 'officerdev';
import { List, PanelRight } from 'lucide-react';
import { NavPanel } from './NavPanel';
import { DetailPanel } from './DetailPanel';
import { DetailHeader } from './DetailHeader';
/**
* Two panels: a nav, and whatever it selects.
*
* They are SIBLINGS that never speak to each other — the nav writes `?section=` and the detail panel
* reads it. That is `docs/navigation-audit.md`'s rule, and it is what makes every section linkable and
* survive a reload.
*
* `availableOnPanel: false` — these belong to this plugin's screen, not to the generic panel picker.
* A "Fofos sections" panel offered on somebody's dashboard would render a nav with nothing beside it.
*/
export const appRegistryMetas: AppRegistryMeta[] = [
{
key: 'fofos-admin-nav',
name: 'Sections',
icon: List,
component: NavPanel,
availableOnPanel: false,
},
{
key: 'fofos-admin-detail',
name: 'Detail',
icon: PanelRight,
component: DetailPanel,
// The chrome header says which SECTION is open rather than the word "Detail" — see DetailHeader for
// why that replaced a second header row inside the panel.
header: DetailHeader,
availableOnPanel: false,
},
];