trails/packages/gpx/src
Ullrich Schäfer 536a8f98b9
journal-elevation-profile: elevation chart + map↔chart sync
Implements the journal-elevation-profile change (specs/journal-elevation-profile):

- gpx: `elevationSeries(tracks)` → { d, e, lat, lng }[] with cumulative distance,
  downsampled (keeps first/last), empty when <2 points carry elevation.
- ElevationProfile: read-only SVG area chart (vertical gradient fill), highest/
  lowest summary + a hover readout. Reports hovered index (onActive) and clicked
  index (onSeek); draws a marker at the active index. Renders nothing for an
  empty series.
- RouteMapThumbnail: ActiveMarker (CircleMarker at the chart's active point),
  HoverTracker (route hover → nearest sample → onHoverIndex), Recenter (panTo on
  chart click). Props forwarded through ClientMap.
- Wired into the activity + route detail pages via a shared activeIndex/centerOn
  state; loaders expose the series (activity reuses the moving-time parse).
- i18n journal.elevation.{highest,lowest} in en + de.

Ascent/descent stay in the stat row (#532); the chart summary shows highest/
lowest to avoid duplication.

Tests: elevationSeries unit; ElevationProfile component (jsdom); e2e creates an
activity from an elevation GPX and asserts the chart renders. typecheck + lint +
unit (gpx 67, journal 315) green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 15:34:45 +02:00
..
compute-days.test.ts Add unit tests for computeDays and GPX overnight roundtrip 2026-04-11 00:05:54 +02:00
compute-days.ts Add multi-day data model, computeDays, and GPX roundtrip 2026-04-10 23:51:31 +02:00
daybreaks-extraction.test.ts Add per-day map coloring and remaining unit tests 2026-04-11 00:12:27 +02:00
elevation-series.test.ts journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
elevation-series.ts journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
generate.test.ts Add per-waypoint notes and nearby POI snap to Planner 2026-05-17 23:58:21 +02:00
generate.ts Add per-waypoint notes and nearby POI snap to Planner 2026-05-17 23:58:21 +02:00
geom.test.ts Fix PostGIS geom population: use parseGpxAsync + raw SQL 2026-04-02 17:32:07 +01:00
index.ts journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
moving-time.test.ts activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
moving-time.ts activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
nogo.test.ts Add unit tests for no-go area round-trip and waypoint extraction 2026-04-03 12:50:57 +01:00
parse-node.test.ts Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
parse.test.ts Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
parse.ts chore(ts): drop the last 2 \eslint-disable\ comments in prod code 2026-05-26 07:34:09 +02:00
types.ts Sync notes through GPX, Journal, and Planner roundtrip 2026-04-11 03:35:40 +02:00
waypoints.ts Include waypoint note in GPX export and extractWaypoints type 2026-05-18 07:38:55 +02:00