feat(web): scroll-revealed timeline axis overlay #1390

Merged
chris merged 2 commits from ui/timeline-axis-overlay into main 2026-10-25 20:47:14 +01:00
Owner

Summary

  • Timeline axis no longer reserves horizontal space: pr-16 sm:pr-24 gutter removed from the timeline section, OnThisDay carousel and AppShell desktop controls row — photos use full width.
  • Axis is now an overlay that slides in from the right only after meaningful scrolling (accumulated |Δy| ≥ 320px within a 300ms velocity window; single wheel notches, slow drifts and programmatic jumps don't reveal it).
  • Stays visible while scrolling keeps crossing the threshold; fades out (240ms opacity+transform, prefers-reduced-motion aware) after 1.8s idle. Hover / keyboard focus / drag on the rail reveal and hold it.
  • New pure helper timelineAxisMomentum.ts + 10 unit tests covering notch-vs-flick, drift, jump classification and window boundaries.

Testing

  • npm run check: 0 errors (20 pre-existing unrelated warnings)
  • npm run test:unit: 331 passed (43 files), incl. 10 new timelineAxisMomentum.spec.ts tests
## Summary - Timeline axis no longer reserves horizontal space: `pr-16 sm:pr-24` gutter removed from the timeline section, OnThisDay carousel and AppShell desktop controls row — photos use full width. - Axis is now an overlay that slides in from the right only after meaningful scrolling (accumulated |Δy| ≥ 320px within a 300ms velocity window; single wheel notches, slow drifts and programmatic jumps don't reveal it). - Stays visible while scrolling keeps crossing the threshold; fades out (240ms opacity+transform, `prefers-reduced-motion` aware) after 1.8s idle. Hover / keyboard focus / drag on the rail reveal and hold it. - New pure helper `timelineAxisMomentum.ts` + 10 unit tests covering notch-vs-flick, drift, jump classification and window boundaries. ## Testing - `npm run check`: 0 errors (20 pre-existing unrelated warnings) - `npm run test:unit`: 331 passed (43 files), incl. 10 new `timelineAxisMomentum.spec.ts` tests
feat(web): turn timeline axis into a scroll-revealed overlay
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 9m20s
ae6f3fcea5
The right-hand timeline axis no longer reserves a layout gutter and is
hidden until the user scrolls with intent; it slides in over the photos
and fades out when idle.

- Drop the pr-16/sm:pr-24 axis gutters (+page.svelte timeline section,
  OnThisDayCarousel, and the AppShell desktop toolbar row whose padding
  only mirrored the timeline gutter). Photos use the full content width.
- New pure helper timelineAxisMomentum.ts: accumulate |deltaY| across
  window scroll events, reset when the gap exceeds 300ms, reveal at
  >=320px (~1/3 viewport, three brisk wheel notches). A single event
  over 1200px is classified as a programmatic jump (deep-link ?y=
  restore, axis day jump) and resets instead of adding, so restores do
  not reveal the axis. Covered by timelineAxisMomentum.spec.ts.
- TimelineAxis keeps its props/API: it now owns a passive scroll
  listener and a visibility state. Visible state holds while the
  pointer is on the rail, while it has keyboard focus (focusin reveals,
  focusout schedules the hide), and never hides mid-drag (existing
  axis-dragging logic untouched). Hidden state is opacity-0 +
  translate-x-[120%] + pointer-events-none, so it never steals photo
  hover/clicks; transitions are opacity/transform only (240ms ease-out)
  and disable under prefers-reduced-motion (utility + CSS fallback).
- Strengthen the floating scrim (neutral-950/80 -> /40 gradient,
  backdrop-blur 3px, text-shadow on year labels, shadow on month dots)
  so the rail stays legible over bright photos.
- Idle hide delay 1.8s; continuous scrolling keeps refreshing it. If
  the page is not scrollable no momentum accumulates, so the axis never
  appears on its own.

Validation: npm run check (0 errors) and npm run test:unit (43 files,
331 tests) green in apps/web.
test(web): reveal the timeline axis via real wheel gestures in scroll-stability specs
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 7m6s
4d66c27532
The axis overlay is hidden until meaningful scroll (aria-hidden +
pointer-events-none), so both scroll-stability tests timed out resolving
getByRole('scrollbar'). Reveal it the way a user does: two 400px wheel
notches 120ms apart accumulate past the 320px reveal threshold while
staying under the >1200px programmatic-jump classifier, then wait with
toBeVisible. A single wheel event cannot reveal the axis at all: the
momentum accumulator adopts the first scroll observation as its baseline
(a coalesced wheel produces exactly one scroll event), so the counted
gesture starts with the second event.

The jump specs assert unchanged scroll/pin behavior; only the reveal
step is new. Extra day fetches triggered by the test-2 gesture drain
through its existing pendingDayRequests poll.
chris merged commit 448eeb1349 into main 2026-10-25 20:47:14 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1390
No description provided.