Float the dashboard rail along the bottom on a phone

Below md a dashboard stacks to one column and dropped its rail. The rail is
now a horizontal row in the dashboard's own look, floated over the bottom
of the screen on /panel/{id} and above the dock in the app's view, with
44px items, sideways scrolling when it overflows, and padding so the last
tile clears it; a panel's read-only notice moves up out of its way. The
three looks share the geometry from ui/core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
2026-10-06 00:22:28 +02:00
co-authored by Claude Opus 5.5
parent 2c1ad395de
commit d7ca933478
10 changed files with 108 additions and 65 deletions
@@ -8,6 +8,7 @@ import {
import { useDashboardLocked } from "@/components/Dashboard/settings"
import { useUi } from "@/components/Dashboard/ui"
import { LookProvider } from "@/components/Dashboard/ui/core/look"
import { cn } from "@/lib/utils"
/**
* One dashboard filling whatever screen it landed on.
@@ -30,7 +31,8 @@ export function PanelSurface({
/** A landscape arrangement scaled onto a phone comes out at about a fifth of
* its size, which reads as nothing at all. Stack it instead. */
stacked?: boolean
/** The way between this panel's dashboards, drawn on the canvas itself. */
/** The way between this panel's dashboards, drawn on the canvas itself, or
* along the bottom of the screen when stacked. */
rail?: React.ReactNode
/** Whether the screen this hangs on is touched. Stated by the panel route. */
touch?: boolean
@@ -49,7 +51,18 @@ export function PanelSurface({
// the look on: this branch mounts what `CanvasSurface` mounts for the
// other one, touch included.
<LookProvider dashboard={dashboard} touch={touch}>
<DashboardView dashboard={dashboard} stacked />
{/* Padded here rather than by the route: the stack overflows this
box, so only padding inside the overflow clears the rail. */}
<div className={cn(rail && "pb-24")}>
<DashboardView dashboard={dashboard} stacked />
</div>
{rail ? (
// No column to spare on a phone, so the rail is a row floating
// over the bottom edge.
<div className="pointer-events-none fixed inset-x-4 bottom-[calc(1rem+env(safe-area-inset-bottom))] z-10 flex justify-center">
{rail}
</div>
) : null}
</LookProvider>
) : (
// The panel's own surface, scaled to fit. No dots: nothing is being
@@ -60,7 +73,14 @@ export function PanelSurface({
)}
{/* Outside the canvas, so it needs the look stated for it. */}
<LookProvider dashboard={dashboard} touch={touch}>
<LockNotice dashboard={dashboard} />
{stacked && rail ? (
// Lifted clear of the rail floating along the bottom.
<div className="pointer-events-none absolute inset-x-0 top-0 bottom-20">
<LockNotice dashboard={dashboard} />
</div>
) : (
<LockNotice dashboard={dashboard} />
)}
</LookProvider>
</div>
)