mapbox / mapbox/mapbox-navigation-android

MapboxManeuverView does not handle error result

Open
#5,684 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug jira-sync-complete
Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

`MapboxManeuverView` currently renders maneuvers only when the result is Success and the components list is not empty

```
fun renderManeuvers(maneuvers: Expected>) {
maneuvers.onValue { list ->
if (list.isNotEmpty()) {
currentlyRenderedManeuvers.clear()
currentlyRenderedManeuvers.addAll(list)
renderManeuvers()
}
}
}
```

In this case if the list is empty or the result is `error`, then the view would continue to show previous maneuver.

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 at MapboxManeuverView.renderManeuvers and trace both Expected branches. Reproduce an empty-list and error result after a prior successful render; done means the previous maneuver is no longer shown in either case, with regression coverage in the relevant existing test area.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.