Open drwpow opened 4 weeks ago
Name | Link |
---|---|
Latest commit | 3fd459b78f7826ae01893226d3ae6dd26773b309 |
Latest deploy log | https://app.netlify.com/sites/dtcg-tr/deploys/671ad1c8b88c2e0008764d36 |
Deploy Preview | https://deploy-preview-255--dtcg-tr.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thanks! Will give other editors a chance to review and leave feedback over the next week or 2. If there’s no objection, we’ll merge!
But also, based on the other recent proposals, generally the editors express the same opinions found in the comments, so the fact it’s being proposed in the first place is usually positive 🙂
To confirm, there is neither a necessity nor a spec-defined way to confirm or extract an alternate token suggestion inside the deprecated tag, toolmakers can make their own assumptions on if and how to programmatically determine it?
On Fri, 1 Nov 2024 at 01:31, Kaelig Deloumeau-Prigent < @.***> wrote:
@.**** commented on this pull request.
In technical-reports/format/groups.md https://github.com/design-tokens/community-group/pull/255#discussion_r1825099010 :
- "Button": {
- "$deprecated": "Please use {action.*} tokens instead.",
- "Foreground": { "$value": "#202020", "$type": "color" },
- "Background": { "$value": "#ffffff", "$type": "color" }
- } +} +```
+
+In the context of a group, adding
$deprecated
will apply to all tokens within that group, unless a token explicitly sets a value offalse
. Any value provided by a token will override the group default.+| Value | Explanation | +| :------- | :---------------------------------------------------------- | +|
true
| This token is deprecated (no explanation provided). | +|String
| This token is deprecated AND this is an explanation. |Perhaps it would be useful to mention that tool makers MAY augment the string when it contains aliases such as the one given as an example:
Please use {button.activeBorder} instead
— Reply to this email directly, view it on GitHub https://github.com/design-tokens/community-group/pull/255#pullrequestreview-2408972059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKS36AFBRW2TZODLTREIVLZ6KEBLAVCNFSM6AAAAABQR27HUKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMBYHE3TEMBVHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@drwpow good to merge?
@drwpow good to merge?
Almost! We had been waiting to see if one group had feedback. Will ping them again and if not, will merge!
Summary
This adds a new
$deprecated
property for both tokens and groups as suggested by @romainmenke.Reasoning
This PR basically accepts #118 as-proposed (the original proposal), while taking into account feedback from followup comments.
Pros
Cons
$deprecated
in the future would be a breaking changeAlternatives
$deprecated
/$deprecatedMessage
) isn’t a design pattern that currently exists in the spec. Pair properties can also be antipatterns as they introduce validation complexity (e.g. what if$deprecatedMessage
is set but$deprecated
isn’t—is that valid or invalid? and if valid, what behavior is inferred?)$deprecated.deprecated
/$deprecated.message
) wasn’t proposed here because it adds unnecessary boilerplate.$deprecated
. Or in areas where they potentially overlap, will be complementary rather than conflicting.Notes