Skip to content

replace hex values with design tokens#22585

Merged
garrettbear merged 10 commits intodevelopfrom
feat/22363/update-hex-values-design-tokens-part-1
Jan 23, 2024
Merged

replace hex values with design tokens#22585
garrettbear merged 10 commits intodevelopfrom
feat/22363/update-hex-values-design-tokens-part-1

Conversation

@garrettbear
Copy link
Copy Markdown
Contributor

@garrettbear garrettbear commented Jan 17, 2024

Description

Replace static hex values to a token from design-tokens that best matches. If unavailable, a temporary file has been set up for any new tokens needed but not yet provided by the design-tokens package.

Related issues

Fixes: #22363

Manual testing steps

  1. Run locally
  2. Compare local storybook to production storybook on the components color change
  3. Be sure to test light and dark mode

Screenshots/Recordings

See code comments

Before

After

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.

@garrettbear garrettbear added the team-design-system All issues relating to design system in Extension label Jan 17, 2024
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

.confirm_header {
&__wrapper {
box-shadow: 0 2px 16px 0 #0000001a;
box-shadow: var(--shadow-size-md) var(--color-shadow-default);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This improves the dark mode as well

Before

Screenshot 2024-01-17 at 2 26 47 PM Screenshot 2024-01-17 at 2 25 10 PM

After

Screenshot 2024-01-17 at 2 26 54 PM Screenshot 2024-01-17 at 2 26 36 PM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Subtle change in the lighter color

Before & After

Screen.Recording.2024-01-17.at.3.45.57.PM.mov

Comment on lines +34 to +45
base: '#037DD6', // var(--brand-colors-blue-blue500)
},
inactiveThumb: {
base: '#6A737D',
base: '#6A737D', // var(--brand-colors-grey-grey500)
},
active: {
base: '#F2F4F6',
hover: '#F2F4F6',
base: '#F2F4F6', // var(--brand-colors-grey-grey040)
hover: '#F2F4F6', // var(--brand-colors-grey-grey040)
},
inactive: {
base: '#F2F4F6',
hover: '#F2F4F6',
base: '#F2F4F6', // var(--brand-colors-grey-grey040)
hover: '#F2F4F6', // var(--brand-colors-grey-grey040)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since you have to pass hex values here, I am just commenting the design token variable that aligns with these colors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All colors no longer used. See comment above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All 4 colors are no longer being used

Screenshot 2024-01-18 at 3 14 46 PM Screenshot 2024-01-18 at 3 14 37 PM Screenshot 2024-01-18 at 3 14 24 PM Screenshot 2024-01-18 at 3 14 15 PM

Comment on lines -16 to +20
border-color: lighten($monzo, 10%);
border-color: var(--color-error-muted);
color: var(--color-error-default);

&:active {
background: lighten($monzo, 55%);
background: var(--color-error-muted-pressed);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

SettingsTab seems to no longer be used, but I am just updating the style sheet here so the deprecated colors can be fully removed. This was the last item holding it back.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like that className is used here so good to update

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before & After

Screen.Recording.2024-01-17.at.3.45.57.PM.mov

@garrettbear garrettbear marked this pull request as ready for review January 18, 2024 23:55
@garrettbear garrettbear requested a review from a team as a code owner January 18, 2024 23:55
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Subtle change in the lighter color

Before & After

Screen.Recording.2024-01-17.at.3.45.57.PM.mov

Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall Jan 23, 2024

Choose a reason for hiding this comment

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

non-blocking: I suppose there is no color prop for this component so it's not wired up to the controls.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ya the controls on that component and not right, but that's out of scope for this project.

Copy link
Copy Markdown
Contributor

@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! One suggestion for the Preloader component

  • Checked for no instances of deprecated colors ✅

Screenshot 2024-01-23 at 8 52 15 AM
Screenshot 2024-01-23 at 8 52 21 AM
Screenshot 2024-01-23 at 8 52 33 AM
Screenshot 2024-01-23 at 8 52 46 AM

garrettbear and others added 3 commits January 23, 2024 09:07
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: George Marshall <george.marshall@consensys.net>
Copy link
Copy Markdown
Contributor

@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 🚀

@garrettbear garrettbear merged commit 417063d into develop Jan 23, 2024
@garrettbear garrettbear deleted the feat/22363/update-hex-values-design-tokens-part-1 branch January 23, 2024 19:23
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
@metamaskbot metamaskbot added the release-11.10.0 Issue or pull request that will be included in release 11.10.0 label Jan 23, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [7120759]
Page Load Metrics (704 ± 16 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint851139663
domContentLoaded8141121
load6728027043216
domInteractive8141121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 61 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.10.0 Issue or pull request that will be included in release 11.10.0 team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EXT] Replace static hex values - Part 1

4 participants