chore: removing deprecated secondary colors from codebase#24971
chore: removing deprecated secondary colors from codebase#24971georgewrmarshall merged 2 commits intodevelopfrom
Conversation
|
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. |
| var(--color-secondary-default) [DEPRECATED] | ||
| var(--color-secondary-alternative) [DEPRECATED] | ||
| var(--color-secondary-muted) [DEPRECATED] | ||
| var(--color-secondary-inverse) [DEPRECATED] | ||
| var(--color-secondary-disabled) [DEPRECATED] | ||
|
|
There was a problem hiding this comment.
Updating color docs to remove references to the removed secondary CSS variables.
Before
color.docs.secondary720.mov
After
after.color.docs720.mov
99c8602 to
7d2a789
Compare
| /> | ||
| {canplay ? null : <Spinner color="var(--color-warning-default)" />} | ||
| {canplay ? null : <Spinner color="var(--color-icon-muted)" />} | ||
| </div> |
There was a problem hiding this comment.
Story created to capture this recording but not included in the PR as it doesn't add much value, only showing the spinner component. The recording shows that the spinner uses the default icon-muted color.
After
after720.mov
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #24971 +/- ##
========================================
Coverage 65.64% 65.64%
========================================
Files 1362 1362
Lines 54189 54187 -2
Branches 14112 14110 -2
========================================
- Hits 35572 35571 -1
+ Misses 18617 18616 -1 ☔ View full report in Codecov by Sentry. |
brianacnguyen
left a comment
There was a problem hiding this comment.
This PR can be broken down to at least 2-3 PRs
1/ qr-code-modal update
2/ storybook cleanup
3/ removing secondary colors
405f2fb to
2ce8685
Compare
Good suggestion I've broken this PR up see below
|
Builds ready [8c9c1ba]
Page Load Metrics (201 ± 207 ms)
|
## **Description** Breaking out parts of #24971 for easier review. This PR replaces deprecated colors in favor of the most updated design system colors. I also noticed that this particular component could benefit from some layout and overflow updates. [](https://codespaces.new/MetaMask/metamask-extension/pull/25011?quickstart=1) ## **Related issues** Part of: #24964 ## **Manual testing steps** 1. Go to the storybook build of this page 2. Search for `Spinner` and `QRCodeModal` 3. Check colors have been updated properly in light and dark mode ## **Screenshots/Recordings** ### **Before** https://github.com/MetaMask/metamask-extension/assets/8112138/d745a119-f42d-429e-9200-d69b5a1776d1 ### **After** https://github.com/MetaMask/metamask-extension/assets/8112138/282e4460-798a-4841-bad5-242373f7f89b ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
8c9c1ba to
525a70c
Compare
Builds ready [d09edff]
Page Load Metrics (185 ± 196 ms)
Bundle size diffs
|
There was a problem hiding this comment.
After
Removing the secondary color override so it uses the default color, which is set to icon-muted. The story was created for this recording and is not included in the PR due to an infinite loop when trying to access the browser's camera in this component. Also, I don't think dark mode works if the page is refreshed, but it uses the default spinner color that has been tested in dark mode in other recordings.
after720.mov
There was a problem hiding this comment.
Removing the secondary color override so it uses the default color, which is set to icon-muted.
After
after720.mov
There was a problem hiding this comment.
You should be able to view this story in the storybook build of this PR. The recording shows the spinner using the default icon-muted color.
After
after720.mov
There was a problem hiding this comment.
You should be able to view this story in the storybook build of this PR. The recording shows the spinner using the default icon-muted color.
After
after720.mov
There was a problem hiding this comment.
Updates snapshot
d09edff to
5c7aa19
Compare
Builds ready [5c7aa19]
Page Load Metrics (134 ± 171 ms)
Bundle size diffs
|
Description
This pull request removes the deprecated secondary colors in preparation for upgrading to design token v4 and priming the brand evolution. The updates all
Spinnercomponent instances to use the defaulticon-mutedcolor.Dependency on
Related issues
Fixes: #24964
Manual testing steps
Spinner,AppLoadingSpinner,EthOverview,QRCodeModal,LoadingScreen(some stories not included in PR as they didn't add much value)Spinnercolor-secondaryto ensure no instances of secondary colors remainScreenshots/Recordings
All before/after screenshots and screencasts of Spinner instnaces have been moved to comments for easier review.
Below screenshot shows all
Spinnerinstances have removedcolorprop ensuring colors have been consolidated to use the default icon-muted colorPre-merge author checklist
Pre-merge reviewer checklist