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

Communicate lack of support for feature-state in layout properties #6724

Closed
samanpwbb opened this issue May 24, 2018 · 3 comments
Closed

Communicate lack of support for feature-state in layout properties #6724

samanpwbb opened this issue May 24, 2018 · 3 comments
Assignees

Comments

@samanpwbb
Copy link
Contributor

samanpwbb commented May 24, 2018

When reading up on feature-state, I noticed this line:

return [new ValidationError(options.key, options.value, '"feature-state" data expressions are not supported with layout properties.')];
– does this mean that layout properties like icon-image and text-size cannot be used with the feature-state expression? If that is the case, could we capture this constraint in the spec documentation:
"doc": "Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state object.",
?

Right now, there's no way to know that we're supposed to hide this expression in the Studio UI for layout properties with data driven styling support.

@asheemmamoowala asheemmamoowala self-assigned this May 24, 2018
@asheemmamoowala
Copy link
Contributor

@samanpwbb Are you thinking that a note in the doc field would be enough, or are you looking for an additional field in the style-spec to automate the Studio UI?

@samanpwbb
Copy link
Contributor Author

An additional field would be best.

@jfirebaugh
Copy link
Contributor

How about adding "feature-state" as a potential element of the "parameters" array property added in #6521?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants