Re: [community-group] [Format] Token types - optional or required (#63)

The additional context is helpful. The motivator for `type` is to have a consistent data type for vendors. That makes sense. But that still doesn't answer the question about making this required. 

I would look at how Style Dictionary works. AFAIK, the only thing that is _required_ is `value`. That being said, you can generate a token without `value`, you just have to write a different variable to get its value, although not recommended. 

I am of the school that I have a `color.json` file and I define types at that level. That being said, I can see the value of having a `type` value for other vendors to display data. But all of that seems like it should be an open flexible API option. Use it if you need it. Don't if you don't. Making things required is heavy-handed IMHO in favor of vendors vs authors.

I'd ask @dbanksdesign where he sees the tradeoffs for this. 

I see your argument for linting/testing/validation based on data types, but if you are going to use that as a motivator and make it required, then there should be a list of allowed types. Without that vendors who create linting/testing/validators will have a hard time doing so IMHO. Either this body comes up with that list or there is a specification for authors to maintain that list of types. 

Regardless of all of this, allowing for types to be set globally versus individually, is a GREAT IDEA! Fully support that. I do something [similar to that](https://github.com/AlaskaAirlines/Icons/blob/master/src/data/icons.json), but I wrote the code that appends the common data to the individual. @dbanksdesign I am not aware of a feature in Style Dictionary that supports that? If not, wow, that's a GREAT IDEA! 

-- 
GitHub Notification of comment by blackfalcon
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/63#issuecomment-916509644 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 9 September 2021 23:31:27 UTC