Travel: reconstruct a journey on a REAL MapLibre map (replaces the SVG picker) - #26
Merged
Merged
Conversation
The composer's map was a static hand-drawn SVG. Replace it with an actual MapLibre map, so reconstructing a journey feels like a real map: pan/zoom, bundled offline land, tap a pin to add a stop in order, and watch the great-circle route draw live. - New RouteMap: a dedicated, self-contained MapLibre instance through the bundled offline MapSource seam (Natural Earth land, no tiles, no network, no geolocation prompt). It renders ONLY your pool of visited places as pins (added stops get a green ring); tapping picks the nearest and appends it. It's fully decoupled from the app's main MapView, so it can't perturb the production map. A companion list beneath the canvas (real buttons + flags) is the keyboard/AT path, and an aria-live region announces every add. - New pure helpers, each unit-tested: pickPoints (pool → pin FeatureCollection with route index), stopsArcs (great-circle arc per resolvable leg, factored out of visitedLayers.tripArcs which now delegates to it), mapFit.fitBounds (antimeridian-aware framing, extracted from MapScreen — no behaviour change). - Kept the List segment AND its gazetteer search, so any airport is still reachable (airports matter for flights). Gate: tsc clean, 459 unit tests, e2e green — trip-reconstruction, trips, tripedit, tripfilter, a new trip-routemap spec, and a11y (list + the real map both pass the axe WCAG 2.1 AA gate).
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The trip composer's map was a static, hand-drawn SVG. This replaces it with an actual MapLibre map, so reconstructing a journey feels like a real map: pan/zoom, bundled offline land, tap a pin to add a stop in order, and watch the great-circle route draw live with a running distance.
What's new
RouteMap— a dedicated, self-contained MapLibre instance through the bundled offlineMapSourceseam (Natural Earth land, no tiles, no network, no geolocation prompt). It renders only your pool of visited places as pins (added stops get a green ring); tapping picks the nearest and appends it. It is fully decoupled from the app's mainMapView, so it cannot perturb the production map. A companion list beneath the canvas (real buttons + flags) is the keyboard/AT path, and anaria-liveregion announces every add.pickPoints(pool → pin FeatureCollection with route index),stopsArcs(one great-circle arc per resolvable leg — factored out ofvisitedLayers.tripArcs, which now delegates to it), andmapFit.fitBounds(antimeridian-aware framing extracted fromMapScreen, no behaviour change).Deliberately kept
The List segment and its gazetteer search stay — so any airport is still reachable (a design plan suggested removing search, but that contradicts the "airports must be reachable" requirement, so I kept it).
Gate:
tscclean · 459 unit tests · e2e green — trip-reconstruction, trips, tripedit, tripfilter, a newtrip-routemapspec, and a11y (both the list and the real map pass the axe WCAG 2.1 AA gate).🤖 Generated with Claude Code
https://claude.ai/code/session_014W6tgHRgLEugCsbKC9ccST
Generated by Claude Code