Flow canvas: label and edge popovers follow pan and zoom, the editors' dock is a full-width bar on a phone

- InputInspector hangs off the label's element and EdgeInspector off a point in flow coordinates (ViewportPortal), both re-measured every frame while open and hidden once the anchor leaves the view. A label that leaves the canvas closes its popover.
- Dock: below md a bar across the width, flush with the bottom edge (bg-card, top border, safe-area inset, no shadow); from md the floating pill as before. The flow dock drops the Run caption and the dashboard editor clears the bar with its own padding, so the editing state fits one row from 360px.
- Tests: the search spec checks the popover rides along with a pan; the mobile spec checks both docks are a full-width bar flush with the bottom.

Claude-Session: https://claude.ai/code/session_01SSi5AvZ7pFmySK8zy3NPMh
This commit is contained in:
2026-10-28 07:38:04 +01:00
parent 7a654b9e3c
commit a4393381ab
9 changed files with 109 additions and 35 deletions
@@ -801,10 +801,11 @@ export function DashboardEditor({
{/* biome-ignore lint/a11y/noStaticElementInteractions: see above. */}
<div
className={cn(
"absolute inset-0 overflow-hidden px-4 pb-24 pt-20 transition-[padding] duration-200",
// Clear of the dock: a bar on a phone, a pill from `md`.
"absolute inset-0 overflow-hidden px-4 pb-[calc(3.5rem+env(safe-area-inset-bottom))] pt-20 transition-[padding] duration-200 md:pb-24",
panelOpen && "md:pr-[27rem]",
// Clear of the row of faces above the dock.
edit && round && "pb-40",
edit && round && "pb-40 md:pb-40",
)}
data-testid="dashboard-canvas"
onClick={(event) => {
@@ -835,7 +836,7 @@ export function DashboardEditor({
arranging never mounts the lock, so the controls are live. */}
{edit ? null : <LockNotice dashboard={draft} />}
<Dock className="absolute bottom-4 left-1/2 z-10 -translate-x-1/2">
<Dock className="absolute inset-x-0 bottom-0 z-10 md:inset-x-auto md:bottom-4 md:left-1/2 md:-translate-x-1/2">
{edit ? (
<>
{/* A canvas can be shrunk to less than what is arranged on it,