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

Never resolve tokens after evaluating a text-field or icon-image expression #5599

Closed
jfirebaugh opened this issue Nov 6, 2017 · 3 comments
Closed
Milestone

Comments

@jfirebaugh
Copy link
Contributor

We want to deprecate and remove {} token interpolation in favor of string expressions like concat, so we should avoid setting the precedent that interpolation is supported in combination with expressions. A text-field or icon-image expression that evaluates to a string containing { and } characters should always treat those characters literally, and never do interpolation, regardless of whether the expression is feature-constant or not.

cc @anandthakker

@jfirebaugh jfirebaugh added this to the v0.42 milestone Nov 6, 2017
@jfirebaugh
Copy link
Contributor Author

Note that this implies that any auto-conversion of stop-based functions to expressions needs to convert {}-interpolation to equivalent get and concat expressions.

@dpieri
Copy link

dpieri commented Nov 21, 2017

It took me a while to figure out what this change was. Am I correct in concluding that my existing styles that use tokens like this will still work?

"icon-image": "{shield}-{reflen}",

@jfirebaugh
Copy link
Contributor Author

Yes, correct, the change affects only expressions, not constant string values.

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

No branches or pull requests

2 participants