Re: [community-group] $deprecated property? (#118)

What is the current state of this idea?

I do think at least having a `$deprecated: true` property or `$state: "deprecated"` or however it can be encoded is very useful. 
For example, to use it to compile a json file with deprecated tokens only which can be used in linting.

Style dictionary currently encourages the use of `deprecated` and `deprecated_comment`. Another aspect we find important is to have a replacement token (if applicable).

I think the idea of @CITguy is pretty solid:

```json5
      "deprecated": true,
      // FORMAT 2: string
      // (Extends format 1, by providing a human-readable message about the deprecation)
      "deprecated": "'grey' has been deprecated.",
      // FORMAT 3: object
      // (Further extends format 2 by providing a "next of kin" replacement.)
      "deprecated": {
        "message": "'grey' has been deprecated.",
        // An alias is necessary in order to document the resolved, token name based on the transformation language.
        "replacement": "{gray}"
      }
```

This at least covers all cases that I have come across.


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


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

Received on Friday, 9 August 2024 13:17:06 UTC