No description
Find a file
Jonathan Hvid f90480bc8b feat(route): unified scroll — drag with momentum + wheel + animated glide
Replaces the snap-based scroll-by-arrow model with one that handles
three input modalities feeding the same scroll state. Result: the
track glides continuously instead of clicking into milestones.

Stripped:
  - scroll-snap-type: x mandatory on .rr-scroll
  - scroll-behavior: smooth on .rr-scroll
  - scroll-snap-align: center on .rr-dot
  - The fades-only updateNav stub from commit 2

Added on .rr-scroll:
  - cursor: grab → grabbing on .rr-dragging
  - touch-action: pan-y so vertical page-scroll passes through on mobile
    while horizontal drags activate the route's own drag handler
  - user-select: none stops text selection mid-drag
  - .rr-dragging .rr-card { pointer-events: none } so a hover-reveal
    can't pop open while the track is being dragged

Script (vanilla, ~140 lines):
  - animateScrollTo(target, durationMs): cubic-ease-out via RAF.
    Cancels any existing momentum or animation before starting.
  - Wheel handler: vertical deltaY translates to horizontal scrollLeft
    when |deltaX| < |deltaY|; horizontal trackpad gestures pass through
    1:1 unscaled. preventDefault on this scroll element only — vertical
    wheel elsewhere on the page scrolls the page as normal.
  - Pointer-drag: pointerdown captures the start position + scrollLeft;
    pointermove updates scrollLeft and tracks velocity in px/ms over
    the most recent sample. setPointerCapture for cross-element drag.
  - Momentum on release: signed velocity × 16ms decays at 0.93 per
    frame, stops below 0.4 px/frame. Direction inverted because
    dragging right moves scrollLeft left.
  - Click vs drag discrimination at 5px total movement: under 5px,
    the synthetic click passes through (card navigates); over 5px,
    a capturing-phase click suppressor on the scroll element eats
    the next click so a drag-then-release-over-a-card doesn't
    accidentally navigate.
  - Advance arrow click now runs animateScrollTo(scrollLeft + 60% of
    viewport, 480ms) instead of the placeholder native scrollBy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 15:19:13 +02:00
.claude style(nav): active link is colour + weight only — drop bullet, italic, case swap 2026-05-12 14:53:11 +02:00
content feat: database schema, migrations, and seed data 2026-04-18 22:43:16 +02:00
design chore: add Innofounder logo to public, wire to home page 2026-04-19 20:36:54 +02:00
migrations feat(db): roadmap_items.metadata_text + admin field 2026-05-12 11:39:18 +02:00
public chore: add Innofounder logo to public, wire to home page 2026-04-19 20:36:54 +02:00
scripts feat(banner): editorial dispatch banner — title + 2-paragraph excerpt + author block 2026-05-12 14:38:51 +02:00
src feat(route): unified scroll — drag with momentum + wheel + animated glide 2026-05-12 15:19:13 +02:00
tests fix(route): cards grow toward centreline — fixes top/bottom clipping at the source 2026-05-12 14:43:41 +02:00
.env.example feat: database schema, migrations, and seed data 2026-04-18 22:43:16 +02:00
.gitignore wip: scaffold and index before style-guide 2026-04-18 16:09:49 +02:00
astro.config.mjs feat: database schema, migrations, and seed data 2026-04-18 22:43:16 +02:00
CLAUDE.md wip: scaffold and index before style-guide 2026-04-18 16:09:49 +02:00
DECISIONS.md docs: document decisions D-15 through D-18 2026-04-19 20:32:09 +02:00
HANDOVER.md docs: HANDOVER.md — build summary and next steps 2026-04-18 22:54:48 +02:00
KNOWN_ISSUES.md feat(db): add migration 0003 for council portal schema 2026-05-11 14:39:07 +02:00
package.json chore(demo): seed-demo.js + utc fix for last_seen_at 2026-05-11 15:04:11 +02:00
pnpm-lock.yaml feat: database schema, migrations, and seed data 2026-04-18 22:43:16 +02:00
SPEC.md wip: scaffold and index before style-guide 2026-04-18 16:09:49 +02:00
todo.md docs: capture deferred home-page features in todo.md 2026-05-11 17:04:40 +02:00
tsconfig.json wip: scaffold and index before style-guide 2026-04-18 16:09:49 +02:00
vitest.config.ts test: vitest suite — pulse status, vote uniqueness, home route 2026-05-11 14:45:55 +02:00