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

Add SubType to VisualInstruction.Component. #778

Merged
merged 11 commits into from
Dec 19, 2022

Conversation

MaximAlien
Copy link
Contributor

Add SubType to VisualInstruction.Component.

@MaximAlien MaximAlien added this to the v2.9 milestone Dec 8, 2022
@MaximAlien MaximAlien requested a review from a team December 8, 2022 18:55
@MaximAlien MaximAlien self-assigned this Dec 8, 2022
@MaximAlien MaximAlien marked this pull request as draft December 8, 2022 18:56
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2022

Codecov Report

Merging #778 (f0fc3d0) into main (6a29875) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #778   +/-   ##
=======================================
  Coverage   85.29%   85.30%           
=======================================
  Files          52       52           
  Lines        4542     4545    +3     
=======================================
+ Hits         3874     3877    +3     
  Misses        668      668           
Impacted Files Coverage Δ
.../MapboxDirections/VisualInstructionComponent.swift 80.70% <100.00%> (+0.34%) ⬆️

@MaximAlien MaximAlien force-pushed the maxim/NAVIOS-332-add-visual-instruction-sub-type branch from aa19788 to 7fe8012 Compare December 16, 2022 18:03
@MaximAlien MaximAlien requested a review from a team December 16, 2022 21:18
@MaximAlien MaximAlien marked this pull request as ready for review December 16, 2022 21:18
Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

Some naming-related feedback. (@abhishek1508, not sure if this is coming too late for the corresponding APIs on Android.)

Subtype that provides more context about the component guidance view that may help in visual
markup and display choices.
*/
public enum SubType: String, Codable, CaseIterable {
Copy link
Contributor

Choose a reason for hiding this comment

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

We’re avoiding the term “Type” in favor of “Kind”, as in VisualInstruction.Component.Kind, so “SubType” is a bit incongruous. If only a guidanceView can have a subtype, then call it GuidanceViewKind. Ideally, we’d make this an associated value of Kind.guidanceView, but that’s difficult because Kind is string-backed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's hard to find the best option here because this option is not yet public. At the same time it seems that SubType is only related to guidance views, so I'll rename it to GuidanceViewKind.

Sources/MapboxDirections/VisualInstructionComponent.swift Outdated Show resolved Hide resolved
Sources/MapboxDirections/VisualInstructionComponent.swift Outdated Show resolved Hide resolved
Sources/MapboxDirections/VisualInstructionComponent.swift Outdated Show resolved Hide resolved
Sources/MapboxDirections/VisualInstructionComponent.swift Outdated Show resolved Hide resolved
@@ -1,9 +1,5 @@
# Changes to Mapbox Directions for Swift

## v2.9.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This entry should not be public just yet.

Comment on lines +287 to +291
Junction view. Bird’s-eye artist’s rendition view of the overhead signage and
preferred road lane arrow on motorways where the road bifurcates into 2 or
more motorway trunk roads.
*/
case fork = "jct"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: imo, we should make these doc comments more clear since the naming has changed. Some of @1ec5's suggestions provide some clarity as to what each of these GuidanceViewKinds mean, and it would be great to let developers know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit hard to provide more clarity at this point, maybe in future we'll be able to extend these docs. Current info regarding sub types was taken from private docs and unfortunately they do not have enough info either.

@MaximAlien MaximAlien merged commit bb9fe98 into main Dec 19, 2022
@MaximAlien MaximAlien deleted the maxim/NAVIOS-332-add-visual-instruction-sub-type branch December 19, 2022 21:56
MaximAlien added a commit that referenced this pull request Jan 3, 2023
@kried kried mentioned this pull request Jan 16, 2023
S2Ler added a commit that referenced this pull request Jan 19, 2023
S2Ler added a commit that referenced this pull request Jan 19, 2023
This reverts commit 94244ec.

This feature contains breaking change and should be reimplemented.
S2Ler added a commit that referenced this pull request Jan 20, 2023
This reverts commit 94244ec.

This feature contains breaking change and should be reimplemented.

(cherry picked from commit d4b4533)
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.

None yet

4 participants