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

Rename text-field to text #4166

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

Rename text-field to text #4166

lucaswoj opened this issue Feb 1, 2017 · 2 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 @1ec5 on January 5, 2017 10:58

The text-field property should be renamed to simply text.

The name text-field makes it sound like the property was originally intended to identify a field in the feature’s properties object. That happens to be what this property is usually used for, but by that logic we’d have icon-image-field instead of icon-image. Given the enthusiasm for supporting more expressive values for this property in #104 and #47, the word “field” feels downright anachronistic.

The name text-field is also misleading when incorporated into the iOS and macOS SDKs: the developer would expect a textField property to hold an NSTextField or UITextField, or at least some kind of editable control, but not an NSString. There is such a thing as NSText on macOS, but no one ever uses it directly. On the other hand, UILabel.text, analogous to the text-field layout property, is one of the most commonly used properties on iOS.

/cc @lucaswoj @jfirebaugh

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

@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

This fits nicely with #218

@1ec5 1ec5 added the cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) label Feb 3, 2017
@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