diff --git a/web/sections/LayoutPanel.tsx b/web/sections/LayoutPanel.tsx index 819d2a3..ae57f03 100644 --- a/web/sections/LayoutPanel.tsx +++ b/web/sections/LayoutPanel.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react'; -import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'; import { useSearchParams } from 'react-router'; import { useClient } from 'hooks/useClient'; import { readableError } from '../errors'; @@ -275,37 +275,10 @@ export const LayoutPanel = () => { } setEditorRef.current( - - - - Colours - - - Typefaces - - - Padding - - - - {/* - EVERY panel in the same grid cell, so the block is as tall as the TALLEST of them and stops - moving when the tab changes. - - Measuring the panels and setting a height would need a ResizeObserver, a re-measure on every - edit, and a wrong answer for one frame after each. `grid-area: 1/1` gets it from the layout - engine for nothing, and it stays right when a tab is added or one of them grows a row — - which is the case that made the first fix insufficient. - - `invisible` and not `hidden`: an invisible element still takes its space, which IS the - mechanism. It is also removed from the tab order, so the controls behind the front panel - cannot be reached by keyboard. - */} -
-
+ + + Colours + <>
{COLOURS.map(({ key, label, fallback }) => ( @@ -336,12 +309,11 @@ export const LayoutPanel = () => { ))}
-
- -
+ + + + Typefaces + <> {/* Four across, one row. @@ -382,12 +354,11 @@ export const LayoutPanel = () => { ))}
-
- -
+ + + + Padding + {/* The site's gutter, not a per-band padding. @@ -404,9 +375,9 @@ export const LayoutPanel = () => { steps={draft.padding_steps} onChange={(padding_x) => patch({ padding_x })} /> -
- -
+ + + ); }, [draft, tab, device]);