Repository navigation
Improve landscape layout during active navigation. - #3643
Conversation
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
b3c2fc5 to
a70524b
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
There was a problem hiding this comment.
This is an elegant solution to the map-crowding problem identified in #1139. A few things based on visual inspection of the screenshot in #3643 (comment).
| let compactBottomBannerContainerViewTrailingConstraint = bottomBannerContainerView.trailingAnchor.constraint(equalTo: trailingAnchor, | ||
| constant: -(screenWidth * 0.6)) |
There was a problem hiding this comment.
In the iPhone SE screenshot you provided, the distance and time labels collide into each other. CarPlay removes the possibility of collisions by wrapping units onto a second line, but that would be a more complex change. Perhaps we could hide the distance label when there isn’t enough room.
It’s a little unusual that the ✖️ close button hangs out on the right end, somewhere in the middle of the screen. Moving it out of the bottom banner would help make things fit better. Would it be straightforward to replace it with a floating button in the bottom-right corner of the map? That way the close button is in a predictable location on screen, and the ℹ️ attribution button doesn’t seem like it’s floating out in the middle of nowhere.
There was a problem hiding this comment.
Regarding close button: it's a bit tricky to move it at this point without breaking several APIs. I can also see that most of the navigation apps on the market also show close button in bottom bar menu. I've changed position of attribution button to take into account orientation and notch presence.
I'll play around with a possibility of hiding secondary label in bottom menu, this is indeed an issue on devices with smaller screen sizes.
| insets.top += topBannerContainerView.bounds.height | ||
| insets.bottom += bottomBannerContainerView.bounds.height + 10.0 | ||
| case .compact: | ||
| insets.left += navigationViewData.navigationView.topBannerContainerView.frame.width + 10.0 |
There was a problem hiding this comment.
The leading and trailing constraints below are direction-independent, so the flip in a right-to-left language environment. Does that affect the insets required here?
There was a problem hiding this comment.
Good catch, improved current insets for the right-to-left languages. Interestingly enough Google Maps for iOS doesn't flip top and bottom banner views, whereas Apple Maps flip.
| let screenWidth = UIScreen.main.bounds.width | ||
| let compactTopBannerContainerViewLeadingConstraint = topBannerContainerView.leadingAnchor.constraint(equalTo: leadingAnchor) | ||
| let compactTopBannerContainerViewTrailingConstraint = topBannerContainerView.trailingAnchor.constraint(equalTo: trailingAnchor, | ||
| constant: -(screenWidth * 0.6)) |
There was a problem hiding this comment.
What does this look like when using guidance cards? That design has the upcoming card peek out from the trailing side, but now would it be clipped or float in the middle of the map somewhere?
There was a problem hiding this comment.
guidance card no longer fills the whole parent view width
It’s certainly an improvement on an iPhone screen. Does this change affect the layout on iPad in either orientation? If I remember correctly, we had gotten it so that the subsequent cards would remain visible beside the current card, so that you’d see three up at a time in a sort of marquee layout. But maybe I’m confusing that with a custom integration with guidance cards at the application level.
There was a problem hiding this comment.
I've made a change to only show new layout in landscape mode for devices with regular and compact size classes, this means that iPads are not affected for now. I'm not sure that we should integrate new layout on iPads, as there is enough space in portrait/landscape mode anyway. Guidance cards width is also not affected, so only one guidance card is currently shown, next one is only partly visible. Current look:
I'm thinking about doing some more tests to see whether we should perform any changes on iPad. Guidance cards improvements (which will be done in a separate ticket) might help with making a decision.
a70524b to
1752c50
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
46dc808 to
1d9ab67
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
1d9ab67 to
a561e47
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
c6166e0 to
3cd7a4f
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
bab86e0 to
5ab9a2e
Compare
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
1ec5
left a comment
There was a problem hiding this comment.
Suggested changelog entry:
- In landscape orientation,
NavigationViewController’s top and bottom banners take up less space, leaving more room for the map. (#3643)
Before merging, double-check that the behavior on iPad is reasonable in both orientations: #3643 (comment).
| /** | ||
| `StepsViewControllerDelegate` provides methods for user interactions in a `StepsViewController`. | ||
| */ | ||
| public protocol StepsViewControllerDelegate: AnyObject { |
There was a problem hiding this comment.
Speaking of the step table, what does it look like when you tap or swipe down on the top banner? Does it still get slotted into the space between the top and bottom banners as it does now? If so, we can tackle improving that layout as tail work. There isn’t a very natural place for the step table in this landscape orientation, but maybe presenting it as a modal view controller would be an improvement.
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
|
No breaking changes detected in MapboxCoreNavigation |
|
No breaking changes detected in MapboxNavigation |
944774d to
ba62d46
Compare
ba62d46 to
c2c233b
Compare



PR improves layout in the landscape mode by minimizing space top and bottom banner use. Examples:
Fixes #1139.
/cc @lawsonkight @abhishek1508