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

Eliminate the syntactic distinction between "paint" and "layout" properties #4160

Open
lucaswoj opened this issue Feb 1, 2017 · 4 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 @lucaswoj on December 23, 2016 14:34

The differences between "paint", "layout", and "top-level" properties are becoming increasingly nuanced. Without a firm knowledge of our implementation, it can be hard to reason about the behaviour of paint properties vs layout properties, especially in the context of data-driven styling. It is worth considering eliminating the syntactic distinction between "paint" and "layout" properties (as Studio does), instead providing documentation about the behaviour of each property.

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

@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 @nickidlugash on January 25, 2017 20:54

This sounds good generally, but just want to flag that it may make the definition of a ref sound more convoluted.

@lucaswoj
Copy link
Contributor Author

lucaswoj commented Feb 1, 2017

@nickidlugash We're getting rid of refs too 😄 As of now, ref is a no-op in GL JS.

@stevage
Copy link
Contributor

stevage commented Dec 5, 2018

Any more thoughts about this? I just implemented this in http://npmjs.com/package/mapbox-gl-utils and dear god it makes life simpler. You don't realise how much brainspace is spent trying to understand and remember why line-width and circle-radius are paint properties, but icon-size and text-size are layout properties.

@stevage
Copy link
Contributor

stevage commented Jan 15, 2019

Also, just wanted to comment on this:

Without a firm knowledge of our implementation, it can be hard to reason about the behaviour of paint properties vs layout properties, especially in the context of data-driven styling.

I have been using Mapbox-GL-JS a long time, and made many, many maps with it. I have absolutely no idea what the behaviour difference between paint properties and layout properties is. :) So, removing the syntactic requirement, and also documenting whatever that difference is on a per-property basis is a double-win for me.

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