Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements search keyboard action functionality, allowing users to trigger search by pressing the search/enter key on the keyboard. The primary enhancement focuses on improving the search user experience and adding better map pin visualization for search results.
Key changes:
- Added keyboard search action support with proper IME handling
- Enhanced map pin functionality to display search results as interactive pins
- Refactored transit models to avoid naming conflicts with the main Place class
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/home/HomeScreen.kt | Added keyboard actions, search event handling, and geocode results visualization |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/home/HomeViewModel.kt | Converted geocodeResults to StateFlow and added geocodePlaces mapping |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/core/MapView.kt | Updated map pins to use Place objects instead of Position |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/core/AppContent.kt | Enhanced search result handling with camera animation and bounding box calculation |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/core/MapViewModel.kt | Added createFeatureFromPlace method and updated layer IDs for map pin queries |
| cardinal-android/app/src/main/java/earth/maps/cardinal/data/Place.kt | Added toPosition() helper method |
| cardinal-android/app/src/main/java/earth/maps/cardinal/data/BoundingBox.kt | Added toGeoJsonBoundingBox() conversion method |
| cardinal-android/app/src/main/java/earth/maps/cardinal/transit/TransitousModels.kt | Renamed Place to TransitPlace to avoid naming conflicts |
| cardinal-android/app/src/main/java/earth/maps/cardinal/transit/TransitousService.kt | Updated to use TransitPlace instead of Place |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/directions/TransitItineraryDetailScreen.kt | Updated property references to use TransitPlace |
| cardinal-android/app/src/main/java/earth/maps/cardinal/ui/home/OfflineAreasScreen.kt | Removed trailing whitespace |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
cardinal-android/app/src/main/java/earth/maps/cardinal/ui/core/AppContent.kt
Outdated
Show resolved
Hide resolved
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.
Fixes #172