Skip to content

Conversation

@georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Mar 25, 2025

Description

This PR updates the default font family across the MetaMask extension from Euclid Circular B to CentraNo1 to align with brand evolution updates. The changes include:

  1. Updating font family declarations in SCSS and component files from 'Euclid Circular B' to the design tokens --font-family-sans('CentraNo1')
  2. Simplifying text component styling by removing brand evolution feature flag
  3. Updating SVG text elements and third party components to use CentraNo1 font family

The changes are part of the broader brand evolution initiative to standardize typography across MetaMask products.

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4408

Manual testing steps

  1. Build and load the extension
  2. Ensure the font files load in the network tab
  3. Navigate through various screens and verify text rendering
  4. Verify that all text elements are using CentraNo1 font family
  5. Check that no visual regressions have been introduced
  6. Pay special attention to:
    • Headers and titles
    • Body text
    • Form inputs

Screenshots/Recordings

Before

Navigating around the extension with current Euclid Circular B font family in expanded and popup view

before.expanded720.mov
before.popup.mov

Text component in storybook with curent Euclid Circular B font family

before.storybook.text720.mov

After

Navigating around the extension with updated CentraNo1 font family in expanded and popup view

after.expanded720.mov
after.popup720.mov

Text component in storybook with updated CentraNo1 font family

after.storybook720.mov

No instances of Euclid left in codebase apart from mock e2e test urls for snap-account-abstraction-keyring

Screenshot 2025-03-27 at 2 45 51 PM

Pre-merge author checklist

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 Mar 25, 2025
@github-actions
Copy link
Contributor

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 added the team-design-system All issues relating to design system in Extension label Mar 25, 2025
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 25, 2025
georgewrmarshall added a commit to MetaMask/metamask-design-system that referenced this pull request Mar 27, 2025
## **Description**

This PR bumps the version to 6.0.1 to release the font family name fix
from #522.

1. Reason for change: Release version 6.0.1 with the CentraNo1 font name
fix
2. Improvement: 
   - Updates CHANGELOG.md to document the 6.0.1 release
   - Bumps package versions from 6.0.0 to 6.0.1
- Includes fix from #522 that standardizes CentraNo1 font name without
space

## **Related issues**

Releases: #522 - Font family name standardization fix

## **Manual testing steps**

1. Use the publish preview release in
MetaMask/metamask-extension#31303
2. See font family issue is resolved

## **Screenshots/Recordings**

### **Before**
Using `@metamask/design-tokens@v6.0.0` in the extension makes all fonts
that use the CSS varibale --font-family-sans fallback to Helvetica Neue

<img width="1511" alt="Screenshot 2025-03-27 at 11 38 05 AM"
src="https://github.com/user-attachments/assets/cd31f378-7085-4962-87fc-9db953cfdf62"
/>


### **After**
CentraNo1 displays correctly using the publish preview version

