From d6dd4d5cf0aac340ad0bc4306766c193a2a1d59c Mon Sep 17 00:00:00 2001 From: Matei Date: Thu, 11 Jun 2026 19:37:24 -0400 Subject: [PATCH] =?UTF-8?q?feat(mapgen-studio):=20layout=20geometry=20?= =?UTF-8?q?=E2=80=94=20340px=20dock,=20content-driven=20header,=20full-hei?= =?UTF-8?q?ght=20column?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSpec mapgen-studio-layout-geometry. LAYOUT constants become the geometry authority (PANEL_WIDTH 340, EXPLORE 260 corrected, HEADER_HEIGHT now an initial estimate); AppHeader drops the stale minHeight:104 reserve (ResizeObserver stays authoritative — dead band gone, docks rise to y≈72); docks pin header→footer (pointer-events pass-through below short panels); RecipePanel max-h-full + sticky scroll-edge fade; ExplorePanel max-h-full + internal scroll. Verified: tsc, 141 tests, DOM measurements + dark screenshot on :5173. Co-Authored-By: Claude Fable 5 --- apps/mapgen-studio/src/app/LeftDock.tsx | 20 ++++++++++++++----- apps/mapgen-studio/src/app/RightDock.tsx | 20 ++++++++++++++----- apps/mapgen-studio/src/app/StudioShell.tsx | 8 ++++++-- .../src/ui/components/AppHeader.tsx | 7 +------ .../src/ui/components/ExplorePanel.tsx | 8 +++++++- .../src/ui/components/RecipePanel.tsx | 19 +++++++++++++++--- apps/mapgen-studio/src/ui/components/index.ts | 2 +- apps/mapgen-studio/src/ui/constants/layout.ts | 20 ++++++++++++------- .../mapgen-studio-layout-geometry/design.md | 9 ++++++--- .../mapgen-studio-layout-geometry/tasks.md | 18 ++++++++--------- 10 files changed, 89 insertions(+), 42 deletions(-) diff --git a/apps/mapgen-studio/src/app/LeftDock.tsx b/apps/mapgen-studio/src/app/LeftDock.tsx index dcbf786a1f..ab91db6e9d 100644 --- a/apps/mapgen-studio/src/app/LeftDock.tsx +++ b/apps/mapgen-studio/src/app/LeftDock.tsx @@ -3,6 +3,8 @@ import type { ReactNode } from "react"; export type LeftDockProps = { /** Top offset (px) so the dock clears the floating header. */ top: number; + /** Bottom offset (px) so the dock clears the floating footer. */ + bottom: number; /** The recipe/config authoring panel rendered inside the dock. */ children: ReactNode; }; @@ -10,13 +12,21 @@ export type LeftDockProps = { /** * `LeftDock` — the left-anchored floating dock that hosts the recipe authoring * panel (architecture/10 §4). It owns only the absolute positioning + z-index of - * the left rail; the panel content is composed in by `StudioShell`. Extracting the - * positioning frame from the authoring closure keeps the shell layout declarative - * without changing the rendered DOM (same `absolute left-4 z-10` placement). + * the left rail; the panel content is composed in by `StudioShell`. The dock is + * pinned between the measured header (`top`) and the footer reserve (`bottom`) + * so the panel inside can claim the full working column (`max-h-full`) while + * still shrinking to fit short content. + * + * `pointer-events-none`: the dock spans header→footer even when its panel is + * short; the empty remainder must pass map drag/zoom through. The panel restores + * `pointer-events-auto` on itself. */ -export function LeftDock({ top, children }: LeftDockProps) { +export function LeftDock({ top, bottom, children }: LeftDockProps) { return ( -