No description
Find a file
Jonathan Hvid 66b460c35f feat(lib): roadmap-layout — coordinate generation for the route component
Pure math, no DOM. computeRouteLayout(opts) takes itemCount + viewport
width and returns trackWidth, pathD, itemX, itemY, cardSide, midY:

- itemX evenly distributes items between padding and viewport-padding,
  expanding the canvas beyond the viewport when itemCount * minSpacingX
  exceeds the available width. Single-item case centres the dot.
- itemY puts the first item on the centreline; subsequent items
  alternate +amplitude / -amplitude so the path snakes gently up and
  down. The route reads as a river rather than a saw-tooth because the
  cubic-bezier control points use the segment midpoint x — that holds
  the tangent flat at each milestone.
- cardSide alternates 'below' / 'above' starting from 'below' on item 0.
  Cards hang from their dot via a thin vertical connector in the
  consuming component.

Also adds travelledStopFor(statuses) — the stop position on the path
stroke gradient where 'travelled' fades into 'ahead'. Clamps to 0.98
even when every item is shipping so the fade is always visible.

9 unit tests cover itemCount 1/2/3/7/20 plus the travelledStop edge
cases (no shipping → 0; all shipping → ≤ 0.98; mixed → exact midpoint).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 11:40:26 +02:00
.claude style: drop eyebrows + body italics across editorial pages 2026-05-12 09:52:29 +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(pulse): council marquee auto-scrolls all 7 members across the page 2026-05-12 11:21:53 +02:00
src feat(lib): roadmap-layout — coordinate generation for the route component 2026-05-12 11:40:26 +02:00
tests feat(lib): roadmap-layout — coordinate generation for the route component 2026-05-12 11:40:26 +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