-
Notifications
You must be signed in to change notification settings - Fork 11
Testing GCDS tokens #2113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Testing GCDS tokens #2113
Conversation
| import plugin from "tailwindcss/plugin"; | ||
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable blue from the code. This involves editing the line where blue is destructured from tokens.Tokens.color and removing it. This change will not affect the existing functionality of the code.
-
Copy modified line R4
| @@ -3,3 +3,3 @@ | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
| import plugin from "tailwindcss/plugin"; | ||
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable grayscale from the import statement on line 4. This will make the code cleaner and eliminate any confusion about the purpose of the variable.
- Remove the
grayscalevariable from the destructuring assignment on line 4. - Ensure that no other parts of the code are affected by this change.
-
Copy modified line R4
| @@ -3,3 +3,3 @@ | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { blue, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
| import plugin from "tailwindcss/plugin"; | ||
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable green from the import statement on line 4. This will make the code cleaner and potentially improve performance by avoiding unnecessary variable declarations.
- Remove the
greenvariable from the destructuring assignment on line 4. - Ensure that no other parts of the code are affected by this change.
-
Copy modified line R4
| @@ -3,3 +3,3 @@ | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { blue, grayscale, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
| import plugin from "tailwindcss/plugin"; | ||
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable orange from the destructuring assignment on line 4. This will improve code readability and eliminate any unnecessary computation associated with initializing orange.
- Remove
orangefrom the destructuring assignment on line 4. - Ensure that no other parts of the code are affected by this change.
-
Copy modified line R4
| @@ -3,3 +3,3 @@ | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { blue, grayscale, green, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
| import plugin from "tailwindcss/plugin"; | ||
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable purple from the code. This involves deleting the purple variable from the destructuring assignment on line 4. This change will not affect the existing functionality of the code, as purple is not used anywhere.
-
Copy modified line R4
| @@ -3,3 +3,3 @@ | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { blue, grayscale, green, orange, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable focus from the code. This involves editing the line where focus is destructured from tokens.Tokens and removing it from the list of destructured variables. This change will not affect the existing functionality of the code.
-
Copy modified line R5
| @@ -4,3 +4,3 @@ | ||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
| const { bg, border, container, danger, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
|
|
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable font from the code. This involves editing the line where font is destructured from tokens.Tokens and removing font from the list of destructured variables. This change will not affect the existing functionality of the code.
-
Copy modified line R5
| @@ -4,3 +4,3 @@ | ||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
| const { bg, border, container, danger, focus, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
|
|
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable fontWeights from the code. This involves editing the line where fontWeights is destructured from the tokens.Tokens object. By removing fontWeights, we ensure that the code is cleaner and potentially more efficient.
-
Copy modified line R5
| @@ -4,3 +4,3 @@ | ||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
|
|
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable outline from the code. This involves editing the line where outline is destructured from tokens.Tokens and removing it from the list of destructured variables. This change will not affect the existing functionality of the code.
-
Copy modified line R5
| @@ -4,3 +4,3 @@ | ||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, spacing, text } = tokens.Tokens; | ||
|
|
| import tokens from "@cdssnc/gcds-tokens/build/tailwind/tailwind.tokens.json"; | ||
|
|
||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 10 months ago
To fix the problem, we need to remove the unused variable spacing from the code. This involves deleting the spacing variable from the destructuring assignment on line 5. This change will not affect the existing functionality of the code since spacing is not used anywhere.
-
Copy modified line R5
| @@ -4,3 +4,3 @@ | ||
| const { blue, grayscale, green, orange, purple, red, yellow } = tokens.Tokens.color; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, spacing, text } = tokens.Tokens; | ||
| const { bg, border, container, danger, focus, font, fontFamilies, fontSizes, fontWeights, lineHeights, link, outline, text } = tokens.Tokens; | ||
|
|
🧪 Review environmenthttps://g5l6tt2q6llt3ea7jexjwbo7e40lcfpj.lambda-url.ca-central-1.on.aws/ |
Summary | Résumé
Testing GCDS Tokens
This is a draft to share the impact of using GCDS Tokens on Notify. Overall it works well, and we can easily customize the bits where GCDS and Notify don't really align well yet, such as with the heading font scale or colour scales.
This will need to be broken up in smaller PRs, just to get the codebase ready to receive the GCDS Tokens with their naming conventions.