Repository navigation
Optimize UI and Logic for Navigation and Route Planning - #1
Merged
Merged
Conversation
- Add more fuzzy search query variants for better matching - Request location permission immediately after privacy consent - Auto-zoom to 25m scale (zoom 19f) after location fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove profile button from search bar - Replace full-screen search overlay with compact dropdown - Move zoom buttons to left side vertically - Remove Routes entry from bottom navigation - Hide bottom nav when place selected, move card down - Remove coordinate display from place info card Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove waypoint rows, center swap button with + button for waypoints - Auto re-plan on preference change with debounce - Reduce unnecessary route re-drawing with debouncing - Optimize card sizes for small screens - Replace text badges with small circle markers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Road recovery notice auto-dismiss after 10s - Remove traffic light count from bottom card - Independent lane guidance below top card, hidden during junction view - GPS status as compact capsule, deep red when weak - Service area green / toll station blue with display conditions - Overview bar spans between top and bottom cards - Rename Follow to Continue Navigation - Hide time data when map moved - Blue Switch toggles and blue detail/concise mode - GPS detail page blue-white theme - Landscape: lane right-top, junction simplification, fix overlaps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refines the app’s navigation-focused UX by simplifying main-map controls, streamlining route planning interactions, and polishing the in-navigation UI, while also improving search fuzziness and default camera behavior.
Changes:
- Updated main map UI: removed the “我” button, adjusted search panel sizing/opacity, moved zoom controls, and auto-hid bottom navigation when a place is selected.
- Improved route planning UX: simplified waypoint editing, added preference-change auto re-plan with debounce, and tightened layouts for smaller screens.
- Refined navigation screen: lane guidance placement/layout changes, GPS status and satellite panel redesign, facilities filtering/color-coding, and reduced on-screen clutter.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/simplemap/ui/SimpleMapApp.kt | Main map UI adjustments (search panel, bottom nav behavior, zoom controls) and startup location permission request logic. |
| app/src/main/java/com/simplemap/ui/RoutePlannerPanel.kt | Waypoint editor simplification, responsive sizing tweaks, and debounced auto re-planning on drive option changes. |
| app/src/main/java/com/simplemap/ui/NavigationScreen.kt | Navigation UI polish: lane guidance panel, GPS status capsule, facilities filtering, and settings toggle visuals. |
| app/src/main/java/com/simplemap/search/AmapPlaceRepository.kt | Expanded fuzzy address query generation for better search matching. |
| app/src/main/java/com/simplemap/navigation/AmapNavigationView.kt | Adjusted overlay margins for TMC route layout. |
| app/src/main/java/com/simplemap/amap/AmapMapView.kt | Increased default zoom used when centering/following current location. |
Comment on lines
+430
to
+451
| // 隐私同意后立即请求定位权限,而不是等待用户点击定位按钮 | ||
| LaunchedEffect(Unit) { | ||
| val alreadyGranted = ContextCompat.checkSelfPermission( | ||
| context, | ||
| Manifest.permission.ACCESS_FINE_LOCATION, | ||
| ) == PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission( | ||
| context, | ||
| Manifest.permission.ACCESS_COARSE_LOCATION, | ||
| ) == PackageManager.PERMISSION_GRANTED | ||
| if (alreadyGranted) { | ||
| locationEnabled = true | ||
| mapController?.setMyLocationMarkerVisible(true) | ||
| mapController?.centerOnCurrentLocationAndFollow() | ||
| } else { | ||
| locationPermissionLauncher.launch( | ||
| arrayOf( | ||
| Manifest.permission.ACCESS_FINE_LOCATION, | ||
| Manifest.permission.ACCESS_COARSE_LOCATION, | ||
| ), | ||
| ) | ||
| } | ||
| } |
Comment on lines
+891
to
+896
| IconButton( | ||
| onClick = { mapController?.zoomIn() }, | ||
| modifier = Modifier.size(40.dp), | ||
| ) { | ||
| Text("+", fontSize = 22.sp, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface) | ||
| } |
Comment on lines
+903
to
+908
| IconButton( | ||
| onClick = { mapController?.zoomOut() }, | ||
| modifier = Modifier.size(40.dp), | ||
| ) { | ||
| Text("−", fontSize = 22.sp, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface) | ||
| } |
Comment on lines
+791
to
+793
| modifier = Modifier | ||
| .size(28.dp) | ||
| .semantics { contentDescription = "添加途经点" }, |
| var topPanelRightPx by remember { mutableStateOf(0) } | ||
| var bottomStackTopPx by remember { mutableStateOf(0) } | ||
| var bottomStackRightPx by remember { mutableStateOf(0) } | ||
| var isPlanning by remember { mutableStateOf(false) } |
Comment on lines
1476
to
1479
| modifier = modifier | ||
| .widthIn(min = 56.dp) | ||
| .heightIn(min = 48.dp) | ||
| .widthIn(max = 80.dp) | ||
| .heightIn(max = 28.dp) | ||
| .clickable(role = Role.Button, onClick = onClick) |
| } | ||
| } | ||
|
|
||
| private val roadSuffixes = listOf("路", "街", "道", "巷", "大道", "胡同", "弄") |
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.
This pull request includes a comprehensive review and optimization of the UI and logic across multiple components of the navigation app. The changes focus on enhancing user experience, improving performance, and ensuring a seamless interaction flow.
Key Changes:
Main UI Enhancements:
Route Planning Improvements:
Navigation Interface Updates:
Landscape Mode Adjustments:
Next Steps:
This PR aims to create a more intuitive and efficient navigation experience for users, addressing both functional and aesthetic aspects of the app.