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 abbreviation support #244

Merged
merged 5 commits into from
Mar 7, 2018
Merged

Add abbreviation support #244

merged 5 commits into from
Mar 7, 2018

Conversation

bsudekum
Copy link

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

/**
The priority in which the component should be abbreviated. Lower numbers should be abbreviated first.
*/
@objc public var abbreviationPriority: Int
Copy link
Author

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?

Copy link

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.

Copy link
Author

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.

Copy link
Author

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.

@bsudekum
Copy link
Author

bsudekum commented Mar 1, 2018

@mapbox/navigation-ios this is ready for review.

Copy link
Contributor

@vincethecoder vincethecoder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bsudekum bsudekum merged commit 2e9f8d2 into master Mar 7, 2018
@bsudekum bsudekum deleted the abbreviations branch March 7, 2018 20:57
Copy link
Contributor

@vincethecoder vincethecoder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@1ec5 1ec5 added backwards incompatible changes that break backwards compatibility of public API and removed backwards incompatible changes that break backwards compatibility of public API labels Dec 18, 2018
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