Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

Conversation

@brianacnguyen
Copy link
Contributor

@brianacnguyen brianacnguyen commented May 29, 2024

Description

  • This PR seeks to update the list of CSS variables based on the updated JSON
  • Breaking changes were also added to the migration doc

Related issues

Fixes: N/A

Manual testing steps

  1. Go to storybook
  2. Checkout the new colors!

Screenshots/Recordings

Before

After

Screenshot 2024-05-30 at 9 30 03 AM Screenshot 2024-05-30 at 9 30 19 AM Screenshot 2024-05-30 at 9 30 28 AM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@brianacnguyen brianacnguyen added color Tokens related to color team-design-system All issues relating to design system labels May 29, 2024
@brianacnguyen brianacnguyen self-assigned this May 29, 2024
@brianacnguyen brianacnguyen requested a review from a team May 29, 2024 22:37
@metamaskbot
Copy link
Collaborator

Builds ready [39cc2ae]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [2ca8779]

Storybook: Storybook

--color-network-localhost-default: var(--brand-colors-grey-grey200);
--color-network-localhost-inverse: var(--brand-colors-white-white010);
--color-network-sepolia-default: var(--brand-colors-violet-violet300);
--color-network-sepolia-inverse: var(--brand-colors-white-white010);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently dark theme never had these network and shadow colors to begin with. adding them to deprecated for now to be safe

@import './brand-colors-deprecated.css';
@import './typography.css';
@import './shadow.css';
@import './light-theme-colors.css';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reordered since some [deprecated] theme colors do reference shadow

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be reverted as there is no more deprecated classnames

@metamaskbot
Copy link
Collaborator

Builds ready [f451cfd]

Storybook: Storybook

Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Left some comments for the migrations docs

@metamaskbot
Copy link
Collaborator

Builds ready [10ce2f0]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [b6473d3]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [9907b98]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [3ee2b4f]

Storybook: Storybook

Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I have posted about version numbers in team chat this will impact whether we take the deprecation or breaking change route

@metamaskbot
Copy link
Collaborator

Builds ready [e05e0d9]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [fef3953]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [2a8bb16]

Storybook: Storybook

@metamaskbot
Copy link
Collaborator

Builds ready [05ea5c5]

Storybook: Storybook

Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could suggestions otherwise it LGTM

MIGRATION.md Outdated
Comment on lines 5 to 61
## From version 3.0.0 to 4.0.0

## Migration from Version 3.0.0 to 4.0.0

### Changes to Color Tokens (Breaking Changes)

In this version, significant updates have been made to color tokens, including modifications and removals. To upgrade to version 4, ensure that the following tokens are not present in your codebase:

### Brand Colors

#### CSS Variables

```
--brand-colors-grey-grey030 modified to --brand-colors-grey-grey025
--brand-colors-grey-grey040 modified to --brand-colors-grey-grey050
--brand-colors-grey-grey750 removed
--brand-colors-blue-blue000 modified to --brand-colors-blue-blue025
--brand-colors-green-green000 modified to --brand-colors-green-green025
--brand-colors-red-red000 modified to --brand-colors-red-red025
--brand-colors-yellow-yellow000 modified to --brand-colors-yellow-yellow025
--brand-colors-orange-orange000 modified to --brand-colors-orange-orange025
--brand-colors-violet-violet300 removed
--brand-colors-white-white000 modified to --brand-colors-white
--brand-colors-white-white010 removed
--brand-colors-black-black000 modified to --brand-colors-black
```

### Themed Colors

#### CSS Variables

```
--color-primary-shadow modified to --color-shadow-primary
--color-primary-disabled removed
--color-secondary-default removed
--color-secondary-alternative removed
--color-secondary-muted removed
--color-secondary-inverse removed
--color-secondary-disabled removed
--color-error-shadow modified to --color-shadow-primary
--color-error-disabled removed
--color-warning-alternative removed
--color-warning-disabled removed
--color-success-alternative removed
--color-success-disabled removed
--color-info-alternative removed
--color-info-disabled removed
--color-network-goerli-default removed
--color-network-goerli-inverse removed
--color-network-localhost-default removed
--color-network-localhost-inverse removed
--color-network-sepolia-default removed
--color-network-sepolia-inverse removed
```

- [From version 2.1.1 to 3.0.0](#from-version-211-to-300)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this

Migration Guide

This guide provides detailed instructions for migrating your project from one version of the @metamask/design-tokens to another.

From version 3.0.0 to 4.0.0

Changes to Color Tokens (Breaking Changes)

In this version, significant updates have been made to color tokens, including modifications and removals. To upgrade to version 4, ensure that the following tokens have been updated in your codebase:

Removed

CSS

### Brand colors
--brand-colors-grey-grey750
--brand-colors-violet-violet300
--brand-colors-white-white010

### Theme colors
--color-primary-disabled
--color-secondary-default
--color-secondary-alternative
--color-secondary-muted
--color-secondary-inverse
--color-secondary-disabled
--color-error-disabled
--color-warning-alternative
--color-warning-disabled
--color-success-alternative
--color-success-disabled
--color-info-alternative
--color-info-disabled
--color-network-goerli-default
--color-network-goerli-inverse
--color-network-localhost-default
--color-network-localhost-inverse
--color-network-sepolia-default
--color-network-sepolia-inverse

### Component colors
--component-button-primary-shadow
--component-button-danger-shadow

JS

TBC

Changed

CSS

### Brand colors
--brand-colors-grey-grey030 modified to --brand-colors-grey-grey025
--brand-colors-grey-grey040 modified to --brand-colors-grey-grey050
--brand-colors-blue-blue000 modified to --brand-colors-blue-blue025
--brand-colors-green-green000 modified to --brand-colors-green-green025
--brand-colors-red-red000 modified to --brand-colors-red-red025
--brand-colors-yellow-yellow000 modified to --brand-colors-yellow-yellow025
--brand-colors-orange-orange000 modified to --brand-colors-orange-orange025
--brand-colors-white-white000 modified to --brand-colors-white
--brand-colors-black-black000 modified to --brand-colors-black

## Theme colors
--color-primary-shadow modified to --color-shadow-primary
--color-error-shadow modified to --color-shadow-primary

JS

TBC

@import './brand-colors-deprecated.css';
@import './typography.css';
@import './shadow.css';
@import './light-theme-colors.css';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be reverted as there is no more deprecated classnames

Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🔥 🚀

@metamaskbot
Copy link
Collaborator

Builds ready [c8b61c8]

Storybook: Storybook

@georgewrmarshall georgewrmarshall merged commit 4e66c65 into main May 30, 2024
@georgewrmarshall georgewrmarshall deleted the css-tokens-update branch May 30, 2024 23:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

color Tokens related to color team-design-system All issues relating to design system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants