Skip to content

chore: removing deprecated secondary colors from codebase#24971

Merged
georgewrmarshall merged 2 commits intodevelopfrom
remove-secondary-colors
Jun 10, 2024
Merged

chore: removing deprecated secondary colors from codebase#24971
georgewrmarshall merged 2 commits intodevelopfrom
remove-secondary-colors

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Jun 1, 2024

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 Spinner component instances to use the default icon-muted color.

Dependency on

Open in GitHub Codespaces

Related issues

Fixes: #24964

Manual testing steps

  1. Go to the storybook build of this PR
  2. Go to all stories that use the Spinner component: Spinner, AppLoadingSpinner, EthOverview, QRCodeModal, LoadingScreen (some stories not included in PR as they didn't add much value)
  3. See color updates are working as expected
  4. Pull this branch search Spinner
  5. Ensure no instances have an override color
  6. Search for color-secondary to ensure no instances of secondary colors remain

Screenshots/Recordings

All before/after screenshots and screencasts of Spinner instnaces have been moved to comments for easier review.

Below screenshot shows all Spinner instances have removed color prop ensuring colors have been consolidated to use the default icon-muted color

Screenshot 2024-06-09 at 8 49 57 PM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Jun 1, 2024
@georgewrmarshall georgewrmarshall self-assigned this Jun 1, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 1, 2024

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.

Comment on lines -86 to -92
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]

Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 1, 2024

Choose a reason for hiding this comment

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

Updating color docs to remove references to the removed secondary CSS variables.

Before

color.docs.secondary720.mov

After

after.color.docs720.mov

@georgewrmarshall georgewrmarshall force-pushed the remove-secondary-colors branch from 99c8602 to 7d2a789 Compare June 3, 2024 17:10
/>
{canplay ? null : <Spinner color="var(--color-warning-default)" />}
{canplay ? null : <Spinner color="var(--color-icon-muted)" />}
</div>
Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 3, 2024

Choose a reason for hiding this comment

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

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

@georgewrmarshall georgewrmarshall marked this pull request as ready for review June 3, 2024 21:10
@georgewrmarshall georgewrmarshall requested review from a team as code owners June 3, 2024 21:10
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner June 3, 2024 21:14
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 65.64%. Comparing base (ed5ec2d) to head (5c7aa19).
Report is 7 commits behind head on develop.

Files Patch % Lines
...ents/app/modals/qr-scanner/qr-scanner.component.js 0.00% 1 Missing ⚠️
...ponents/app/qr-hardware-popover/enhanced-reader.js 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

This PR can be broken down to at least 2-3 PRs
1/ qr-code-modal update
2/ storybook cleanup
3/ removing secondary colors

@georgewrmarshall
Copy link
Copy Markdown
Contributor Author

This PR can be broken down to at least 2-3 PRs 1/ qr-code-modal update 2/ storybook cleanup 3/ removing secondary colors

Good suggestion I've broken this PR up see below

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [8c9c1ba]
Page Load Metrics (201 ± 207 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7511892115
domContentLoaded9311373
load441648201430207
domInteractive9311373

georgewrmarshall added a commit that referenced this pull request Jun 7, 2024
## **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.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](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.
@georgewrmarshall georgewrmarshall force-pushed the remove-secondary-colors branch from 8c9c1ba to 525a70c Compare June 7, 2024 20:00
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [d09edff]
Page Load Metrics (185 ± 196 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint67928274
domContentLoaded8191121
load391513185409196
domInteractive8191121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -181 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 7, 2024

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 7, 2024

Choose a reason for hiding this comment

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

Removing the secondary color override so it uses the default color, which is set to icon-muted.

After

after720.mov

Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 7, 2024

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

@georgewrmarshall georgewrmarshall Jun 7, 2024

Choose a reason for hiding this comment

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

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

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.

Updates snapshot

@georgewrmarshall georgewrmarshall force-pushed the remove-secondary-colors branch from d09edff to 5c7aa19 Compare June 10, 2024 03:30
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [5c7aa19]
Page Load Metrics (134 ± 171 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6710585105
domContentLoaded8161121
load411690134357171
domInteractive8161121
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: -181 Bytes (-0.00%)
  • common: 0 Bytes (0.00%)

@georgewrmarshall georgewrmarshall requested a review from a team June 10, 2024 15:25
@georgewrmarshall georgewrmarshall added the needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. label Jun 10, 2024
@georgewrmarshall georgewrmarshall removed the needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. label Jun 10, 2024
@georgewrmarshall georgewrmarshall merged commit b8c9c44 into develop Jun 10, 2024
@georgewrmarshall georgewrmarshall deleted the remove-secondary-colors branch June 10, 2024 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.1.0 Issue or pull request that will be included in release 12.1.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.

chore: remove all instances of secondary colors

7 participants