From b7eef0dff4d450c72d4e1bc16ed430695603cdcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 11 Oct 2026 13:39:20 +0200 Subject: [PATCH 1/2] feat(charts): drop the explanatory line under day-linked charts --- e2e/day-doors.spec.ts | 5 +-- messages/de.json | 7 ---- messages/en.json | 7 ---- messages/es.json | 7 ---- messages/fr.json | 7 ---- messages/it.json | 7 ---- messages/ko.json | 7 ---- messages/pl.json | 7 ---- .../__tests__/health-chart-day-links.test.tsx | 5 +-- src/components/charts/compliance-heatmap.tsx | 2 - src/components/charts/mood-heatmap.tsx | 6 +-- .../charts/nutrient-daily-bar-chart.tsx | 1 - src/components/day/chart-day-links.tsx | 25 +++++------- src/components/day/chart-day.tsx | 38 ------------------- .../insights/sleep-stage-stacked-bar.tsx | 1 - 15 files changed, 13 insertions(+), 119 deletions(-) diff --git a/e2e/day-doors.spec.ts b/e2e/day-doors.spec.ts index 6ef0f427b..c290471b5 100644 --- a/e2e/day-doors.spec.ts +++ b/e2e/day-doors.spec.ts @@ -84,12 +84,9 @@ test.describe("every chart drawn in days opens its days", () => { .locator('[data-slot="chart-plot"][data-day-links="true"]') .first(); await expect(plot).toBeVisible(); - // Under the chart: the caption and the row of day dots, which draws the + // Under the chart: the row of day dots, which draws the // days the index names, one of them ringed as notable. const rug = page.locator('[data-slot="day-rug"]').first(); - await expect( - page.locator('[data-slot="chart-day-caption"]').first(), - ).toBeVisible(); await expect(rug.locator("[data-day]").first()).toBeAttached(); await expect(rug.locator('[data-notable="true"]')).toHaveCount(1); diff --git a/messages/de.json b/messages/de.json index 3ddbf9f68..4e1787f96 100644 --- a/messages/de.json +++ b/messages/de.json @@ -12254,7 +12254,6 @@ "notShared": "Einige Bereiche sind für dich nicht freigegeben.", "inTimeline": "In der Zeitleiste", "askCoach": "Im Coach nach diesem Tag fragen", - "chartHint": "Klick auf einen Punkt öffnet den Tag.", "loadFailed": "Dieser Tag konnte nicht geladen werden.", "dayOf": "Tag {n} von {m}", "dayN": "Tag {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Erfassen", "inTimelineShort": "Zeitleiste", "askCoachPrompt": "Was war am {date}?", - "chartHintTouch": "Antippen zeigt den Wert.", - "chartHintBar": "Klick auf einen Balken öffnet den Tag.", - "chartHintTouchBar": "Antippen zeigt die Werte.", - "chartHintCell": "Klick auf einen Tag öffnet ihn.", - "chartHintTouchCell": "Antippen zeigt den Wert des Tages.", "coachChips": "Tage in dieser Antwort", "description": "Alles, was deine Einträge für diesen Tag enthalten.", "openDocument": "Dokument öffnen", "previousReading": "Vorher, {date}", - "rugLegend": "Punkte unter der Achse markieren Tage mit Einträgen, ein Ring einen auffälligen Tag.", "sheetExpand": "Auf volle Höhe aufziehen", "sheetShrink": "Verkleinern", "valuesLegend": "Punkt für diesen Tag, Strich für die 30 Tage davor", diff --git a/messages/en.json b/messages/en.json index 22c59c452..1bc7f8ed7 100644 --- a/messages/en.json +++ b/messages/en.json @@ -12254,7 +12254,6 @@ "notShared": "Some areas are not shared with you.", "inTimeline": "In the timeline", "askCoach": "Ask the Coach about this day", - "chartHint": "Click a point to open its day.", "loadFailed": "This day could not be loaded.", "dayOf": "Day {n} of {m}", "dayN": "Day {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Log", "inTimelineShort": "Timeline", "askCoachPrompt": "What happened on {date}?", - "chartHintTouch": "Tap a point to see its value.", - "chartHintBar": "Click a bar to open its day.", - "chartHintTouchBar": "Tap a bar to see its values.", - "chartHintCell": "Click a day to open it.", - "chartHintTouchCell": "Tap a day to see its value.", "coachChips": "Days in this answer", "description": "Everything your records hold for this day.", "openDocument": "Open document", "previousReading": "Before, {date}", - "rugLegend": "Dots under the axis mark days with entries, a ring marks a notable day.", "sheetExpand": "Expand to full height", "sheetShrink": "Shrink", "valuesLegend": "Dot for this day, bar for the 30 days before", diff --git a/messages/es.json b/messages/es.json index 6bae1f78f..56306959e 100644 --- a/messages/es.json +++ b/messages/es.json @@ -12254,7 +12254,6 @@ "notShared": "Algunas áreas no están compartidas contigo.", "inTimeline": "En la cronología", "askCoach": "Preguntar al Coach por este día", - "chartHint": "Haz clic en un punto para abrir su día.", "loadFailed": "No se pudo cargar este día.", "dayOf": "Día {n} de {m}", "dayN": "Día {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Registrar", "inTimelineShort": "Cronología", "askCoachPrompt": "¿Qué pasó el {date}?", - "chartHintTouch": "Toca un punto para ver su valor.", - "chartHintBar": "Haz clic en una barra para abrir su día.", - "chartHintTouchBar": "Toca una barra para ver sus valores.", - "chartHintCell": "Haz clic en un día para abrirlo.", - "chartHintTouchCell": "Toca un día para ver su valor.", "coachChips": "Días en esta respuesta", "description": "Todo lo que tus registros contienen para este día.", "openDocument": "Abrir documento", "previousReading": "Antes, {date}", - "rugLegend": "Los puntos bajo el eje marcan días con entradas, y un anillo, un día destacado.", "sheetExpand": "Ampliar a toda la altura", "sheetShrink": "Reducir", "valuesLegend": "Punto para este día, barra para los 30 días anteriores", diff --git a/messages/fr.json b/messages/fr.json index ebec3595d..eca1837d1 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -12254,7 +12254,6 @@ "notShared": "Certaines rubriques ne sont pas partagées avec vous.", "inTimeline": "Dans la chronologie", "askCoach": "Interroger le Coach sur ce jour", - "chartHint": "Cliquez sur un point pour ouvrir son jour.", "loadFailed": "Impossible de charger ce jour.", "dayOf": "Jour {n} sur {m}", "dayN": "Jour {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Enregistrer", "inTimelineShort": "Chronologie", "askCoachPrompt": "Que s’est-il passé le {date} ?", - "chartHintTouch": "Touchez un point pour voir sa valeur.", - "chartHintBar": "Cliquez sur une barre pour ouvrir son jour.", - "chartHintTouchBar": "Touchez une barre pour voir ses valeurs.", - "chartHintCell": "Cliquez sur un jour pour l’ouvrir.", - "chartHintTouchCell": "Touchez un jour pour voir sa valeur.", "coachChips": "Jours dans cette réponse", "description": "Tout ce que vos entrées contiennent pour ce jour.", "openDocument": "Ouvrir le document", "previousReading": "Avant, {date}", - "rugLegend": "Les points sous l’axe marquent les jours avec entrées, un anneau un jour remarquable.", "sheetExpand": "Agrandir en pleine hauteur", "sheetShrink": "Réduire", "valuesLegend": "Point pour ce jour, barre pour les 30 jours précédents", diff --git a/messages/it.json b/messages/it.json index 992c4b835..d55293eff 100644 --- a/messages/it.json +++ b/messages/it.json @@ -12254,7 +12254,6 @@ "notShared": "Alcune aree non sono condivise con te.", "inTimeline": "Nella cronologia", "askCoach": "Chiedi al Coach di questo giorno", - "chartHint": "Fai clic su un punto per aprire il suo giorno.", "loadFailed": "Impossibile caricare questo giorno.", "dayOf": "Giorno {n} di {m}", "dayN": "Giorno {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Registra", "inTimelineShort": "Cronologia", "askCoachPrompt": "Cosa è successo il {date}?", - "chartHintTouch": "Tocca un punto per vederne il valore.", - "chartHintBar": "Fai clic su una barra per aprire il suo giorno.", - "chartHintTouchBar": "Tocca una barra per vederne i valori.", - "chartHintCell": "Fai clic su un giorno per aprirlo.", - "chartHintTouchCell": "Tocca un giorno per vederne il valore.", "coachChips": "Giorni in questa risposta", "description": "Tutto ciò che le tue voci contengono per questo giorno.", "openDocument": "Apri documento", "previousReading": "Prima, {date}", - "rugLegend": "I punti sotto l’asse indicano i giorni con voci, un anello un giorno rilevante.", "sheetExpand": "Espandi a tutta altezza", "sheetShrink": "Riduci", "valuesLegend": "Punto per questo giorno, barra per i 30 giorni precedenti", diff --git a/messages/ko.json b/messages/ko.json index a813b4978..dc9c95465 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -12254,7 +12254,6 @@ "notShared": "일부 영역은 공유되지 않았어요.", "inTimeline": "타임라인에서 보기", "askCoach": "이 날에 대해 코치에게 묻기", - "chartHint": "점을 클릭하면 그날이 열려요.", "loadFailed": "이 날을 불러오지 못했어요.", "dayOf": "{m}일 중 {n}일째", "dayN": "{n}일째", @@ -12276,16 +12275,10 @@ "captureShort": "기록", "inTimelineShort": "타임라인", "askCoachPrompt": "{date}에 무슨 일이 있었나요?", - "chartHintTouch": "점을 탭하면 값이 보여요.", - "chartHintBar": "막대를 클릭하면 그날이 열려요.", - "chartHintTouchBar": "막대를 탭하면 값이 보여요.", - "chartHintCell": "날짜 칸을 클릭하면 그날이 열려요.", - "chartHintTouchCell": "날짜 칸을 탭하면 값이 보여요.", "coachChips": "이 답변에 쓰인 날", "description": "이 날에 대한 모든 기록이에요.", "openDocument": "문서 열기", "previousReading": "이전, {date}", - "rugLegend": "축 아래 점은 기록이 있는 날을, 고리는 눈에 띄는 날을 표시해요.", "sheetExpand": "전체 높이로 펼치기", "sheetShrink": "줄이기", "valuesLegend": "점은 이 날, 막대는 직전 30일", diff --git a/messages/pl.json b/messages/pl.json index 9950e6411..a82738385 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -12254,7 +12254,6 @@ "notShared": "Niektóre obszary nie są Ci udostępnione.", "inTimeline": "Na osi czasu", "askCoach": "Zapytaj Coacha o ten dzień", - "chartHint": "Kliknij punkt, aby otworzyć jego dzień.", "loadFailed": "Nie udało się wczytać tego dnia.", "dayOf": "Dzień {n} z {m}", "dayN": "Dzień {n}", @@ -12276,16 +12275,10 @@ "captureShort": "Zapisz", "inTimelineShort": "Oś czasu", "askCoachPrompt": "Co się działo {date}?", - "chartHintTouch": "Dotknij punktu, aby zobaczyć wartość.", - "chartHintBar": "Kliknij słupek, aby otworzyć jego dzień.", - "chartHintTouchBar": "Dotknij słupka, aby zobaczyć wartości.", - "chartHintCell": "Kliknij dzień, aby go otworzyć.", - "chartHintTouchCell": "Dotknij dnia, aby zobaczyć jego wartość.", "coachChips": "Dni w tej odpowiedzi", "description": "Wszystko, co Twoje wpisy zawierają dla tego dnia.", "openDocument": "Otwórz dokument", "previousReading": "Wcześniej, {date}", - "rugLegend": "Punkty pod osią oznaczają dni z wpisami, pierścień dzień godny uwagi.", "sheetExpand": "Rozwiń na pełną wysokość", "sheetShrink": "Zmniejsz", "valuesLegend": "Punkt to ten dzień, pasek to 30 dni wcześniej", diff --git a/src/components/charts/__tests__/health-chart-day-links.test.tsx b/src/components/charts/__tests__/health-chart-day-links.test.tsx index 0e944731d..6c68fed61 100644 --- a/src/components/charts/__tests__/health-chart-day-links.test.tsx +++ b/src/components/charts/__tests__/health-chart-day-links.test.tsx @@ -52,11 +52,10 @@ describe(" day links", () => { vi.resetModules(); }); - it("a metric page's chart opens its days: plot, caption and table", async () => { + it("a metric page's chart opens its days: plot and table", async () => { const html = await renderChart({ dayLinks: true, showDataTable: true }); expect(html).toContain('data-day-links="true"'); - expect(html).toContain('data-slot="chart-day-caption"'); - expect(html).toContain("Click a point to open its day."); + expect(html).not.toContain('data-slot="chart-day-caption"'); const links = html.match(/data-slot="day-link"/g) ?? []; expect(links).toHaveLength(10); expect(html).toMatch(/href="[^"]*\?day=\d{4}-\d{2}-\d{2}"/); diff --git a/src/components/charts/compliance-heatmap.tsx b/src/components/charts/compliance-heatmap.tsx index 67bad9159..d25956a3c 100644 --- a/src/components/charts/compliance-heatmap.tsx +++ b/src/components/charts/compliance-heatmap.tsx @@ -1,6 +1,5 @@ "use client"; -import { ChartDayCaption } from "@/components/day/chart-day"; import { dayAnchor } from "@/components/day/chart-day-links"; import { OPEN_DAY_CELL, useHeatmapDay } from "@/components/day/heatmap-day"; import { useCalendarDate } from "@/hooks/use-calendar-date"; @@ -368,7 +367,6 @@ export function ComplianceHeatmap({ {activeCells.length > 0 ? ( <> - {/* The keyboard and screen-reader way to each active day's doses, and to the day itself. */}
-
@@ -411,7 +408,6 @@ export function MoodHeatmap({
{loggedCells.length > 0 ? ( <> - {/* The keyboard and screen-reader way to each logged day's value, and to the day itself. */} ({ timestamp: dayAnchor(p.day) }))} axis="band" - mark="bar" // The y axis (44) on the left, the margin (12) on the right. insetLeft={44} insetRight={12} diff --git a/src/components/day/chart-day-links.tsx b/src/components/day/chart-day-links.tsx index bd4f21dcc..69713c988 100644 --- a/src/components/day/chart-day-links.tsx +++ b/src/components/day/chart-day-links.tsx @@ -6,12 +6,10 @@ import type { DateKey } from "@/lib/day/contract"; import { prefersReducedMotion } from "@/lib/charts/reduced-motion"; import { - ChartDayCaption, DayRug, TooltipDayAction, useCoarsePointer, type ChartDayAxis, - type ChartDayMark, } from "./chart-day"; import { openDay, useOpenDay, type DayFocus } from "./day-layer-controller"; import { isOpenableDay } from "./day-url"; @@ -35,7 +33,7 @@ import { useTodayKey } from "./use-today-key"; * days by accident; * - the open day is marked with `OPEN_DAY_LINE` (a dashed vertical line) * at `openIndex`; - * - `ChartDayFooter` draws the row of day dots and the one-line caption. + * - `ChartDayFooter` draws the row of day dots. * * The caller says, per drawn point and in data order, which calendar day the * point stands for, or `null` when it stands for none (a week or month @@ -190,7 +188,7 @@ export function useChartDayLinks({ } /** - * The row of day dots and the caption under a day-linked chart. Nothing when + * The row of day dots under a day-linked chart. Nothing when * the chart is not day-linked or draws no points. */ export function ChartDayFooter({ @@ -199,7 +197,6 @@ export function ChartDayFooter({ axis = "index", insetLeft, insetRight, - mark = "point", }: { links: Pick & Partial>; @@ -208,20 +205,16 @@ export function ChartDayFooter({ axis?: ChartDayAxis; insetLeft: number; insetRight: number; - mark?: ChartDayMark; }) { if (!links.active || points.length === 0) return null; return ( - <> - - - + ); } diff --git a/src/components/day/chart-day.tsx b/src/components/day/chart-day.tsx index 4280d9d45..538c1354e 100644 --- a/src/components/day/chart-day.tsx +++ b/src/components/day/chart-day.tsx @@ -257,41 +257,3 @@ export function DayRug({
); } - -/** - * What a day-linked surface is made of, which names the thing to click in - * the caption: a point on a line, a bar, or a cell of a calendar. - */ -export type ChartDayMark = "point" | "bar" | "cell"; - -const HINT_KEYS: Record = { - point: { fine: "day.chartHint", coarse: "day.chartHintTouch" }, - bar: { fine: "day.chartHintBar", coarse: "day.chartHintTouchBar" }, - cell: { fine: "day.chartHintCell", coarse: "day.chartHintTouchCell" }, -}; - -/** - * The one line under a day-linked chart: what the dots mean (when the chart - * has the row of dots), and the click. - */ -export function ChartDayCaption({ - coarse, - mark = "point", - rug = true, -}: { - coarse: boolean; - mark?: ChartDayMark; - rug?: boolean; -}) { - const { t } = useTranslations(); - const hint = HINT_KEYS[mark]; - return ( -

- {rug ? {t("day.rugLegend")} : null} - {coarse ? t(hint.coarse) : t(hint.fine)} -

- ); -} diff --git a/src/components/insights/sleep-stage-stacked-bar.tsx b/src/components/insights/sleep-stage-stacked-bar.tsx index 7bb21701d..8dbd0a833 100644 --- a/src/components/insights/sleep-stage-stacked-bar.tsx +++ b/src/components/insights/sleep-stage-stacked-bar.tsx @@ -606,7 +606,6 @@ export function SleepStageStackedBar({ breakdown }: SleepStageStackedBarProps) { : 0, }))} axis="band" - mark="bar" // The plot's margin (8) + the y axis (60) on the left, the // margin (16) on the right. insetLeft={8 + 60} From 8cd6cf3c062dfc210e507f3a5f7349819af1a959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 11 Oct 2026 13:40:19 +0200 Subject: [PATCH 2/2] feat(timeline): open on three months unless the URL names a zoom --- e2e/timeline.spec.ts | 34 +++++++++++++++-------- src/components/timeline/timeline-view.tsx | 6 ++-- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/e2e/timeline.spec.ts b/e2e/timeline.spec.ts index 07cf90bc4..e9ec9e2a3 100644 --- a/e2e/timeline.spec.ts +++ b/e2e/timeline.spec.ts @@ -67,6 +67,18 @@ test("is off by default: no navigation entry, a deep link meets the notice", asy await expect(page.locator(navEntry)).toHaveCount(0); }); +test("opens on three months when the URL names no zoom", async ({ page }) => { + await mockTimeline(page, "ready", TODAY); + await page.goto("/settings/modules"); + await setTimelineModule(page, true); + await page.goto("/timeline"); + await expect( + page.locator('[data-slot="timeline-zoom"] [data-value="quarter"]'), + ).toHaveAttribute("aria-checked", "true", { timeout: 20_000 }); + // The next test starts from the module switched off. + await setTimelineModule(page, false); +}); + test("switching it on opens the readiness inventory, which leads to the timeline", async ({ page, }) => { @@ -113,7 +125,7 @@ test("the timeline hands the selected day to the day view through ?day=", async }) => { await setTimelineModuleOn(page); const log = await mockTimeline(page, "full", TODAY); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const chart = page.locator('[data-slot="timeline-chart"]'); await expect(chart).toBeVisible({ timeout: 20_000 }); @@ -196,7 +208,7 @@ test("value lines: quarterly means, gaps kept, short ones bridged, as many as th }) => { await setTimelineModuleOn(page); const log = await mockTimeline(page, "full", TODAY); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const sys = page.locator('svg [data-series="BLOOD_PRESSURE_SYS"]'); await expect(sys).toBeVisible({ timeout: 20_000 }); await expect( @@ -346,7 +358,7 @@ test("each mean's dot sits on the middle of its text and never wraps apart from // A narrow chart: the selection bar's means wrap between units only. await page.setViewportSize({ width: 800, height: 900 }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); await expect(page.locator('[data-slot="timeline-chart"]')).toBeVisible({ timeout: 20_000, }); @@ -360,7 +372,7 @@ test("each mean's dot sits on the middle of its text and never wraps apart from // The phone chronicle's means follow the same rule. await page.setViewportSize({ width: 390, height: 844 }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); await check("timeline-chronicle-means"); await testInfo.attach("chronicle-means-390", { body: await page.screenshot(), @@ -373,7 +385,7 @@ test("one medication is one row: its doses cut the bar, its pause is a gap in it }) => { await setTimelineModuleOn(page); await mockTimeline(page, "full", TODAY); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const lane = page.locator('svg [data-lane="medications"]'); await expect(lane).toBeVisible({ timeout: 20_000 }); // The medication's own span is not drawn beside its course. @@ -423,7 +435,7 @@ test("a chosen range lives in the URL: reload keeps it, Back returns to it", asy }) => { await setTimelineModuleOn(page); const log = await mockTimeline(page, "full", TODAY); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const chart = page.locator('[data-slot="timeline-chart"]'); await expect(chart).toBeVisible({ timeout: 20_000 }); const desktop = page.locator('[data-slot="timeline-desktop"]'); @@ -555,7 +567,7 @@ test("on a phone the chronicle replaces the chart and opens a day per row", asyn await setTimelineModuleOn(page); await mockTimeline(page, "full", TODAY); await page.setViewportSize({ width: 390, height: 844 }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const chronicle = page.locator('[data-slot="timeline-chronicle"]'); await expect(chronicle).toBeVisible({ timeout: 20_000 }); @@ -596,7 +608,7 @@ test("on a phone the chronicle replaces the chart and opens a day per row", asyn expect((await chronicle.boundingBox())!.y).toBe(listTop); await sheet.locator('[data-slot="timeline-range-apply"]').click(); await expect(page).toHaveURL(/[?&]zoom=range&from=\d{4}-\d{2}-\d{2}/); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); await expect(chronicle).toBeVisible({ timeout: 20_000 }); await page @@ -703,7 +715,7 @@ test("a value point reads on its own, by pointer and by keyboard", async ({ await setTimelineModuleOn(page); await mockTimeline(page, "full", TODAY); await page.setViewportSize({ width: 1440, height: 900 }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); const targets = page.locator('[data-slot="timeline-point-target"]'); await expect(targets.first()).toBeAttached({ timeout: 20_000 }); @@ -868,7 +880,7 @@ test("the day's strip stays at the right edge, opens and closes the day, and nev for (const width of [1280, 1440, 1920]) { await page.setViewportSize({ width, height: 900 }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); await expect( page.locator('[data-slot="timeline-chart"] > svg'), ).toBeVisible({ timeout: 20_000 }); @@ -929,7 +941,7 @@ test("the day's strip stays at the right edge, opens and closes the day, and nev await page.setViewportSize({ width: 1440, height: 900 }); for (const colorScheme of ["light", "dark"] as const) { await page.emulateMedia({ colorScheme }); - await page.goto("/timeline"); + await page.goto("/timeline?zoom=all"); await toggle.click(); await expect(panel).toHaveAttribute("data-shell", "docked"); await testInfo.attach(`day-strip-1440-${colorScheme}`, { diff --git a/src/components/timeline/timeline-view.tsx b/src/components/timeline/timeline-view.tsx index 0be0e8eec..d375c18b4 100644 --- a/src/components/timeline/timeline-view.tsx +++ b/src/components/timeline/timeline-view.tsx @@ -146,10 +146,10 @@ export function TimelineView() { const canAddLifeEvent = !caps.inSharedRecord; // The zoom and a chosen range live in the URL (`timeline-url.ts`), so Back - // and a bookmark return to them. Without a `zoom`, an incoming `?day=` - // opens three months around that day and anything else the whole record. + // and a bookmark return to them. Without a `zoom` the page opens on three + // months: around an incoming `?day=`, otherwise up to today. const urlState = parseTimelineUrl(searchParams, today); - const zoom: TimelineZoom = urlState.zoom ?? (dayParam ? "quarter" : "all"); + const zoom: TimelineZoom = urlState.zoom ?? "quarter"; const range = zoom === "range" ? urlState.range : null; const [grouping, setGrouping] = useState("month"); // The selection follows `?day=` (Back, Forward, the day panel's previous