Touch is a panel setting, and the rail grows with it

It described the wrong object. A dashboard is a document that may hang on a
hallway tablet and in a desk browser at the same time, and only one of those
has fingers on it — so the flag moves off `DashboardDef.settings` and onto
`PanelDef` as a plain bool, ticked in the Panels dialog. `useCanvasRoot` takes
it as an argument rather than reading the document, and `/panel/{id}` is the
only surface with a panel to ask.

Dropping the message binding with it is deliberate: nothing drove it, and a
flow deciding whether a screen has fingers on it was never the point. A stored
`settings.touch` is inert rather than migrated, which `_check_settings`
skipping unknown names already guaranteed.

The rail was the other half. It had no touch behaviour at all and its 40px
buttons met neither branch of the 44/32 rule. `[data-touch] .dui-rail{-item}`
in `ui/core/core.css` spends the padding and the gap on the buttons instead,
so they reach the 44px target and the rail comes out taller at exactly the
same width — `RAIL_INSET` never moves, and the arrangement under it does not
either.

Also closes the panels-dialog icon gap: `DashboardSummary` carries the `icon`
now, so the dialog draws each assigned dashboard's rail glyph beside its
checkbox. `initials()` went from three identical copies in the looks to one in
`Dashboard/icons.ts`, so the dialog and the rail fall back the same way.
This commit is contained in:
2026-08-31 19:04:20 +02:00
parent c781c199f3
commit 1faf7f7c11
22 changed files with 308 additions and 124 deletions
+11 -2
View File
@@ -59,11 +59,16 @@ function PanelRoute() {
})
const stacked = useIsMobile()
const rail = dashboards.length > 1
// Said by the panel rather than by the dashboard: this is the screen, and
// whether it is touched or pointed at is a fact about the screen. A document
// hanging on a hallway tablet and on a desk browser is one document either
// way, and only one of the two has fingers on it.
const touch = panel?.touch === true
// The screen is the dashboard here, so its appearance covers the whole of
// it — the rail and the letterbox around a scaled canvas included. This is
// the surface these settings exist for: a panel in a room has no other way
// to be told what to wear.
const root = useCanvasRoot(dashboard as Dashboard | undefined)
const root = useCanvasRoot(dashboard as Dashboard | undefined, touch)
if (panel && dashboards.length === 0) {
return (
@@ -91,11 +96,15 @@ function PanelRoute() {
)}
style={root.style}
>
<LookProvider dashboard={dashboard as Dashboard | undefined}>
<LookProvider
dashboard={dashboard as Dashboard | undefined}
touch={touch}
>
{dashboard ? (
<PanelSurface
dashboard={dashboard as Dashboard}
stacked={stacked}
touch={touch}
// Drawn on the panel rather than beside it: a screen showing four
// dashboards shows the way between them too.
rail={