feat(timeline): one row per medication, no cap on value lines, range popover

A medication arrived as up to four kinds of item (its own span, its
courses, its dose changes, its pauses) and was drawn item by item, so a
medication with a course read as two bars on two rows. Every item of one
medication now carries the medication's id as `group`, and the lane draws
one row per group: the courses are the stretches it was taken, each dose
change cuts them into pieces labelled with their dose, and a pause is a
gap in the same bar. The selection bar and the phone chronicle list one
entry per medication with the dose in the text.

The value series cap of six is gone. The response carries
`availableSeries`, every series the record can show, and the picker is
one compact "Values (n)" button whose menu lists them. Past the fifth
line the five data colours repeat; every line is named at its left.

Choosing a range opens a popover anchored to the "Range" segment (a sheet
on a phone) with "Apply", so the chart no longer moves; the URL keeps the
range as before. The selection bar sits on the card under a hairline
instead of a grey box, the legend explains the dashed stroke and the
hollow point, and no timeline text joins its parts with a middle dot or
calls an open span "ongoing".
This commit is contained in:
Marc-André Bombeck committed 2026-10-09 15:02:14 +02:00
1 parent bde6880c3e
commit 1440ad4301
37 files changed
+2507 -390

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ export const GET = apiHandler(async (request: Request) => {
}
const seriesKeys = parseSeriesKeys(parsed.data.values);
if (seriesKeys === null) {
return apiError("Unknown value series, or more than six", 422, {
return apiError("Unknown value series", 422, {
errorCode: "timeline.invalid",
});
}