<img width="1508" alt="Screenshot 2025-03-27 at 11 41 05 AM"
src="https://github.com/user-attachments/assets/5c8f7f1e-dd25-4cd0-ac28-b02bbd983558"
/>

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [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

## **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.
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🎨 @MetaMask/design-system-engineers

  • ui/components/component-library/text/__snapshots__/text.test.tsx.snap
  • ui/components/component-library/text/text.scss
  • ui/components/component-library/text/text.stories.tsx
  • ui/components/component-library/text/text.test.tsx
  • ui/components/component-library/text/text.tsx
  • ui/components/component-library/text/text.types.ts

🖥️ @MetaMask/wallet-ux

  • ui/css/design-system/_typography.scss
  • ui/css/utilities/fonts.scss
  • ui/pages/onboarding-flow/pin-extension/pin-billboard.js

package.json Outdated
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Updating design tokens to version that sets the --font-family-sans CSS variable to CentraNo1

--font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial, sans-serif;

@metamaskbot
Copy link
Collaborator

Builds ready [0835111]
UI Startup Metrics (1239 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1239109814166412861357
load10929631257631157983
domContentLoaded10869591249631166992
domInteractive17137271629
firstPaint797781208427169279
backgroundConnect96222910
firstReactRender20154462034
getState10427668
initialActions001000
loadScripts83071598360870939
setupStore7417278
WebpackHomeuiStartup908793109758926942
load78157794362815884
domContentLoaded77657194062807875
domInteractive14123461332
firstPaint46252904333805880
backgroundConnect14103341424
firstReactRender13122421315
getState6413268
initialActions001000
loadScripts77356193861805865
setupStore7413189
FirefoxBrowserifyHomeuiStartup13701148202116514091831
load12251023183915512551674
domContentLoaded12251023183815512551673
domInteractive10741217348796
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2617141162640
firstReactRender23195142432
getState7434379
initialActions001001
loadScripts12001006181415212361641
setupStore6440467
WebpackHomeuiStartup9778361556157891978
load8597281347141845958
domContentLoaded8587281346141844958
domInteractive114332613422397
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect201384102333
firstReactRender19163021923
getState7419278
initialActions001001
loadScripts8427131317138830967
setupStore94661078
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0%)
  • ui: -367 Bytes (-0.01%)
  • common: -58 Bytes (0%)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might be able to use the --font-family-sans here

Comment on lines -10 to -15
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

No longer needed as all Text component variants will use the brand evolution font CentraNo1

Comment on lines -36 to -45
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the mapping of different font families to variants as we are using CentraNo1 for all variants

Copy link
Contributor Author

Choose a reason for hiding this comment

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

--font-family-sans has been updated in @metamask/design-tokens@6.0.1 to:

--font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial, sans-serif;

Comment on lines -64 to -67
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed

Comment on lines -290 to -314
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

We can remove this story documenting the isBrandEvolution feature flag prop, as it is removed in this PR.

Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Removing the temporary feature flag prop that enabled the earlier brand evolution typography. Everything now uses CentraNo1, so this is no longer required.

Comment on lines -101 to -182
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Removing snapshot test and isBrandEvolution feature flag prop test as we are removing the isBrandEvolution prop in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing brand evolution classname

Comment on lines -137 to -141
Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Removing the temporary brand evolution feature flag prop from types

Comment on lines +22 to +24
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating Material UI text field component to use Centra instead of Euclid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating default font family variable to use CentraNo1 instead of Euclid

Comment on lines -24 to -50
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing @font-face definitions for Euclid from SCSS

Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Before

Screenshot 2025-03-27 at 3 15 57 PM

After

Screenshot 2025-03-27 at 2 38 08 PM

Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Using the CSS variable for font family from the design tokens package

--font-family-sans: 'CentraNo1', 'Helvetica Neue', Helvetica, Arial, sans-serif;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the snapshot test in text.test.tsx as I think it's not needed

@metamaskbot
Copy link
Collaborator

Builds ready [8261916]
UI Startup Metrics (1177 ± 67 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1177105615386712171268
load1024929139562953991
domContentLoaded1018924139062965998
domInteractive16113951627
firstPaint723791396405274993
backgroundConnect10657689
firstReactRender19144441930
getState11432779
initialActions001001
loadScripts806723105954829897
setupStore8516278
WebpackHomeuiStartup977743124476976990
load83060198467858934
domContentLoaded82358397268852930
domInteractive16124261432
firstPaint52564977346845874
backgroundConnect17115391541
firstReactRender15122941427
getState7418278
initialActions001000
loadScripts82157297168850928
setupStore8517289
FirefoxBrowserifyHomeuiStartup13531166198513513961682
load12171054177512612671528
domContentLoaded12171053177512612661528
domInteractive9935228288797
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2516146152542
firstReactRender21183022227
getState7440578
initialActions001001
loadScripts11931037175412412421503
setupStore7480958
WebpackHomeuiStartup10088521653172906975
load8827351447153809915
domContentLoaded8827351446153809915
domInteractive114351982815197
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21147092233
firstReactRender19163031925
getState104781389
initialActions001001
loadScripts8647191416149797984
setupStore9459978
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -9.73 KiB (-0.16%)
  • ui: -2.83 KiB (-0.04%)
  • common: 107.45 KiB (1.16%)

Copy link
Contributor Author

@georgewrmarshall georgewrmarshall Mar 27, 2025

Choose a reason for hiding this comment

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

Updating sass variable to use the design tokens CSS variable

@socket-security
Copy link

socket-security bot commented Mar 27, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/design-tokens@5.1.06.0.1 None 0 292 kB metamaskbot

View full report↗︎

@georgewrmarshall georgewrmarshall marked this pull request as ready for review March 27, 2025 22:48
@georgewrmarshall georgewrmarshall requested review from a team as code owners March 27, 2025 22:48
@metamaskbot
Copy link
Collaborator

Builds ready [542b9c1]
UI Startup Metrics (1202 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1202108714276912451346
load1047947126265956978
domContentLoaded1041942125665946973
domInteractive16133951631
firstPaint7781731261388265979
backgroundConnect106516910
firstReactRender19154461936
getState12446968
initialActions001001
loadScripts828712104065861923
setupStore8424379
WebpackHomeuiStartup925828115369943965
load78457990563825872
domContentLoaded77856990163816859
domInteractive15124461332
firstPaint48453864340816843
backgroundConnect16105481437
firstReactRender14122841325
getState7427378
initialActions001001
loadScripts77655989863814849
setupStore7521278
FirefoxBrowserifyHomeuiStartup13931208199214514211769
load12521085183614012781610
domContentLoaded12521085183614012781610
domInteractive10238224319096
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23165462434
firstReactRender22193222327
getState7436479
initialActions002001
loadScripts12301069181513912581583
setupStore7434467
WebpackHomeuiStartup9768421457136901991
load8587401276123857974
domContentLoaded8577401276123857973
domInteractive116322092714189
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19137392035
firstReactRender18162621823
getState8467879
initialActions001001
loadScripts8407261243119852961
setupStore8469878
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0%)
  • ui: -367 Bytes (-0.01%)
  • common: -58 Bytes (0%)

@georgewrmarshall georgewrmarshall added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 15c324f Mar 28, 2025
160 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/centra-font-family branch March 28, 2025 20:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2025
@metamaskbot metamaskbot added the release-12.17.0 Issue or pull request that will be included in release 12.17.0 label Mar 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-12.17.0 Issue or pull request that will be included in release 12.17.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.

5 participants