-
Notifications
You must be signed in to change notification settings - Fork 315
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 night style when inside tunnel #1127
Merged
+77
−13
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
d2581fc
Added ability to detect commuter is in a tunnel and automatically ena…
vincethecoder 0a67127
Minor code refactor for tunnel intersection.
vincethecoder 52564d6
Minor grammatical updates to comments on route step tunnel intersection.
vincethecoder 2f67660
Minor text updates.
vincethecoder 72fee83
Added comments to explain preconditions to capture all locations that…
vincethecoder 1b0e577
Removed console logs for debug purposes.
vincethecoder 14c5b8e
Removed resetTimeOfDayTimer method, as styles are automatically adjus…
vincethecoder d764421
Updated style manager to apply custom styles.
vincethecoder dc482f7
Set style to night style when in tunnel.
vincethecoder 1b1152a
A few enhancement/refsctor for routestep and routecontroller discover…
vincethecoder 19ac74d
Updated logic for setting a custom style.
vincethecoder f81319b
Modified delegate method to enable tunnel dark mode when commuter ent…
vincethecoder aadadf4
Added function to apply a specific style type.
vincethecoder 181b428
Added a break to the for-loop for retrieving the desired style type.
vincethecoder 5198ce4
corrected grammatical error
vincethecoder b2b0186
Removed extra spaces
vincethecoder 05ef98f
Merge branch 'tunnel/dark_mode_style' of github.com:mapbox/mapbox-nav…
vincethecoder bb89fff
Refactored condition limit to 2
vincethecoder 613fdfc
A few updates for when a tunnel is detected.
vincethecoder 8caa01a
Refactored function - applyStyle()
vincethecoder c1d95d5
Minor text updates
vincethecoder efc7527
Removed break in style apply function.
vincethecoder 256e154
Updated tunnelIntersectionBounds to check index bounds before accessi…
vincethecoder 7686d52
Updated the check for intersection count.
vincethecoder b8f8a9e
Revised the absolute tunnel distance calculation to use Polyline meth…
vincethecoder cf306ca
Reversed variables around for distance to entrance.
vincethecoder c7513bf
Updated route controller delegate methods to detect when tunnel was e…
vincethecoder fb959c8
Updated changelog file with new delegate methods that detects when a …
vincethecoder 6915af5
Revised logic to accommodate a single intersection on tunnel route.
vincethecoder e5058e6
Added logic to handle navigation through multiple tunnels on a route.
vincethecoder f7463d4
Removed extra lines of code to enhance readability
vincethecoder 232baa4
Updated change log to reference link to PR
vincethecoder 64a7897
Merge branch 'master' into tunnel/dark_mode_style
vincethecoder 4e5356a
Minor refactor for array to use the defined typealias - IntersectionB…
vincethecoder be3cf6b
Updated the function to detect intersection bounds on a route.
vincethecoder 18160da
Updates to cache and calculate the intersection bounds for detecting …
vincethecoder af050d4
Moved variable up to the top of the extension.
vincethecoder e48ad83
Made updates based on PR feedback.
vincethecoder 3d1ef3f
Readded deleted function updateSpokenInstructionProgress(for:)
vincethecoder da0ab08
Updated the change log to reflect new changes.
vincethecoder 82c8310
Updates to set intersectionDistances on RouteProgress class. Modifed …
vincethecoder 4518a12
Updated the bounds check on currentIntersection and upcomingIntersection
vincethecoder 49a5817
Restrict the intersection index to 0 base.
vincethecoder 2b5cd86
Merge branch 'master' into tunnel/dark_mode_style
vincethecoder f25448f
Added a restriction for the minimum distance of a tunnel intersection…
vincethecoder 59b25b3
Turf import is unnecessary.
vincethecoder 0b93231
Removed valid adjective
vincethecoder f71f649
Updates to tunnel work change log file
vincethecoder 8f24774
Added function to force refresh of appearance.
vincethecoder 0b44f03
Added a constant to MBNavigation constants file. Removed irrelevant p…
vincethecoder 3675974
Added a feature flag to detect when to switch styles for tunnels.
vincethecoder 2acde88
Deleted extra white space.
vincethecoder 241bba6
Minor refactor
vincethecoder 4ad24d0
Updated the change logs with a note regarding new fields for current …
vincethecoder 6ef815c
Updates to use a CountableClosedRange on the conditional check on int…
vincethecoder f0411b8
Updates to use a CountableClosedRange on the conditional check on int…
vincethecoder 5ecb164
Reverted updates to use a CountableClosedRange on the conditional che…
vincethecoder 36a374a
Updates to use a CountableClosedRange on the conditional check on int…
vincethecoder cb8a46b
Reverted updates to use a CountableClosedRange on the conditional che…
vincethecoder 709231e
Added dead reckoning flag to restrict intersection calculations on th…
vincethecoder 70c5e76
Refactored code into functions and renamed feature flag for switching…
vincethecoder 9c878c3
Merge branch 'master' into tunnel/dark_mode_style
vincethecoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this func be combined with the
applyStyle
below?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I considered it. However, this func
applyStyle(type:)
is cleaner, since it requires thestyleType
. The other funcapplyStyle
scope is getting a bit bigger and complex with more conditions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPDATES:
I also refactoredapplyStyle
so that we have a functionapplyStyle(type:)
to containstyleType
related logic.