feat(timeline): add a chosen range as a fourth zoom

Beside All, 12 months and 3 months the timeline takes a range of the
person's own choosing, from and to, through the app's date field. Each
change is clamped softly: never past today, never before the record's
first entry, never inverted, never longer than fifteen years. On a phone,
where the chronicle has no zoom control, a range button opens the same
fields with a way back to the whole record. A range with nothing in it
keeps its fields instead of the empty-record notice.

The zoom and the range live in the URL (zoom, from, to), so Back and a
bookmark return to them; a parameter that does not read falls back to
All. The API accepts zoom=range with both ends, at most fifteen years,
and picks the bucket by its length: quarters from two years, months from
120 days, weeks from 42 days and single days below, a new day bucket
whose dashed bridge spans at most three missing days. A range borrows
the grid and the keyboard steps of the fixed zoom nearest its length.
The selection bar heads a day bucket with that day.
This commit is contained in:
Marc-André Bombeck committed 2026-10-09 10:02:37 +02:00
1 parent f8557f57a0
commit 61155d1856
26 files changed
+839 -59

No files matched your search

+9 -1
View File
@@ -23449,11 +23449,16 @@ paths:
name: zoom
schema:
default: all
description: "`range` is a chosen stretch: it requires `from` and `to`, at most 15 years apart, and its value series
average quarters, months, weeks or days by its length."
type: string
enum:
- all
- year
- quarter
- range
description: "`range` is a chosen stretch: it requires `from` and `to`, at most 15 years apart, and its value series
average quarters, months, weeks or days by its length."
- in: query
name: from
schema:
@@ -81511,6 +81516,7 @@ components:
- all
- year
- quarter
- range
range:
type: object
properties:
@@ -81567,8 +81573,10 @@ components:
- quarter
- month
- week
- day
description: "The span every series point averages: `quarter` for a multi-year `all`, `month` for `year` and an `all`
under two years, `week` for `quarter`."
under two years, `week` for `quarter`, and for a `range` by its length: `quarter` from two years, `month`
from 120 days, `week` from 42 days, `day` below."
series:
type: array
items: