Skip to content

feat: full-screen route map with km markers and split highlight - #1

Closed
ricaezejo wants to merge 13 commits into
mainfrom
feat/fullscreen-route-map
Closed

ricaezejo wants to merge 13 commits into
mainfrom
feat/fullscreen-route-map

Conversation

@ricaezejo

Copy link
Copy Markdown
Owner

Summary

Tapping the Route card on a finished GPS workout now opens the map full screen.

  • Full-screen map in a dialog over the page, so it also covers the nav rail and list pane on a wide or landscape screen. Route in heart-rate zone colours, pan and zoom, a Fit route pill after a pan, and a Route only toggle that makes no tile requests.
  • A numbered marker at the end of each whole kilometre. The markers are bitmaps, so they need no font download and work in Route only mode.
  • A split picker along the bottom (same rows as the Splits list). Picking a kilometre draws it with a white casing and zooms to it; picking it again clears it.
  • Route.legs is the single source of kilometres; Route.splits now delegates to it so markers, highlight and the Splits list cannot disagree.
  • The card's map gets a transparent click-catching overlay above the native map so the tap is not swallowed.

Where the map's state lives

Which workout's map is open, Route only and the selected split are kept in an activity-scoped RouteMapModel (ViewModel), and the dialog is hosted at page level. Not rememberSaveable:

  • State inside the dialog was lost on rotation (reproduced in FullScreenRouteMapRotationTest).
  • Showing the map in place kept state but filled only the page's pane in landscape.
  • rememberSaveable in the card failed too: portrait and landscape place the page at different positions in the layout tree, so each orientation kept its own copy and a stale one could bring a closed map back.

The dialog's entrance animation is turned off best-effort so a rotation doesn't replay it.

No new permissions or network use. Spec and plan are the first commit: docs/superpowers/specs/2026-11-05-outdoor-run-map-and-gpx-design.md and docs/superpowers/plans/2026-11-05-outdoor-run-map-and-gpx.md.

This is the lower PR of a stack; the GPX export PR builds on it.

Known limits

  • After a rotation the selected stretch is not refitted to the new screen shape; tapping the chip again refits.
  • A highlighted kilometre that spans a pause is drawn as one line.
  • Tapping a marker does nothing; the picker is how to select.

Test plan

  • ./gradlew :app:testDebugUnitTest :protocol:test :app:lintDebug detektMain. ktlintCheck reports findings across the repo (it is continue-on-error in CI).
  • On a device (Pixel, fake 2.77 km GPS run): the card tap opens the map and page scrolling works over the card; km markers and the split picker render; selecting a kilometre highlights it; Route only keeps markers and highlight.
  • Rotation on the device: portrait to landscape and back keeps the open map's split and Route only; landscape covers the whole screen; a closed map stays closed.
  • Not yet on a device: three-digit markers, a run under 1 km (only a "Last N m" chip), the Fit route pill after a pan, the OSM credit above the picker, the live workout map unchanged.

@ricaezejo
ricaezejo added this pull request to stack #3 November 6, 2026 10:31
@ricaezejo
ricaezejo force-pushed the feat/fullscreen-route-map branch from 2b169f8 to 7e38e06 Compare November 6, 2026 10:38
ricaezejo and others added 13 commits November 8, 2026 22:02
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… card

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…trait and landscape layouts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ricaezejo
ricaezejo force-pushed the feat/fullscreen-route-map branch from 7e38e06 to dfba02a Compare November 8, 2026 21:26
@ricaezejo
ricaezejo removed this pull request from stack #3 November 8, 2026 21:28
@ricaezejo

Copy link
Copy Markdown
Owner Author

Moved upstream: sayed0am#57

@ricaezejo ricaezejo closed this Nov 8, 2026
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