Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable snapping_include_static_closure by default for reroute #6164

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

dzinad
Copy link
Contributor

@dzinad dzinad commented Aug 12, 2022

Description

Fixes #6119.

@dzinad dzinad requested a review from a team as a code owner August 12, 2022 19:53
@dzinad dzinad force-pushed the dd-6119-snapping-include-static-closures branch from 46c199b to 65d1370 Compare August 12, 2022 19:54
Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are ❌

com.******.navigation.core.routeoptions.RouteOptionsUpdaterTest$SnappingClosuresOptionsParameterized > snappingClosuresOptions[4] FAILED
    java.lang.AssertionError at RouteOptionsUpdaterTest.kt:554

com.******.navigation.core.routeoptions.RouteOptionsUpdaterTest$SnappingStaticClosuresOptionsParameterized > snappingClosuresOptions[4] FAILED
    java.lang.AssertionError at RouteOptionsUpdaterTest.kt:675

910 tests completed, 2 failed, 2 skipped

> Task :libnavigation-core:testDebugUnitTest FAILED

@@ -100,32 +100,15 @@ class RouteOptionsUpdater {
it.addAll(approachesList.subList(index, coordinatesList.size))
}
}
).apply {
if (routeOptions.profile() == DirectionsCriteria.PROFILE_DRIVING_TRAFFIC) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this removed on purpose? Look at #6147

cc @VysotskiVadim

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase issues. Moved it back.

Comment on lines 104 to 107
.snappingIncludeClosuresList(
routeOptions.snappingIncludeClosuresList()
.withFirstTrue(remainingWaypoints, index, coordinatesList.size)
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot rely on nullability when adding snappingIncludeClosuresList and snappingIncludeStaticClosuresList. We do want to add these parameters to a reroute request even if they were not part of the original request. That's why we need to check for the profile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I returned the profile check so it should work as expected now.

@LukasPaczos LukasPaczos changed the title enable snapping_include_static_closure by default for refresh enable snapping_include_static_closure by default for reroute Aug 15, 2022
@dzinad dzinad force-pushed the dd-6119-snapping-include-static-closures branch from 65d1370 to c7d3817 Compare August 16, 2022 09:32
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #6164 (61182ae) into main (3514849) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

❗ Current head 61182ae differs from pull request most recent head f0ea85e. Consider uploading reports for the commit f0ea85e to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #6164      +/-   ##
============================================
- Coverage     68.91%   68.86%   -0.05%     
+ Complexity     4258     4256       -2     
============================================
  Files           639      639              
  Lines         25663    25666       +3     
  Branches       3004     3004              
============================================
- Hits          17686    17676      -10     
- Misses         6830     6845      +15     
+ Partials       1147     1145       -2     
Impacted Files Coverage Δ
...on/navigator/internal/MapboxNativeNavigatorImpl.kt 0.00% <0.00%> (ø)
...ation/ui/maps/route/line/api/MapboxRouteLineApi.kt 82.75% <0.00%> (-1.18%) ⬇️
...ui/maps/route/line/model/MapboxRouteLineOptions.kt 82.71% <ø> (ø)

@dzinad dzinad force-pushed the dd-6119-snapping-include-static-closures branch from c7d3817 to f0ea85e Compare August 16, 2022 11:45
@dzinad dzinad merged commit 364d36e into main Aug 16, 2022
@dzinad dzinad deleted the dd-6119-snapping-include-static-closures branch August 16, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable snapping to static closures for the origin of the re-route by default
4 participants