Open andrewpucci opened 1 year ago
This repo is awesome and your focus on the spec too. I want to get into working with the spec as defining your own can be tough. I noticed you were looking for more dev help on this project from your bio. Let me know if I can help in the implementation on this 👍 @lukasoppermann
In any case, I work with Andrew. A few things I've noticed so far:
type
is being set so that's good because the spec seems intent on having a type: "A token's type can be set directly by giving it a $type property specifying the chosen type. Alternatively, it can inherit a type from one of its parent groups, or be an alias of a token that has the desired type." color
type seems to be the default type for handling variables https://github.com/lukasoppermann/design-tokens/blob/bec866ae0bbb5b2704f6aca3dce8b841ada2ba4e/src/utilities/getVariables.ts#L11. Yet the output here does not have the blend mode set so I don't think that this color type is getting all the way to the color category https://github.com/lukasoppermann/design-tokens/blob/bec866ae0bbb5b2704f6aca3dce8b841ada2ba4e/src/transformer/standardTransformer.ts#L274Based on the observations and figma linked, I was curious about how best to approach this in your experience. I noticed that there were integration tests including aliases in the standard tokens json.
Since this is using a color, it would be hard to test a non-color type.
"ref blue": {
"description": "Some other description",
"type": "color",
"value": "{color.colors.single blue}",
"blendMode": "normal",
"extensions": {
"org.lukasoppermann.figmaDesignTokens": {
"styleId": "S:a466a5c4f753617558885425bf0c42b7a53fcda4,",
"exportKey": "color",
"alias": "color.colors.single blue"
}
}
},
Thanks so much for the time!
I have an issue where dimension tokens are being exported as color tokens. In the sample below, I'd expect the
space.component.button.inside
tokens to be dimension, not color tokens.Here is an example file with Figma variables set up with aliases that produce this output. https://www.figma.com/file/1eQQNyiQprQJ8GlJnjnDzT/Untitled?type=design&node-id=0%3A1&mode=design&t=axtP1XAWGj3kvM9x-1