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
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:
co-authored by
Claude Opus 5.5
parent
541dbce584
commit
603635f947
@@ -525,8 +525,8 @@
|
||||
}
|
||||
|
||||
.dui-slider-reading {
|
||||
width: calc(var(--dui-track-size, 0.5rem) * 0.75);
|
||||
height: calc(var(--dui-track-size, 0.5rem) * 0.75);
|
||||
width: var(--dui-track-size, 0.5rem);
|
||||
height: var(--dui-track-size, 0.5rem);
|
||||
background: var(--dui-reading);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,9 +25,10 @@ export const RING_HANDLE = 28
|
||||
/** A stop on the ring — a selector's option, a slider's tick — as a dot this
|
||||
* wide on the ring's centre line. */
|
||||
export const RING_MARK = 6
|
||||
/** What a slider reads beside its value, as a larger dot on the centre line:
|
||||
* told from a stop by its size and its stronger colour. */
|
||||
export const RING_READING = 10
|
||||
/** What a slider reads beside its value, as a smaller companion of the
|
||||
* handle on the centre line: told from a stop by its size and its stronger
|
||||
* colour, and from the handle by its size and its fill. */
|
||||
export const RING_READING = 12
|
||||
/** How long the ring waits after the last notch before it publishes. */
|
||||
export const RING_SETTLE_MS = 300
|
||||
/** The gap's line — a slider's title and value, when what it reads is in
|
||||
@@ -105,8 +106,32 @@ export const barLegend = (rows: number) =>
|
||||
export const chordWidth = (inner: number, rise: number, margin: number) =>
|
||||
Math.floor(2 * Math.sqrt(Math.max(0, inner ** 2 - rise ** 2)) - margin)
|
||||
|
||||
/** A drag this long, mostly along one axis, is a swipe rather than a press. */
|
||||
export const SWIPE = 40
|
||||
/**
|
||||
* Swiping between pages, faces sideways and dashboards up and down. A drag
|
||||
* picks its axis once it has gone `PAGE_SLOP` along one; the page follows it
|
||||
* one to one, and past the last page gives `PAGE_RUBBER` of the drag, at most
|
||||
* `PAGE_OVERSCROLL`. Let go, it turns if it went `PAGE_COMMIT` of the face or
|
||||
* was flung at `PAGE_FLING` a second towards the next page.
|
||||
*/
|
||||
export const PAGE_SLOP = 8
|
||||
export const PAGE_RUBBER = 0.3
|
||||
export const PAGE_OVERSCROLL = 48
|
||||
export const PAGE_COMMIT = 0.25
|
||||
export const PAGE_FLING = 500
|
||||
|
||||
/** Where a page dragged `by` is drawn: under the finger while there is a
|
||||
* page that way (`open`), held back past the last. */
|
||||
export const pageOffset = (by: number, open: boolean) =>
|
||||
open
|
||||
? by
|
||||
: Math.sign(by) * Math.min(PAGE_OVERSCROLL, Math.abs(by) * PAGE_RUBBER)
|
||||
|
||||
/** Whether a drag let go `by` along, at `speed` a second, turns the page. */
|
||||
export const turnsPage = (by: number, speed: number, size: number) =>
|
||||
Math.abs(by) >= PAGE_COMMIT * size ||
|
||||
(Math.abs(by) >= PAGE_SLOP &&
|
||||
Math.sign(speed) === Math.sign(by) &&
|
||||
Math.abs(speed) >= PAGE_FLING)
|
||||
|
||||
/** How long a change of dashboard shows which one it landed on. */
|
||||
export const ANNOUNCE_MS = 1000
|
||||
|
||||
Reference in New Issue
Block a user