-
Notifications
You must be signed in to change notification settings - Fork 87
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 abbreviation support #244
Conversation
/** | ||
The priority in which the component should be abbreviated. Lower numbers should be abbreviated first. | ||
*/ | ||
@objc public var abbreviationPriority: Int |
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.
Although this property is optional, objc does not support optional Ints. Because of this, the default value will be zero. Anyone have objections here?
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.
No concerns from me. Just noting that abbr_priority: 0
is the highest priority, so you might have to add a check to excludes abbreviations where abbr
is undefined when putting abbreviations together.
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.
On second thought, I think it's important it is optional. Going to use NSNumber.
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.
Changed the default value to Int.max
since zero would be incorrect.
@mapbox/navigation-ios this is ready for review. |
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.
LGTM 👍
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.
LGTM 👍
Adds support for abbreviations.
Going to update fixture and tests dependent on which ever can merge first between this PR and #243
/cc @mapbox/navigation-ios @danpaz