Draw the look's ground behind a stacked dashboard

A phone stacks a dashboard instead of drawing it on a canvas, and the canvas
was what carried the ground, so a stack had only the palette's colour. The
panel and the editor now draw the look's ground behind the stack, held still
while it scrolls. Glass's drift stops under reduced motion as it does on a
canvas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 16:08:53 +02:00
co-authored by Claude Opus 5.5
parent 361b9d8e74
commit a7fe925fdf
3 changed files with 13 additions and 3 deletions
@@ -42,6 +42,7 @@ import { handleError } from "@/utils"
import { DashboardPalette } from "./DashboardPalette"
import {
areaOf,
CanvasGround,
CanvasSurface,
canvasOf,
columnsOf,
@@ -657,7 +658,8 @@ export function DashboardEditor({
)}
style={root.style}
>
<div className={cn("h-full overflow-y-auto", rail && "pb-20")}>
<CanvasGround dashboard={draft} />
<div className={cn("relative h-full overflow-y-auto", rail && "pb-20")}>
<DashboardView
dashboard={draft}
stacked
@@ -2,6 +2,7 @@ import { useCallback } from "react"
import type { Dashboard } from "@/components/Dashboard/DashboardView"
import {
CanvasGround,
CanvasSurface,
DashboardView,
isRound,
@@ -67,9 +68,14 @@ export function PanelSurface({
// the look on: this branch mounts what `CanvasSurface` mounts for the
// other one, touch included.
<LookProvider dashboard={dashboard} touch={touch}>
{/* The look's ground, held to the screen while the stack scrolls
over it, as it stays put under a canvas. */}
<div className="pointer-events-none fixed inset-0">
<CanvasGround dashboard={dashboard} />
</div>
{/* 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")}>
<div className={cn("relative", rail && "pb-24")}>
<DashboardView dashboard={dashboard} stacked />
</div>
{rail ? (