No description
Vanilla TS script at the bottom of RoadmapRoute.astro. No library. - Arrows scrollBy ±72% of the scroll-container's clientWidth, smooth behaviour. Disabled at scroll start/end. - Edge fades (.rr-fade-left / -right) flip opacity 0↔1 at scroll start / end so the affordance disappears when there's nowhere further to go. - Progress dots track scrollLeft/(scrollWidth-clientWidth) percentage, bucketing into dots.length slots. Active dot gets .active (themed in CSS as --on-surface). - On mount, the script reads section.data-initial-x — the SVG x position of the most recent shipping milestone (computed server-side from the layout helper) — and scrolls so that x sits ~25% from the left edge of the viewport. Clamped to [0, scrollWidth-clientWidth]. Member opens /roadmap and immediately sees one shipped item + several ahead-of-them items, not the very start of history. - setTimeout(update, 50) re-measures after first paint settles (especially relevant when SVG fonts or other late-arriving assets shift the trackWidth by a couple of px). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| content | ||
| design | ||
| migrations | ||
| public | ||
| scripts | ||
| src | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| astro.config.mjs | ||
| CLAUDE.md | ||
| DECISIONS.md | ||
| HANDOVER.md | ||
| KNOWN_ISSUES.md | ||
| package.json | ||
| pnpm-lock.yaml | ||
| SPEC.md | ||
| todo.md | ||
| tsconfig.json | ||
| vitest.config.ts | ||