Skip to content

Travel: reconstruct a journey on a REAL MapLibre map (replaces the SVG picker) - #26

Merged
davd-gzl merged 1 commit into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d
Jul 22, 2026
Merged

davd-gzl merged 1 commit into
mainfrom
claude/journal-redesign-spec-kit-ku0l3d

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

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 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 is fully decoupled from the app's main MapView, so it cannot 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.
  • Pure, unit-tested helpers: pickPoints (pool → pin FeatureCollection with route index), stopsArcs (one great-circle arc per resolvable leg — factored out of visitedLayers.tripArcs, which now delegates to it), and mapFit.fitBounds (antimeridian-aware framing extracted from MapScreen, 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: tsc clean · 459 unit tests · e2e green — trip-reconstruction, trips, tripedit, tripfilter, a new trip-routemap spec, 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

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).
@davd-gzl
davd-gzl merged commit c927b5e into main Jul 22, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
github-pages e339b7af Deployed Jul 22, 2026 by davd-gzl via deploy #149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant