-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Rename text-field to text #4166
Copy link
Copy link
Closed
Labels
breaking change ⚠️Requires a backwards-incompatible change to the APIRequires a backwards-incompatible change to the APIcross-platform 📺Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)
Metadata
Metadata
Assignees
Labels
breaking change ⚠️Requires a backwards-incompatible change to the APIRequires a backwards-incompatible change to the APIcross-platform 📺Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.)
From @1ec5 on January 5, 2017 10:58
The
text-fieldproperty should be renamed to simplytext.The name
text-fieldmakes 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 haveicon-image-fieldinstead oficon-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-fieldis also misleading when incorporated into the iOS and macOS SDKs: the developer would expect atextFieldproperty 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 thetext-fieldlayout property, is one of the most commonly used properties on iOS./cc @lucaswoj @jfirebaugh
Copied from original issue: mapbox/mapbox-gl-style-spec#646