feat: ride analysis phase 2 - embedded map with markers and animated replay#154
Merged
Conversation
added 5 commits
June 29, 2026 23:51
…replay Adds an embedded MapLibre map to the ride analysis screen: speed-coloured track, start/finish/top-speed/stop/kilometre markers and a play/scrub-driven animated replay dot (time-based, so it pauses at standstills). Geometry built purely off-main-thread in core.analysis (buildRideMapData, RideMapDataTest); rendered by a new RideReplayMap composable reusing RideSpeedSegments and RideMaxSpeedPoint. Localised in 8 languages.
…t avatar Fixes the embedded analysis map being unresponsive inside the vertical scroll: a touch listener now asks the Compose parent to stop intercepting the gesture (requestDisallowInterceptTouchEvent) on touch-down, so pan/zoom work. Replaces the blue replay dot with the app's cyclist avatar, cycling pedal frames by distance (foot-down idle pose at stops) and rotating to the travel heading.
…ch bubble Removes the cluttered per-kilometre dots from the analysis map and renders the top-speed marker as the same red speech-bubble pin used on the main map (createSpeedBubbleIcon + updateMaxSpeedMarker). Updates RideMapDataTest accordingly.
Drops the cluttered per-kilometre map dots and adds meaningful value bubbles instead: top speed (km/h), steepest gradient (%), high point (elevation) and longer stops (duration) — each a clean speech bubble like the main map's max-speed pin, tinted per type, with full alpha so they render. Start/finish stay as simple dots. The kilometre-split list on the analysis screen now collapses behind a 'show all (n)' toggle past eight rows. Updates RideMapDataTest.
…graphs Adds createAnalysisBubbleIcon: a value bubble with a dark outline (crisp on the light basemap, the white keyline was invisible) and a leading white pictograph per type — speed gauge, ramp (gradient), mountain (high point) and pause bars (stop) — so a bare '128 m' clearly reads as a summit. RideReplayMap maps each value marker to its glyph.
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.
Phase 2 of the detailed ride analysis screen: a hero interactive map with an animated replay.
What's new
RideSpeedSegments).RideMaxSpeedPoint), stops (grey, at the midpoint of each standstill) and numbered kilometre markers.Implementation
buildRideMapDataincore.analysis(track, markers, time-spaced replay frames). No Android dependency, fully unit-tested.RideReplayMapcomposable with self-contained MapLibre sources/layers (data-driven marker colour/size, a replay-dot circle layer), reusing the existingrememberMapViewWithLifecycleandupdateTrackSpeedLayer/updateTrackLayerhelpers.RideAnalysisUiState.Readyand computed in the ViewModel off the main thread;isDarkThemethreaded through the NavHost into the screen.MapView(recreated on return), so the embedded map is cheap.Tests
RideMapDataTest: start/finish markers, km markers, replay frame count and endpoints, stop-marker detection. All green.i18n
Next (optional phases): history comparison + PR badges, a shareable report card, and opt-in online data (weather / map-matching).