Touch is a panel setting, and the rail grows with it
Docs / docs (push) Successful in 22s
Playwright Tests / test-playwright (1, 2) (push) Failing after 1m9s
Playwright Tests / test-playwright (2, 2) (push) Failing after 11s
pre-commit / pre-commit (push) Failing after 1m59s
Test Backend / test-backend (push) Failing after 2m28s
Compose Smoke Test / test-compose (push) Failing after 11s
Playwright Tests / merge-reports (push) Failing after 2m19s
Docs / docs (push) Successful in 22s
Playwright Tests / test-playwright (1, 2) (push) Failing after 1m9s
Playwright Tests / test-playwright (2, 2) (push) Failing after 11s
pre-commit / pre-commit (push) Failing after 1m59s
Test Backend / test-backend (push) Failing after 2m28s
Compose Smoke Test / test-compose (push) Failing after 11s
Playwright Tests / merge-reports (push) Failing after 2m19s
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.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Va7ExQDtuwKN7kNpHhWWNQ
This commit is contained in:
@@ -620,37 +620,6 @@ test("a chart's cursor follows the pointer", async ({ page }) => {
|
||||
).toBeLessThan(3)
|
||||
})
|
||||
|
||||
test("touch makes the controls bigger without changing what they do", async ({
|
||||
page,
|
||||
}) => {
|
||||
await openPanel(page)
|
||||
const control = page.getByTestId("widget-frame").filter({ hasText: "Mode" })
|
||||
const pointer = (await control.getByRole("button").first().boundingBox())!
|
||||
.height
|
||||
|
||||
await setLook(page, dashboardName, { touch: { value: true } })
|
||||
await openPanel(page)
|
||||
await expect(page.getByTestId("canvas-surface")).toHaveAttribute(
|
||||
"data-touch",
|
||||
"",
|
||||
)
|
||||
const touched = (await control.getByRole("button").first().boundingBox())!
|
||||
.height
|
||||
expect(
|
||||
touched,
|
||||
`a segment is ${touched.toFixed(1)} touched and ${pointer.toFixed(1)} pointed at`,
|
||||
).toBeGreaterThan(pointer)
|
||||
|
||||
// The control is the same control: it still publishes what it always did.
|
||||
await control.getByRole("button", { name: "Boost" }).click()
|
||||
await expect(control.getByRole("button", { name: "Boost" })).toHaveAttribute(
|
||||
"aria-pressed",
|
||||
"true",
|
||||
)
|
||||
|
||||
await setLook(page, dashboardName, { touch: { value: false } })
|
||||
})
|
||||
|
||||
/**
|
||||
* What a dashboard was told to wear, as a wall panel would be told.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user