Skip to content

chore: upgrading design tokens package and typescript conventions#8510

Merged
georgewrmarshall merged 2 commits intomainfrom
fix/design-tokens-v2
Feb 5, 2024
Merged

chore: upgrading design tokens package and typescript conventions#8510
georgewrmarshall merged 2 commits intomainfrom
fix/design-tokens-v2

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Feb 1, 2024

Description

This PR upgrades the design-tokens package to v2.0. The major version update was required due to the node version upgrade from 16 to 18, a requirement discovered during the attempted update of the design tokens package to 1.13 (see PR #8402).

In addition to the major version upgrade, this PR includes accessibility enhancements to various color categories from 1.13. It also updates several TypeScript conventions, notably the preference for types over interfaces, and import paths aligning with the module template standards from shared libraries.

For a comprehensive overview of the color updates, please refer to this PR in the design-tokens repository.

The accessibility improvements ensure that:

  • Text using the warning/default color now meets WCAG AA color contrast requirements.
  • Text using the success/default color now meets WCAG AA color contrast requirements.
  • Text using the primary/inverse, error/inverse, success/inverse, and info/inverse colors in dark mode now meets WCAG AA color contrast requirements.

These updates enhance the accessibility and user experience for vision impaired folks in mobile.

Related issues

Related: https://github.com/MetaMask/metamask-extension#workspaces/design-system-61e8a2ae77c3a60012e5003c/issues/zh/329

Manual testing steps

The easiest way to review these accessibility updates is to check storybook

  1. Go to the root index.js
  2. Uncomment storybook
  3. Run storybook

Screenshots/Recordings

Before

TBC

After

https://github.com/MetaMask/metamask-mobile/assets/14355083/66127055-6194-4632-bcc6-3968c38df5db
https://github.com/MetaMask/metamask-mobile/assets/14355083/e8544dd8-980b-486e-aeba-b7f6286657d1

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 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.

@georgewrmarshall georgewrmarshall self-assigned this Feb 1, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Mobile label Feb 1, 2024
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 2, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/design-tokens@2.0.0 None 0 178 kB brad.decker, danfinlay, gudahtt, ...9 more

🚮 Removed packages: npm/@metamask/design-tokens@1.12.0

View full report↗︎

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 2, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@georgewrmarshall georgewrmarshall changed the title chore: upgrading design tokens package and typescript conventions and… chore: upgrading design tokens package and typescript conventions Feb 2, 2024
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5c2082d) 40.67% compared to head (3015164) 40.67%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8510   +/-   ##
=======================================
  Coverage   40.67%   40.67%           
=======================================
  Files        1240     1240           
  Lines       30011    30011           
  Branches     2870     2870           
=======================================
  Hits        12206    12206           
  Misses      17107    17107           
  Partials      698      698           

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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@georgewrmarshall georgewrmarshall marked this pull request as ready for review February 2, 2024 00:49
@georgewrmarshall georgewrmarshall requested review from a team as code owners February 2, 2024 00:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2024

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f3258c6c-7abc-48c3-9d34-4113c7734e55
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@georgewrmarshall georgewrmarshall merged commit 6316995 into main Feb 5, 2024
@georgewrmarshall georgewrmarshall deleted the fix/design-tokens-v2 branch February 5, 2024 17:07
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
@metamaskbot metamaskbot added the release-7.17.0 Issue or pull request that will be included in release 7.17.0 label Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants