From ac52e97c2840f709333bab66ff4ced3b13f8e70d Mon Sep 17 00:00:00 2001 From: Jonathan Hvid Date: Tue, 12 May 2026 11:58:59 +0200 Subject: [PATCH] feat(route): drop progress dots, move legend below, vary path amplitude MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three coupled changes that all serve the same goal — less furniture above the route, more honest information below it. Progress dots gone. At 5 pills × ~400px per pill the strip was too coarse to feel meaningful; the arrows + edge fades already communicate scroll position. .rr-progress markup, the script logic that updated the .active class, and the .rr-progress / .rr-progress-dot styles are all deleted. Legend moves from beside 'The route' in the section header to below the track, centred. Reading order is now title → walk the path → key, which is the order it makes sense in. The header collapses to just the title on the left and the two arrow buttons on the right. Path amplitude is no longer constant. computeRouteLayout multiplies the base amplitude (120) by a per-item factor that ramps 0.78 (first off-axis item) → 1.18 (last item), so closer-in items swing tighter and further-out items swing wider. The visual effect is subtle but the path now feels hand-planned instead of strictly sinusoidal. Test updated to verify the multiplier — |itemY[2] - midY| now exceeds |itemY[1] - midY| in the 3-item case. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/RoadmapRoute.astro | 99 ++++++++++--------------------- src/lib/roadmap-layout.ts | 18 +++--- tests/roadmap-layout.test.ts | 8 ++- 3 files changed, 47 insertions(+), 78 deletions(-) diff --git a/src/components/RoadmapRoute.astro b/src/components/RoadmapRoute.astro index b456547..1270ba2 100644 --- a/src/components/RoadmapRoute.astro +++ b/src/components/RoadmapRoute.astro @@ -46,26 +46,15 @@ function trailingLine(item: RoadmapItemWithAttribution): string | null { return null; } -// Progress dots — between 2 and 6, scaling with item count. -const progressDots = Math.max(2, Math.min(6, Math.ceil(items.length / 2))); - -// JSON-stringified ids for the nav script's initial-scroll logic. -const itemXByIndex = layout.itemX; -const initialShippingX = lastShippingIndex >= 0 ? itemXByIndex[lastShippingIndex] : 0; +// Stringified x position of the 'you are here' milestone for the +// initial-scroll logic in the nav script. -1 → 0 (no scroll offset). +const initialShippingX = lastShippingIndex >= 0 ? layout.itemX[lastShippingIndex] : 0; ---
- +
-
-

The route

-
    -
  • Shipping
  • -
  • In beta
  • -
  • Exploring
  • -
  • Considering
  • -
-
+

The route

- -