mapbox / mapbox/mapbox-navigation-ios

[Bug]: Guidance Card size is too big by default on ipad and landscape

Open
#3,436 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jira-sync-complete UI
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

![Simulator Screen Shot - iPad mini (6th generation) - 2021-10-05 at 17 58 16](https://user-images.githubusercontent.com/413986/136048896-d483524f-2e59-47ac-ae4b-6579d25db087.png)

# Case 2

![Simulator Screen Shot - iPad mini (6th generation) - 2021-10-05 at 17 58 09](https://user-images.githubusercontent.com/413986/136048995-20638866-464c-4a72-bc3a-50022e351f49.png)

### Is this a one-time issue or a repeatable issue?

repeatable

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.