Skip to content

Other Nav Modes Camera and Non Navigation UI Improvements #824

Merged
ianthetechie merged 6 commits intostadiamaps:mainfrom
hactar:ios-sync-165-and-overlay
Mar 24, 2026
Merged

Other Nav Modes Camera and Non Navigation UI Improvements #824
ianthetechie merged 6 commits intostadiamaps:mainfrom
hactar:ios-sync-165-and-overlay

Conversation

@hactar
Copy link
Contributor

@hactar hactar commented Mar 16, 2026

This PR tries to bring iOS closer to Android by porting parts of the commits:

This PR should therefore also address #196

Concrete changes:

  • Camera not tilted in non navigation mode
  • buttons hidden in non navigation mode
  • demo button for choosing destination moved outside the .navigation grid, cause its not a navigation button (this is different to the android set up)
  • adjustments to the demo relative path of where to find the ferrostar lib (no longer requires the root folder to be called ferrostar)
  • function and test adjustments as iOS was adding the current road label even if it was nil, which android didn't

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.

Copy link
Contributor

@ianthetechie ianthetechie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we lost something with this test since the view no longer renders :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

download

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 :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hactar hactar requested a review from ianthetechie March 17, 2026 14:20
@ianthetechie ianthetechie merged commit 6e46050 into stadiamaps:main Mar 24, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants