Other Nav Modes Camera and Non Navigation UI Improvements #824
Other Nav Modes Camera and Non Navigation UI Improvements #824ianthetechie merged 6 commits intostadiamaps:mainfrom
Conversation
ianthetechie
left a comment
There was a problem hiding this comment.
Nice! I'll give this a test but here are a few quick comments from reading the code.
| Text("Current Road: \(state?.currentRoadName ?? "unknown")") | ||
| .background(Color.yellow) | ||
| .padding() | ||
| if let currentRoadName = state?.currentRoadName, !currentRoadName.isEmpty { |
There was a problem hiding this comment.
I feel like we lost something with this test since the view no longer renders :)
There was a problem hiding this comment.
with "view no longer renders" you mean the Text view?
So for me, the tests were not passing on my computer. When I looked at the expected screenshots, they did not contain the yellow text box - yet the new snapshot did, like this:
Looking at the android logic, the road name is not displayed when empty there, so i used that logic in iOS instead of the "Unknown" label (https://github.com/hactar/ferrostar/blob/ios-sync-165-and-overlay/android/composeui/src/main/java/com/stadiamaps/ferrostar/composeui/config/NavigationViewComponentBuilder.kt#L63) - but this was just an assumption, if we need something else here I'll need more info :).
There was a problem hiding this comment.
Huh weird...
Yeah, it's test code so I don't have an issue with it differing between platforms. I've added it back so these render and we can get a sanity check on layout changes. Lemme know if this still causes issues for you developing locally.
This PR tries to bring iOS closer to Android by porting parts of the commits:
This PR should therefore also address #196
Concrete changes:
Video of the demo app before changes (notice the camera tilt at the beginning and the nav buttons visible on the right side) :
https://github.com/user-attachments/assets/74b97f55-98bf-4798-8d8a-cc3d6642704c
Video of the demo app after changes (no tilt, nav buttons only visible during nav):
https://github.com/user-attachments/assets/9e8532c4-7595-4d2e-8932-3ad7a8e705a7
Please note that things go wrong if you try to start a second navigation, she search field no longer disappears. But this happens before these changes too, so I didn't address it to not further inflate this PR.