chore: upgrading design tokens package and typescript conventions#8510
chore: upgrading design tokens package and typescript conventions#8510georgewrmarshall merged 2 commits intomainfrom
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. |
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/design-tokens@1.12.0 |
|
👍 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
|
|
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f3258c6c-7abc-48c3-9d34-4113c7734e55 |

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 to1.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:
warning/defaultcolor now meets WCAG AA color contrast requirements.success/defaultcolor now meets WCAG AA color contrast requirements.primary/inverse,error/inverse,success/inverse, andinfo/inversecolors 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
index.jsScreenshots/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
Pre-merge reviewer checklist