- From: Daniel Del Core via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Jun 2022 00:09:01 +0000
- To: public-design-tokens-log@w3.org
I think having a `$state` property will be really beneficial to the spec as well. In our implementation, we have a `state` property that can take one of the following states: `Experimental → Active → Deprecated → Sunset → Deleted` - Experimental: For introducing tokens for internal validation and trail purposes - Active: This token is currently actively being used. Tooling will help to ensure tokens are used. - Deprecated: This token has been flagged for future deletion and should no longer be used. - Sunset: This token has been marked for upcoming deletion and strictly should not be used. - Deleted (hard): This token has been fully removed from the tokens API Our tooling leverages this along with a `replacement` property to perform automatic or controlled migrations via tooling such as `eslint`, `stylelint`, `figma` etc. For example, a `deprecated` token with a `replacement` can be warned against and autofixed by eslint. A `sunset` token will produce an error and can be autofixed and so on. ```tsx { link: { pressed: { attributes: { group: 'color', state: 'deleted', replacement: 'color.link.pressed', description: 'Use for links in a pressed state', }, }, } ``` We've had to build these tools ourselves, but the great thing about having an industry-wide spec like this one is that both community and proprietary tooling can both leverage this concept to make token lifecycles a standard and consistent behaviour. -- GitHub Notification of comment by danieldelcore Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/118#issuecomment-1155825619 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 June 2022 00:09:03 UTC