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

Drop prefixes in property names #4083

Closed
lucaswoj opened this issue Feb 1, 2017 · 5 comments
Closed

Drop prefixes in property names #4083

lucaswoj opened this issue Feb 1, 2017 · 5 comments
Labels
breaking change ⚠️ Requires a backwards-incompatible change to the API cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)

Comments

@lucaswoj
Copy link
Contributor

lucaswoj commented Feb 1, 2017

From @peterqliu on November 17, 2014 21:9

screen shot 2014-11-17 at 12 29 46 pm

Namely, fill-,line-,raster-,background-

These prefixes automatically take after the layer's type, and as long as they live on separate layers, are redundant. The other prefixes icon- and text- are necessary, since they can cohabit the same symbol layer.

Copied from original issue: mapbox/mapbox-gl-style-spec#218

@lucaswoj lucaswoj added the breaking change ⚠️ Requires a backwards-incompatible change to the API label Feb 1, 2017
@lucaswoj
Copy link
Contributor Author

lucaswoj commented Feb 1, 2017

From @jfirebaugh on November 20, 2014 1:31

Given that we need the prefix for symbol properties, and we might want to use them for a combination stroked and filled "polygon" type layer as well, I think we should keep them universal.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Feb 1, 2017

From @jfirebaugh on January 30, 2015 19:44

Keeping these for now.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Feb 1, 2017

From @1ec5 on December 21, 2016 22:59

Dropping the redundant prefixes would be highly desirable for the iOS and macOS SDKs, where property names are expected to be grammatical: mapbox/mapbox-gl-native#6577 (comment). As of mapbox/mapbox-gl-native#7457, we have to twist the English language in weird ways to ensure that Boolean property names in particular use the right parts of speech.

@1ec5 1ec5 added the cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) label Feb 3, 2017
@1ec5
Copy link
Contributor

1ec5 commented May 12, 2017

More motivation for dropping prefixes on iOS and macOS: https://swift.org/documentation/api-design-guidelines/#omit-needless-words

In mapbox/mapbox-gl-native#6577 (comment), we discussed dropping them just from the iOS/macOS runtime styling API, which wouldn’t have required any changes to the style specification, but there was no consensus. Doing so now would require a major version bump for the iOS SDK.

@jfirebaugh
Copy link
Contributor

Closing here; see #6584.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ⚠️ Requires a backwards-incompatible change to the API cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants