From fde07b1f119f5b573a8a3b981e19249aaaea303a Mon Sep 17 00:00:00 2001 From: Jonathan Hvid Date: Tue, 12 May 2026 11:56:01 +0200 Subject: [PATCH] =?UTF-8?q?fix(route):=20track=20580=20+=20140px=20scroll-?= =?UTF-8?q?container=20padding=20=E2=80=94=20no=20more=20clipping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The route was clipping at three places: top and bottom of hovered cards (the track was only 460 tall) and at the left/right viewport edges (first card half-off-screen at scrollLeft 0, last card off the right at scrollEnd). Track height: default trackHeight in roadmap-layout 460 → 580; .rr-track inline-style and the SVG height matched. midY now 290. Path centreline stays in the visual centre and gains 60px breathing room above + 60px below — which is exactly the room a hovered card needs to expand into. Scroll-container padding: .rr-scroll gains 140px of horizontal padding plus matching scroll-padding-left/right so snap-stops land cleanly. The 140 figure is 220px card-width / 2 + 30px buffer, so the first and last cards have a full card-width of clear space inside the viewport at the scroll extremes. Layout helper test verifies midY === 290. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/RoadmapRoute.astro | 11 ++++++++--- src/lib/roadmap-layout.ts | 2 +- tests/roadmap-layout.test.ts | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/RoadmapRoute.astro b/src/components/RoadmapRoute.astro index e0bcdd7..590a50d 100644 --- a/src/components/RoadmapRoute.astro +++ b/src/components/RoadmapRoute.astro @@ -83,8 +83,8 @@ const initialShippingX = lastShippingIndex >= 0 ? itemXByIndex[lastShippingIndex
-
-
+