-
Notifications
You must be signed in to change notification settings - Fork 54
Add new token for dashboard background #1261
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
Conversation
🦋 Changeset detectedLatest commit: fcaee36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Design Token Diff (CSS)
|
Design Token Diff (StyleLint)
|
Design Token Diff (Figma)
|
Add a new token to the @primer/primitives package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new design token for the dashboard background color to address custom CSS issues in dark themes. The token provides a cleaner, token-based approach for handling the dashboard feed background color across different theme variants.
- Introduces a new
dashboard.bgColortoken with theme-specific overrides - Uses
bgColor.defaultfor light themes andbgColor.insetfor all dark theme variants - Includes proper Primer extensions configuration for Figma integration
Reviewed Changes
Copilot reviewed 2 out of 14 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tokens/component/dashboard.json5 | Defines the new dashboard background color token with theme overrides |
| .changeset/moody-kings-nail.md | Documents the token addition as a patch-level change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "@primer/primitives": patch | ||
| --- | ||
|
|
||
| add token |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changeset description is too brief. It should explain what token was added and its purpose, e.g., 'Add dashboard.bgColor token for dashboard background theming'.
| add token | |
| Add <token.name> token for <purpose of token> |
| 'dark-dimmed': { | ||
| $value: '{bgColor.inset}', | ||
| }, | ||
| 'dark-dimmed-high-contrast': { | ||
| $value: '{bgColor.inset}', | ||
| }, | ||
| 'dark-high-contrast': { | ||
| $value: '{bgColor.inset}', | ||
| }, | ||
| 'dark-protanopia-deuteranopia-high-contrast': { | ||
| $value: '{bgColor.inset}', | ||
| }, | ||
| 'dark-tritanopia-high-contrast': { | ||
| $value: '{bgColor.inset}', | ||
| }, |
Copilot
AI
Oct 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All dark theme variants use the same value '{bgColor.inset}'. Consider defining a single dark theme override and letting other variants inherit from it to reduce duplication.
| 'dark-dimmed': { | |
| $value: '{bgColor.inset}', | |
| }, | |
| 'dark-dimmed-high-contrast': { | |
| $value: '{bgColor.inset}', | |
| }, | |
| 'dark-high-contrast': { | |
| $value: '{bgColor.inset}', | |
| }, | |
| 'dark-protanopia-deuteranopia-high-contrast': { | |
| $value: '{bgColor.inset}', | |
| }, | |
| 'dark-tritanopia-high-contrast': { | |
| $value: '{bgColor.inset}', | |
| }, |
This is a bit of a special snowflake, but the dashboard currently sets custom CSS to change the feed background color for dark themes. It's a bit broken and would be easier to do at the token level, so I'm adding a pattern level token for it.
Closes https://github.com/github/primer/issues/5978