mapbox / mapbox/mapbox-navigation-ios
[Bug]: Guidance Card size is too big by default on ipad and landscape
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
### Mapbox Navigation SDK version
v2.0.0-rc.4
### Steps to reproduce
# Too big
1. Run example app on iPad in landscape mode.
2. Start a navigation with guidance cards
3. Check the width of the guidance cards
# Isn't fully shown
1. Run example app on iPad in landscape mode.
2. Start a navigation with guidance cards
3. Add another app to a split screen.
3. Check the width of the guidance cards
### Expected behavior
# Case 1
The width of the guidance cards should have sensible default (max size).
# Case 2
Guidance cards just use 80% of `UIScreen.main.bounds.width`. It should take into account new iOS APIs. https://github.com/mapbox/mapbox-navigation-ios/blob/5382dc06ef592805dc17689ace4be423aa6d8ee9/Sources/MapboxNavigation/InstructionsCardViewController.swift#L60
### Actual behavior
# Case 1

# Case 2

### Is this a one-time issue or a repeatable issue?
repeatable
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Sources/MapboxNavigation/InstructionsCardViewController.swift around line 60, then reproduce the issue in the example app on an iPad in landscape and split-screen modes. Check the available iOS APIs for the current window size and safe area. Done means guidance cards use a sensible maximum width and fit the available split-screen width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100