Round paging follows the finger: faces and dashboards on a track, swiped one to one with the next beside it, turned or sent back on release, rubber-banded at the ends; keys and dots slide the same track; the reading dot a smaller companion of the handle
Docs / docs (push) Successful in 24s
Playwright Tests / test-playwright (1, 2) (push) Failing after 4m14s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m11s
pre-commit / pre-commit (push) Failing after 2m2s
Test Backend / test-backend (push) Failing after 3m23s
Compose Smoke Test / test-compose (push) Successful in 34s
Playwright Tests / merge-reports (push) Successful in 1m33s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Melvin Strobl
2026-10-14 17:08:51 +02:00
co-authored by Claude Opus 5.5
parent 541dbce584
commit 603635f947
7 changed files with 474 additions and 183 deletions
+11 -1
View File
@@ -1,6 +1,6 @@
import { keepPreviousData, useQuery } from "@tanstack/react-query"
import { createFileRoute, redirect } from "@tanstack/react-router"
import { useCallback } from "react"
import { useCallback, useMemo } from "react"
import type { Dashboard } from "@/components/Dashboard/DashboardView"
import { PanelRail } from "@/components/Dashboard/PanelRail"
@@ -66,6 +66,15 @@ function PanelRoute() {
const stacked = useIsMobile()
const rail = dashboards.length > 1
const round = dashboard?.shape === "round"
// The ones either side, which a round one is swiped to and shows the
// names of on the way. Stable, so the canvas is not rebuilt for it.
const at = dashboards.indexOf(current ?? "")
const before = dashboards[at - 1]
const after = dashboards[at + 1]
const around = useMemo(
(): [string | undefined, string | undefined] => [before, after],
[before, after],
)
// Stops at either end, as the faces of one do.
const step = useCallback(
(by: number) => {
@@ -123,6 +132,7 @@ function PanelRoute() {
stacked={stacked}
touch={touch}
onDashboard={rail && round ? step : undefined}
around={rail && round ? around : undefined}
// Drawn on the panel rather than beside it: a screen showing four
// dashboards shows the way between them too.
rail={