Skip to content

chore: removing deprecated info colors from codebase#25124

Merged
georgewrmarshall merged 1 commit intodevelopfrom
remove-deprecated-info-colors
Jun 7, 2024
Merged

chore: removing deprecated info colors from codebase#25124
georgewrmarshall merged 1 commit intodevelopfrom
remove-deprecated-info-colors

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Jun 6, 2024

Description

This pull request removes the deprecated info colors in preparation for upgrading to design token v4.

Open in GitHub Codespaces

Related issues

Fixes: #24968

Manual testing steps

  1. Pull this branch
  2. Search for info-alternative and infoAlternative
  3. Ensure no instances in the codebase remain

Screenshots/Recordings

Before

Screenshot 2024-06-06 at 2 37 25 PM

Screenshot 2024-06-06 at 2 37 34 PM

After

Screenshot 2024-06-06 at 2 34 41 PM
Screenshot 2024-06-06 at 2 34 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 self-assigned this Jun 6, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Jun 6, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 6, 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.

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.

Removing from docs as no instances remain

Screenshot 2024-06-06 at 2 34 57 PM

@georgewrmarshall georgewrmarshall force-pushed the remove-deprecated-info-colors branch from beae90c to 52a2df4 Compare June 6, 2024 21:39
successInverse = 'success-inverse',
successDisabled = 'success-disabled',
infoDefault = 'info-default',
infoAlternative = 'info-alternative',
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.

No instances of infoAlternative remain in the codebase

Screenshot 2024-06-06 at 2 34 41 PM

@georgewrmarshall georgewrmarshall marked this pull request as ready for review June 6, 2024 21:39
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner June 6, 2024 21:39
@darkwing darkwing 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 6, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.66%. Comparing base (a7fbbd3) to head (52a2df4).
Report is 164 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25124      +/-   ##
===========================================
- Coverage    65.66%   65.66%   -0.00%     
===========================================
  Files         1359     1359              
  Lines        54014    54011       -3     
  Branches     14015    14015              
===========================================
- Hits         35464    35461       -3     
  Misses       18550    18550              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [52a2df4]
Page Load Metrics (48 ± 3 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6710779105
domContentLoaded9181021
load42664873
domInteractive8181021
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: -111 Bytes (-0.00%)

@georgewrmarshall georgewrmarshall merged commit f4fc182 into develop Jun 7, 2024
@georgewrmarshall georgewrmarshall deleted the remove-deprecated-info-colors branch June 7, 2024 17:40
georgewrmarshall added a commit that referenced this pull request Jun 11, 2024
## **Description**

This pull request aims to upgrade the extension to [design tokens
v4](https://github.com/MetaMask/design-tokens/blob/main/MIGRATION.md#from-version-300-to-400).
This upgrade ensures the most up-to-date colors are being used that
align with design and primes the extension for the upcoming brand
evolution. Included in this PR are third-party network color CSS
variables that have been removed from the design tokens package and
renamed CSS variables for shadow. This PR is the final update from a
series of PRs that replace deprecated CSS colors that have been removed
in v4.

**Dependency PRs that should be merged before this one:**
- #24970
- #24970
- #25125
- #25124
- #25122
- #25011
- #25010
- #25083
- #24971
- #25158

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24953?quickstart=1)


![image](https://github.com/MetaMask/metamask-extension/assets/8112138/3c5cb96b-e473-4f3a-9b9c-5aa8020c2610)

![image
(1)](https://github.com/MetaMask/metamask-extension/assets/8112138/c16d28f7-f05c-4132-8268-b3c48fe9bd4a)


## **Related issues**

Fixes: #24916

## **Manual testing steps**

Check all [removed and
changed](https://github.com/MetaMask/design-tokens/blob/main/MIGRATION.md#from-version-300-to-400)
CSS variables are no longer in the codebase:

1. Pull this branch.
2. Copy [this
script](https://gist.github.com/georgewrmarshall/1ca0d7044bfa3c91343cadbf2bd5c828)
that checks for all deprecated colors to the root of the extension.
3. Run `node searchDeprecatedTokens.js`.
4. Ensure there are no results.

Check shadows and network colors work as expected:

1. Navigate to stories that use primary and error shadows
(`ButtonPrimary`, `ButtonSecondary`, `Button` (deprecated)) as well as
network colors (`Box` BackgroundColors story).
2. Verify that shadows and network colors work as expected.
Run the extension and navigate around to ensure colors work as expected:

1. Pull this branch.
2. Run `yarn start`.
3. Navigate around the extension in light and dark mode to ensure colors
work as expected.

## **Screenshots/Recordings**

### **Before**

Checking the codebase for any existing deprecated colors returns many
results in the `develop` branch.


https://github.com/MetaMask/metamask-extension/assets/8112138/8ad23392-a0cc-4be5-8a50-12a126f5b71c


### **After**

Checking the codebase for any deprecated removed colors that could break
the UI using the provided script, after removing network colors, returns
no results.


https://github.com/MetaMask/metamask-extension/assets/8112138/3b82862d-5302-466f-bc55-bbb05a924ac0

Checking components that use updated CSS variables and newly added still
work as expected


https://github.com/MetaMask/metamask-extension/assets/8112138/b70279b9-07f3-4315-abcd-83090ca03eef

Checking extension colors are working as expected in light and dark
mode. In dark mode primary and error are a shade lighter in v4


https://github.com/MetaMask/metamask-extension/assets/8112138/d748f8cb-f2f2-4bd5-b9f4-f3bb376f22cd


## **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.
@chloeYue chloeYue added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. 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 deprecated info colors

5 participants