Long-press the home map for "directions from/to here"#1938
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughMap long-press events are added to both map providers, forwarded through ChangesMap long-press directions
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant MapProvider
participant MapFeature
participant HomeScreen
participant DirectionsLongPressMenu
participant TripPlanViewModel
MapProvider->>MapFeature: long press with coordinates
MapFeature->>HomeScreen: provide GeoPoint
HomeScreen->>DirectionsLongPressMenu: show endpoint options
DirectionsLongPressMenu->>HomeScreen: select from or to here
HomeScreen->>TripPlanViewModel: set MapPoint endpoint
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add onMapLongClick(GeoPoint) to ObaMapCallbacks, wired via setOnMapLongClickListener (Google) / addOnMapLongClickListener (MapLibre) and surfaced through MapFeature (onMapLongPress) to HomeScreen. A long-press opens a modal menu — "Directions from here" / "Directions to here" — that enters directions focus and fills the pressed point as that endpoint (which auto-plans once both endpoints are set).
bmander
force-pushed
the
feature/directions-long-press
branch
from
July 18, 2026 04:50
44a18f8 to
c770515
Compare
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.
Stacked on #1872 (the trip-planner → home-map directions work).
Summary
Long-pressing anywhere on the home map opens a modal menu — "Directions from here" and "Directions to here" — which enters the directions focus and fills that endpoint with the pressed point. Once the other endpoint is set, the plan auto-fires (with the error / no-route feedback from the base PR).
Changes
ObaMapCallbacks.onMapLongClick(GeoPoint)(default no-op).setOnMapLongClickListener(Google) /addOnMapLongClickListener(MapLibre) in the two compose adapters.MapFeature(onMapLongPress) toHomeScreen, which showsDirectionsLongPressMenu(aModalBottomSheet) and, on selection,enterDirections()+setFrom/setTo(MapPoint).Notes
feature/trip-plan-map-overlay(Trip planner: map-overlay layout (top-sheet form + bottom-sheet directions) #1872); retarget tomainonce that merges.obaGoogle+obaMaplibre) compile clean under-PwarningsAsErrors=true.Summary by CodeRabbit