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

This commit is contained in:
Melvin Strobl
2026-10-14 17:08:51 +02:00
parent c294789d85
commit d8e9fbda26
7 changed files with 474 additions and 183 deletions
@@ -347,6 +347,7 @@ export function DashboardView({
rail,
editing,
onDashboard,
around,
}: {
dashboard: Dashboard
renderWidget?: (widget: WidgetDef) => React.ReactNode
@@ -358,8 +359,9 @@ export function DashboardView({
* stacked editor draws through here, where the canvas draws its own grid. */
editing?: boolean
/** A round one's way to the panel's other dashboards: next (1) or
* previous (-1). */
* previous (-1), and their names. */
onDashboard?: (by: number) => void
around?: [string | undefined, string | undefined]
}) {
const all = widgetsOf(dashboard)
const round = isRound(dashboard)
@@ -397,6 +399,7 @@ export function DashboardView({
dashboard={dashboard}
size={canvasOf(dashboard).width}
onDashboard={onDashboard}
around={around}
/>
) : (
<WidgetGrid