Repository navigation
feat(debug): add a Map debug module with overlays and marker toggles - #24
Merged
Merged
Conversation
The Map section replaces the Location section and adds tools to debug the camera: - Fake location dropdown, same presets as before. - Map state and camera (zoom and target) chips at the bottom left of the visible map, using the overlay pill from the debug menu library. - Visible area guide: the map padding, the area the camera fits bounds into and its center. - Fit bounds outline: the bounds the camera fits for a line or stop. - Toggles to hide the stop markers outside the selection and the buses. The static "Debug Info" label and FeatureFlags.showMapDebugInfo are gone. Release builds use the default options and draw nothing. Claude-Session: https://claude.ai/code/session_01J9znEGS7eVo4z7jrHEJkVM
Contributor
✅ Screenshot tests passedAll screenshots match their references. Workflow run |
- Stop and bus marker switches become "Hide stop markers" and "Hide bus markers", so every Map debug option is off by default. - Map state, zoom and camera target are three separate chips with spacing between them. - Chips use the inverse surface colors, dark in light mode and light in dark mode, to stand out over the map.
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.
Why
Debugging the map camera (SEVAND-5, Fix line focus area in map) meant guessing from screenshots. The only on-map info was a centered "LineSelected / Debug Info" label.
What
A new Map section in the debug menu. It replaces the Location section:
DebugLocationServicenow reads it from the Map section.MapScreenState.The chips sit at the bottom left of the visible map, above the sheet, using the overlay pill from the debug menu library (
OverlayPillis now public).The static "Debug Info" label and
FeatureFlags.showMapDebugInfoare removed.How
MapDebugOptions(main) is the plain set of options the map reads. Release builds use the defaults throughrememberMapDebugOptions()and an emptyMapDebugOverlayinapp/src/release, so nothing is drawn.MapDebugModule,MapDebugModuleViewModel,MapDebugModuleDataSourceandMapDebugOverlayinfeature/debug/map/.MarkerLayersByStatefilters stops and buses out of the state before drawing.Note: the persisted fake location of the old Location section is not migrated, so it resets to Off once.
Testing
compileDebugKotlin,compileReleaseKotlin, app and debug-menu unit tests pass (DebugLocationServiceTestupdated).