diff --git a/web/canvas.ts b/web/canvas.ts index f5ec30d..4438e63 100644 --- a/web/canvas.ts +++ b/web/canvas.ts @@ -68,6 +68,8 @@ export type CanvasComponent = { export type CanvasSection = { id: number; name: string; + /** Whether the page draws a rule beneath this band. */ + divider?: boolean; /** The heading the page draws above the band, or null. Not `name` — see the site's schema. */ title?: string | null; layout: 'one' | 'two'; diff --git a/web/sections/BandSettings.tsx b/web/sections/BandSettings.tsx index 0777866..55f297f 100644 --- a/web/sections/BandSettings.tsx +++ b/web/sections/BandSettings.tsx @@ -26,7 +26,7 @@ export const BandSettings = ({ blocks, }: { pageId: number; - band: { id: number; name: string; title?: string | null }; + band: { id: number; name: string; title?: string | null; divider?: boolean }; /** The builder re-reads its sections: the nav's row is this name, and the page draws this title. */ onSaved: () => void; /** This band's blocks — `BandBlocks`, built by the panel that has the handlers. */ @@ -37,6 +37,7 @@ export const BandSettings = ({ clientRef.current = client; const [draft, setDraft] = useState({ name: band.name, title: band.title ?? '' }); + const [busyDivider, setBusyDivider] = useState(false); const [busy, setBusy] = useState(false); const [error, setError] = useState(null); const [saved, flashSaved] = useFlash(); @@ -93,6 +94,33 @@ export const BandSettings = ({ /> + {/* + Written on its own rather than through the draft, because it is a switch: there is nothing to + debounce and waiting 600ms to see a line disappear reads as the control not working. + + Phrased as what it DOES — a rule under this band — rather than as `divider`, which is the column + name and tells somebody nothing about what they will see. + */} + + {saved &&

Saved

} {error &&

{error}

}