feat(tokens): expose renamed data for deprecated tokens#6049
feat(tokens): expose renamed data for deprecated tokens#6049
renamed data for deprecated tokens#6049Conversation
… into seckles/typography-styles
… into seckles/typography-styles
… into seckles/tokens-expose-renamed
|
… into seckles/tokens-expose-renamed
| } | ||
|
|
||
| function tokenRefFromName(name) { | ||
| return name ? `token('${name}')` : null; |
There was a problem hiding this comment.
Just updating to double-quotes
| return dp[aLen][bLen]; | ||
| } | ||
|
|
||
| function suggestionPrefixScore(query: string, candidate: string): number { |
There was a problem hiding this comment.
All of this sort and rank and so forth logic courtesy of ChatGPT via Codex, theoretically optimized for performance 😅
| "displayName": "SWC token() Intellisense", | ||
| "engines": { | ||
| "vscode": "1.1.37" | ||
| "vscode": "^1.109.0" |
There was a problem hiding this comment.
There were compat issues with a locked version, but this is entirely separate from our library since it is exclusive to the extension
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
caseyisonit
left a comment
There was a problem hiding this comment.
looks good with one minor code suggestion to fix serif font tokens
Description / Context
Per recent design data update, the extension will now use
renameddata in prompt if available for deprecated tokens.The
swc-tokenstoken generation was updated to split offrenamedtokens in order to keep deprecated tokens out of the final CSS token output, but make therenameddata available to the extension.Related issue(s)
SWC-1489
Screenshots (if appropriate)
Extension flags as error and displays renamed value to assist in updating.
Typos also try to match with renamed values when close
Regular error on unknown/fully deprecated tokens
Diagnostic message also appears in "Problems" pane
Author's checklist
Reviewer's checklist
Manual review test cases
swc-vscode-tokenfor install instructionsfield-widthfield-withand validate suggestions still include the renamed value as possibility