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
+8 -5
View File
@@ -22,11 +22,14 @@ import { slideUp, transitions } from "@/lib/motion"
import { cn } from "@/lib/utils"
/**
* The action bar floating at the bottom of an editor canvas, flow or dashboard.
* The action bar at the bottom of an editor canvas, flow or dashboard.
*
* Capped and wrapping: the canvas shell clips, so an uncapped row would put the
* buttons at its ends out of reach on a phone rather than merely look wrong.
* See DESIGN-GUIDELINES.md → Responsive.
* A phone has no room to float: there it is a bar across the full width, flush
* with the bottom edge, with the buttons packed to fit one row. From `md` it is
* a pill floating over the canvas, capped and wrapping, since the canvas shell
* clips and an uncapped row would put the buttons at its ends out of reach.
* The caller places it, with the same split. See DESIGN-GUIDELINES.md →
* Responsive.
*/
export function Dock({
className,
@@ -43,7 +46,7 @@ export function Dock({
exit="exit"
transition={transitions.emphasized}
className={cn(
"pointer-events-auto flex w-max max-w-[calc(100vw-2rem)] flex-wrap items-center justify-center gap-1 rounded-full border border-border bg-card/80 px-1.5 py-1 shadow-e2 backdrop-blur-md pb-[max(0.25rem,env(safe-area-inset-bottom))]",
"pointer-events-auto flex w-full flex-wrap items-center justify-around border-t border-border bg-card pt-1 pb-[max(0.25rem,env(safe-area-inset-bottom))] md:w-max md:max-w-[calc(100vw-2rem)] md:justify-center md:gap-1 md:rounded-full md:border md:bg-card/80 md:px-1.5 md:py-1 md:shadow-e2 md:backdrop-blur-md",
className,
)}
>