trails/apps/journal/app/components
Ullrich Schäfer 3a1c34317d
route-surface-breakdown (Phase 1): Planner-path surface/waytype bars
Synchronous path + rendering for the surface/waytype breakdown:
- map-core `computeSurfaceBreakdown(coords, surfaces, highways)` → distance-
  weighted metres per surface + waytype category (unit-tested);
- `SurfaceBreakdownSchema` in @trails-cool/api;
- nullable `surfaceBreakdown` jsonb on routes + activities;
- Planner `SaveToJournalButton` computes it from the BRouter waytags already in
  routeData and sends it; `api.save-to-journal` forwards it; the journal route
  callback validates + persists (journal is the authoritative validator);
- `SurfaceBreakdown` component (stacked bars per dimension, map-core palettes,
  legend category · % · km largest-first, unknown → "other", hidden when empty)
  on route + activity detail; journal gains a @trails-cool/map-core dep;
- i18n journal.surface.* (en + de).

Phase 2 (async Overpass backfill + SSE for imports/uploads, and the e2e that
seeds a breakdown) follows in a separate PR.

Tests: computeSurfaceBreakdown unit (map-core 36); SurfaceBreakdown component
(jsdom, journal 326). typecheck + lint green; verified in the browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:46:49 +02:00
..
AccountDropdown.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
AlphaBanner.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
Avatar.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
ClientDate.tsx Implement notifications + supporting fixes 2026-04-26 01:28:55 +02:00
ClientMap.tsx Add ClientMap wrapper to avoid lazy() SSR resolution 2026-04-06 22:52:57 +02:00
CollectionPage.tsx fix(journal): show remote followers in follower/following lists 2026-06-07 09:13:44 +02:00
ElevationProfile.test.tsx journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
ElevationProfile.tsx journal-elevation-profile: elevation chart + map↔chart sync 2026-06-12 15:34:45 +02:00
FollowButton.tsx Locked-account profiles: private = stub + Pending follow flow 2026-04-25 23:38:26 +02:00
Footer.tsx Stop Sentry on logout; fix E2E + Dockerfile for merged consolidation 2026-04-18 00:40:36 +02:00
LocaleContext.tsx Pass full locale from Accept-Language to ClientDate 2026-03-29 11:46:21 +02:00
MobileNavMenu.tsx Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
ProfileStats.test.tsx profile-stats: lifetime roll-up header on the profile 2026-06-13 07:25:06 +02:00
ProfileStats.tsx profile-stats: lifetime roll-up header on the profile 2026-06-13 07:25:06 +02:00
RouteMapThumbnail.client.tsx Merge pull request #534 from trails-cool/apply-journal-elevation-profile 2026-06-12 15:45:52 +02:00
SportBadge.tsx activity-sport-type: schema, contract, write/read paths, federation 2026-06-12 14:11:41 +02:00
StatRow.test.tsx activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
StatRow.tsx activity-stats: shared StatRow + canonical metrics across surfaces 2026-06-12 14:48:36 +02:00
SurfaceBreakdown.test.tsx route-surface-breakdown (Phase 1): Planner-path surface/waytype bars 2026-06-14 18:46:49 +02:00
SurfaceBreakdown.tsx route-surface-breakdown (Phase 1): Planner-path surface/waytype bars 2026-06-14 18:46:49 +02:00
WeeklyDistanceChart.test.tsx profile-weekly-distance: make the chart legible (axis, grid, tracks, hover) 2026-06-13 08:50:01 +02:00
WeeklyDistanceChart.tsx profile-weekly-distance: make the chart legible (axis, grid, tracks, hover) 2026-06-13 08:50:01 +02:00