Skip to content

Conversation

@tomaszrybakiewicz
Copy link
Contributor

Closes NAVAND-506

Description

Changes:

  • Moved RouteOptionsProvider to SharedApp to allow its injection to RoutePreviewStateController.
  • Updated RoutePreviewStateController to directly use RouteOptionsProvider to generate necessary RouteOptions.
  • Introduced FetchRouteAndShowRoutePreview and FeetchRouteAndStartActivenNavigation actions.
  • Removed all fetchRouteAnd** thunk actions (replaced by the above actions)
  • Moved "fetch route" and "start preview/active nav." processing to the RoutePreviewStateController
  • Renamed FetchOptions -> FetchRoute action and removed redundant RouteOptions field.

@tomaszrybakiewicz tomaszrybakiewicz added the UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. label Nov 22, 2022
@tomaszrybakiewicz tomaszrybakiewicz requested a review from a team as a code owner November 22, 2022 20:38
@tomaszrybakiewicz tomaszrybakiewicz added the skip changelog Should not be added into version changelog. label Nov 22, 2022
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #6638 (009996a) into main (8322e43) will increase coverage by 0.10%.
The diff coverage is 76.28%.

❗ Current head 009996a differs from pull request most recent head c077dc4. Consider uploading reports for the commit c077dc4 to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #6638      +/-   ##
============================================
+ Coverage     72.50%   72.61%   +0.10%     
- Complexity     5550     5554       +4     
============================================
  Files           779      780       +1     
  Lines         30067    30068       +1     
  Branches       3548     3550       +2     
============================================
+ Hits          21801    21833      +32     
+ Misses         6841     6807      -34     
- Partials       1425     1428       +3     
Impacted Files Coverage Δ
...com/mapbox/navigation/ui/app/internal/SharedApp.kt 0.00% <0.00%> (ø)
.../mapbox/navigation/ui/app/internal/ThunkActions.kt 43.58% <54.54%> (+29.30%) ⬆️
...internal/controller/RoutePreviewStateController.kt 89.41% <83.33%> (-6.31%) ⬇️
...p/internal/extension/MapboxNavigationExtensions.kt 91.30% <91.30%> (ø)
...n/ui/app/internal/routefetch/RoutePreviewAction.kt 100.00% <100.00%> (ø)
...in/extendablebutton/RoutePreviewButtonComponent.kt 100.00% <100.00%> (ø)
...extendablebutton/StartNavigationButtonComponent.kt 100.00% <100.00%> (ø)
...pin/infopanel/InfoPanelRoutePreviewButtonBinder.kt 100.00% <100.00%> (ø)
.../infopanel/InfoPanelStartNavigationButtonBinder.kt 100.00% <100.00%> (ø)
...map/longpress/RoutePreviewLongPressMapComponent.kt 95.65% <100.00%> (+5.99%) ⬆️
... and 6 more

@tomaszrybakiewicz tomaszrybakiewicz force-pushed the NAVAND-506_tr-drop-in_move_fetch_route_if_needed2 branch from 58dcd7e to de4a2fa Compare January 3, 2023 21:36
@tomaszrybakiewicz tomaszrybakiewicz added skip changelog Should not be added into version changelog. and removed skip changelog Should not be added into version changelog. labels Jan 4, 2023
- Moved RouteOptionsProvider to SharedApp to allow its injection to RoutePreviewStateController.
- Introduced FetchRouteAndShowRoutePreview and FeetchRouteAndStartActivenNavigation actions.
- Removed fetchRouteAnd** thunk actions (replaced by the above)
- Moved fetch route and start preview/active nav. processing to RoutePreviewStateController
- Renamed FetchOptions -> FetchRoute action.
- Updated RoutePreviewStateController to directly use RouteOptionsProvider to generate necessary RouteOptions for fetch route request.

addressing PR review comments
@tomaszrybakiewicz tomaszrybakiewicz force-pushed the NAVAND-506_tr-drop-in_move_fetch_route_if_needed2 branch from 009996a to c077dc4 Compare January 5, 2023 19:16
@tomaszrybakiewicz tomaszrybakiewicz enabled auto-merge (squash) January 5, 2023 19:44
@tomaszrybakiewicz tomaszrybakiewicz merged commit 1419bb1 into main Jan 5, 2023
@tomaszrybakiewicz tomaszrybakiewicz deleted the NAVAND-506_tr-drop-in_move_fetch_route_if_needed2 branch January 5, 2023 20:40
tomaszrybakiewicz added a commit that referenced this pull request Jan 10, 2023
…r`: (#6638)

* Move `fetchRouteIfNeeded` to `RoutePreviewStateController`:

- Moved RouteOptionsProvider to SharedApp to allow its injection to RoutePreviewStateController.
- Introduced FetchRouteAndShowRoutePreview and FeetchRouteAndStartActivenNavigation actions.
- Removed fetchRouteAnd** thunk actions (replaced by the above)
- Moved fetch route and start preview/active nav. processing to RoutePreviewStateController
- Renamed FetchOptions -> FetchRoute action.
- Updated RoutePreviewStateController to directly use RouteOptionsProvider to generate necessary RouteOptions for fetch route request.

addressing PR review comments

* Unit tests fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Should not be added into version changelog. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants