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

Export to Figma feature doesn't export all the variables associated to the Theme

Open marach-t-mtl opened this issue 1 year ago • 1 comments

Describe the bug Export to Figma feature doesn't export all the variables associated to the Theme.

The theme: image

The exported variables: image

Since the prim/mtl/color/value doesn't get exported into variables, all the variables in sem/color/mtl-light are all referenced to empty variable, thus, cannot be used.

To Reproduce Steps to reproduce the behavior:

  1. Create a token set that refer the color of another token set
  2. Create a theme with those 2 sets, make sure to Enabled ( NOT Reference Only)
  3. Export Variables to Figma using Style & Variables > Export styles & Variables
  4. See error

Expected behavior

  • It should export both token sets as variables, when I pick Enabled Theme configuration
  • It should NOT export the token, if I pick Reference Only in Theme configuration

Screenshots or Screencasts (See above)

marach-t-mtl avatar Aug 19 '24 11:08 marach-t-mtl

hey @marach-t-mtl, it looks like you've only created a collection for the sem/color, but you're variables are missing hte core/primitives collection. CleanShot 2024-08-22 at 20 04 12@2x It is advised to always create a separate variable collection of your core/primitive tokens. These core/primitive sets need to always be enabled and then subsequent sets that are referencing these tokens need to be enabled BUT have the core set to reference only.

keeganedwin avatar Aug 22 '24 14:08 keeganedwin

Closing, this should work with the above steps

six7 avatar Sep 11 '24 07:09 six7