feat: color updates to the design tokens package#230
Conversation
a09362b to
a70030a
Compare
| muted: 'var(--color-background-muted)', | ||
| 'muted-hover': 'var(--color-background-muted-hover)', | ||
| 'muted-pressed': 'var(--color-background-muted-pressed)', |
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
| shadow: { | ||
| /** For neutral drop shadow color */ | ||
| default: string; | ||
| /** For primary drop shadow color */ | ||
| primary: string; | ||
| /** For critical/danger drop shadow color */ | ||
| error: string; | ||
| }; |
There was a problem hiding this comment.
Adding missing shadow type
| @@ -23,225 +23,133 @@ export type ThemeShadows = { | |||
|
|
|||
There was a problem hiding this comment.
Updating descriptions to match Figma
| @@ -7,27 +7,27 @@ const designTokens = require('../../../figma/tokens.json'); | |||
| describe('Shadows', () => { | |||
There was a problem hiding this comment.
Fixing tests
| @@ -8,7 +8,9 @@ describe('Light Theme', () => { | |||
| it('color tokens are exported from lightTheme by checking a random color token', () => { | |||
There was a problem hiding this comment.
Fixing tests
| @@ -3,76 +3,131 @@ import type { ThemeColors } from '../types'; | |||
|
|
|||
There was a problem hiding this comment.
Improving comments and aligning to Figma
| @@ -30,11 +30,13 @@ function resolveColorReferences( | |||
| if (match) { | |||
There was a problem hiding this comment.
Improving tests
| @@ -8,7 +8,9 @@ describe('dark Theme', () => { | |||
| it('color tokens are exported from darkTheme by checking a random color token', () => { | |||
There was a problem hiding this comment.
Improving tests
| @@ -3,76 +3,131 @@ import type { ThemeColors } from '../types'; | |||
|
|
|||
There was a problem hiding this comment.
Improving comments and aligning with updated Figma comments
| @@ -30,11 +30,13 @@ function resolveColorReferences( | |||
| if (match) { | |||
There was a problem hiding this comment.
Improving tests
| @@ -4,283 +4,301 @@ | |||
| "value": "{grey.000}", | |||
There was a problem hiding this comment.
Updating comments and adding background muted colors
| @@ -1,286 +1,304 @@ | |||
| { | |||
There was a problem hiding this comment.
Updating comments and adding background muted
| @@ -26,11 +26,13 @@ describe('Light Theme Colors CSS', () => { | |||
| throw new Error(`Invalid color or shade: ${value as string}`); | |||
There was a problem hiding this comment.
Improving tests
| @@ -4,102 +4,108 @@ | |||
| :root, | |||
There was a problem hiding this comment.
Updating comments to align with figma and adding background muted
| @@ -26,11 +26,13 @@ describe('Dark Theme Colors CSS', () => { | |||
| throw new Error(`Invalid color or shade: ${value as string}`); | |||
There was a problem hiding this comment.
Improving tests
| @@ -3,102 +3,108 @@ | |||
| */ | |||
There was a problem hiding this comment.
Updating comments and colors as well as adding background muted
| hover: '#ffffff0a', // For "hover" state that use no background fill. | ||
| pressed: '#ffffff14', // For "pressed" state that use no background fill. | ||
| /** For default neutral surface (#24272A) */ | ||
| default: brandColor.grey900, |
|
Approved! |
# Release 1.0.0 ## Description This PR prepares the release of version 1.0.0 of the design system packages. ## Changes - feat: color updates to the design tokens package ([#230](#230)) - `@metamask/design-tokens` package migrated from standalone repository into the design system monorepo ([128](#128)) ## Release Process Checklist - [x] Branch named `release/1.0.0` created - [x] Changelogs updated and validated - [x] Dependencies updated to latest versions (`yarn constraints --fix && yarn && yarn dedupe`) - [x] PR review and testing completed - [x] Ready for "Squash & Merge" with commit message "Release 1.0.0" ## Post-Merge Steps 1. The `publish-release` GitHub Action will tag the release 2. NPM publishing requires approval from the `npm-publishers` team 3. Verify package publication on [NPM](https://npms.io/search?q=scope%3Ametamask)

Description
This PR introduces updates to the Figma, CSS, and JS design tokens for improved accessibility, consistency, and usability across both Light and Dark themes. Key changes include updates to border and icon colors, the addition of new background color tokens, and alignment of descriptions with the latest in Figma. Migrated from MetaMask/design-tokens#741
Details
Light Theme Updates
Border:
border.defaultfrom{grey.200}to{grey.400}for improved accessibility.Icons:
icon.default:{grey.900}→{text.default}icon.alternative:{grey.500}→{text.alternative}icon.muted:{grey.300}→{text.muted}New Colors Added:
background-muted:{grey.050}background-muted-hover:#E7EBEEbackground-muted-pressed:#DBE0E6Descriptions:
Dark Theme Updates
Background:
background-default:{grey.800}→{grey.900}background-alternative:{grey.900}→{grey.1000}background-default-hover:#313235→#1E2124background-default-pressed:#3F4145→#272B2Fbackground-alternative-hover:#1F2123→#0A0A0Abackground-alternative-pressed:#2E3033→#141414Border:
border.defaultfrom{grey.400}to{grey.500}to align with Light theme contrast levels.Text:
text.alternative:{grey.200}→{grey.300}text.muted:{grey.400}→{grey.500}Icons:
icon.default:{grey.000}→{text.default}icon.alternative:{grey.300}→{text.alternative}icon.muted:{grey.500}→{text.muted}New Colors Added:
background-muted:{grey.800}background-muted-hover:#2D3034background-muted-pressed:#363B3FDescriptions:
Related Issues
Fixes: #181
Manual Testing Steps
yarn storybookin your terminal.Screenshots/Recordings
Storybook
After
Updated colors are reflected in storybook for Figma, JSinCSS and CSS theme colors
after720.mov
Mobile
Mobile: Design token updates working as expected for light and dark mode
Before
before720.mov
After
after720.mov
Extension
Extension: Design token updates working as expected for light and dark mode
Before
before720.mov
After
after720.mov
Portfolio
Portfolio: Design token updates working as expected for light and dark mode
Before
before720.mov
After
after720.mov
Intellisense
After
Intellisense working for theme types
comment.check720.mov
Pre-merge Checklist