Ullrich Schäfer
|
0325d01bca
|
activity-stats: shared StatRow + canonical metrics across surfaces
Implements the activity-stats change (specs/activity-stats):
- gpx: `movingTime(tracks)` — moving seconds from trackpoint timestamps,
excluding stationary spans + long gaps; null when no timestamps.
- stats.ts: pure formatters (distance/elevation/duration/speed/pace),
sport-aware `deriveRate` (pace for foot sports, speed otherwise, speed
default), and `activityStatItems` encoding the canonical order
(distance · time · [moving] · pace/speed · ascent · descent; compact subset).
- StatRow: one shared presentational component (size sm/lg), adopted on the
activity detail (full set; loader derives moving time), route detail
(distance/ascent/descent), feed card + profile list (compact).
- i18n: journal.stats.* in en + de.
Tests: movingTime (stationary/gap exclusion, moving ≤ elapsed), deriveRate,
formatters, activityStatItems ordering + compact, StatRow render (jsdom).
typecheck + lint + unit (gpx 63, journal 311) green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-12 14:48:36 +02:00 |
|