figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Ignore top level descriptions on json import

Open lukasoppermann opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. The w3c specs allow descriptions in groups (not tied to a specific token). Currently figma tokens imports those as "other" tokens. However I think it would be neat to ignore them (or allow the user to set a flag to ignore them).

Describe the solution you'd like Since the token name description is define, you could just ignore all descriptions that are not within a token if the ignore group description flag is set.

Example json

{
  "core": {
    "description": "Our brand's core color palette", // ignore
    "white": {
      "value": "#ffffff",
      "type": "color"
    },
    "black": {
      "value": "#191919",
      "type": "color"
    },
    "green": {
     "description": "Brand green", // import to token
      "value": "#29D659",
      "type": "color"
    }
  }
 }

lukasoppermann avatar Oct 12 '21 11:10 lukasoppermann