Skip to content

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

Closed

Description

@jfirebaugh

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

Activity

  1. added this to the v0.42 milestone on Nov 6, 2017
  2. jfirebaugh commented on Nov 6, 2017

    @jfirebaugh
    ContributorAuthor

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

  3. dpieri commented on Nov 21, 2017

    @dpieri

    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}",
  4. jfirebaugh commented on Nov 21, 2017

    @jfirebaugh
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions