-
-
Notifications
You must be signed in to change notification settings - Fork 7
chore: update font weight from bold to semi-bold for Geist font alignment #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📖 Storybook Preview |
📖 Storybook Preview |
| 'Geist Bold': require('../fonts/Geist/Geist Bold.otf'), | ||
| 'Geist Bold Italic': require('../fonts/Geist/Geist Bold Italic.otf'), | ||
| 'Geist SemiBold': require('../fonts/Geist/Geist SemiBold.otf'), | ||
| 'Geist SemiBold Italic': require('../fonts/Geist/Geist SemiBold Italic.otf'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating FontLoader in for storybook-react native to point to semi bold
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| font-weight: 700; | ||
| src: url('fonts/Geist/Geist Bold.woff2') format('woff2'); | ||
| font-weight: 600; | ||
| src: url('fonts/Geist/Geist SemiBold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'Geist'; | ||
| font-style: italic; | ||
| font-weight: 700; | ||
| src: url('fonts/Geist/Geist Bold Italic.woff2') format('woff2'); | ||
| font-weight: 600; | ||
| src: url('fonts/Geist/Geist SemiBold Italic.woff2') format('woff2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating @font-face to point to SemiBold and adjusting weight from 700 => 600
📖 Storybook Preview |
| font-weight: 700; | ||
| font-weight: 600; | ||
| src: url('fonts/MMSans/MM Sans Bold.woff2') format('woff2'); | ||
| } | ||
|
|
||
| /* MM Poly */ | ||
| @font-face { | ||
| font-family: 'MMPoly'; | ||
| font-style: normal; | ||
| font-weight: 400; | ||
| src: url('fonts/MMPoly/MM Poly Regular.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'MMPoly'; | ||
| font-style: normal; | ||
| font-weight: 500; | ||
| src: url('fonts/MMPoly/MM Poly Regular.woff2') format('woff2'); | ||
| } | ||
|
|
||
| @font-face { | ||
| font-family: 'MMPoly'; | ||
| font-style: normal; | ||
| font-weight: 700; | ||
| font-weight: 600; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we use only one font weight we have to also update MMPoly and MMSans. This doesn't effect the weight because we are still pointing to the same font files. See Before/After in description
| - `FontWeight.Regular` (Weight `400`) | ||
| - `FontWeight.Medium` (Weight `500`) | ||
| - `FontWeight.Bold` (Weight `700`) | ||
| - `FontWeight.Bold` (Weight `600`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the font weight from bold (700) to semi-bold (600) across the design system to align with the Geist font family specifications. The change maintains the three-tier font weight system (regular, medium, bold) while adjusting the numeric value of "bold" from 700 to 600.
Key Changes:
- Updated all font weight token definitions from 700 to 600 for "bold"
- Replaced Geist Bold font files with Geist SemiBold variants
- Updated test expectations to reflect the new 600 font weight value
Reviewed Changes
Copilot reviewed 17 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/design-tokens/src/js/typography/fontWeights.ts |
Updated bold font weight token from 700 to 600 |
packages/design-tokens/src/figma/tokens.json |
Updated Figma design token for bold weight to 600 |
packages/design-tokens/src/css/typography.css |
Updated CSS custom property for bold font weight |
packages/design-tokens/src/js/typography/typography.test.ts |
Updated 13 test assertions to expect 600 instead of 700 |
packages/design-system-react/src/types/index.ts |
Updated FontWeight enum documentation |
packages/design-system-react-native/src/types/index.ts |
Updated FontWeight enum value and documentation |
apps/storybook-react/tailwind.css |
Updated @font-face declarations for Geist, MMSans, and MMPoly fonts |
apps/storybook-react-native/.storybook/FontLoader.js |
Updated font file imports from Geist Bold to Geist SemiBold |
| Documentation and story files | Updated weight references in MDX, README, and Storybook stories |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
📖 Storybook Preview |
## Summary This PR reverts the changes made in PR #847 which updated the bold font weight from 700 to 600 throughout the design system. ## Changes - Reverts the merge commit 721f31b - Restores bold font weight to 700 across all design tokens, components, and documentation - Restores original Geist Bold font files ## Related Issues Reverts: #847 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Restores bold weight to 700 and switches Geist SemiBold to Bold across design tokens, Text types/docs/stories, and Storybook font assets. > > - **Typography/Design Tokens**: > - Set `--font-weight-bold` and JS/figma tokens `bold` back to `700`; updated related tests and docs/stories. > - **Components**: > - React & React Native `Text` types/enums/docs/stories updated to reflect `FontWeight.Bold = 700` and labels adjusted. > - **Storybook Assets**: > - React Native: replace Geist `SemiBold` fonts with `Bold` in `apps/storybook-react-native/.storybook/FontLoader.js`. > - Web Storybook: switch `@font-face` mappings from `600`/`SemiBold` to `700`/`Bold` in `apps/storybook-react/tailwind.css`; ensure MM Sans/Poly bold weights use `700`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6ba119b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR releases version 17.0.0 of the MetaMask Design System, featuring important fixes for mobile font compatibility, the addition of the ButtonHero component to React, export fixes for React Native, and various dependency updates including ESLint configuration upgrades. ## **Included PRs** #836, #837, #838, #840, #843, #845, #846, #847, #848, #850, #851, #852, #853, #854, #855, #856, #857, #858, #859, #861, #862, #863, #864 ## **Manual testing steps** 1. Check package.json version bumps align with included changes 2. Check changelog accurately reflects the release ## **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 (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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Release 17.0.0 introducing React `ButtonHero`, RN font naming changes and TWRNC preset font family rename (both breaking), plus RN export fix and dependency updates. > > - **Release 17.0.0** > - Bump root `package.json` to `17.0.0`. > - **React (`@metamask/[email protected]`)** > - Add `ButtonHero` component for prominent CTAs. > - Update `@metamask/utils` peer to `^11.8.1`. > - **React Native (`@metamask/[email protected]`)** > - BREAKING: Rename font files to hyphenated PostScript format for iOS Metro compatibility. > - Export missing `TextButtonSize` enum. > - Peer: require `@metamask/design-system-twrnc-preset@^0.3.0`; update `@metamask/utils` peer. > - **TWRNC preset (`@metamask/[email protected]`)** > - BREAKING: Rename font family names to hyphenated PostScript format for iOS/expo-font. > - **Changelogs** > - Update `CHANGELOG.md` links and entries for all packages. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 9a90311. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->



Description
Updates the font weight from bold (700) to semi-bold (600) across the design system to align with Geist font family specifications. This change preserves the existing three-tier font weight constraint (regular, medium, bold) while achieving the desired semi-bold visual appearance with zero breaking changes. The update ensures design-to-code alignment between our semantic naming and the actual font weight values used throughout React and React Native implementations.
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-142
Manual testing steps
yarn test typographyyarn buildScreenshots/Recordings
Visual changes show updated font weight from bold (700) to semi-bold (600) across all typography components. Screenshots recommended to demonstrate the refined visual weight in headings and bold body text.
Before
Font weight: 700 (bold)
before720.mov
MM Poly and MM Sans were also
700before.otherfonts.720.mov
After
Font weight: 600 (semi-bold)
after720.mov
MM Poly and MM Sans updated to use
600so it aligns with the FontWeight.Bold changesafter.otherfonts.720.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Switches Bold from 700 to 600 across tokens, components, docs/stories, and font assets (Geist SemiBold) for React and React Native.
--font-weight-boldand JS/figmaboldtokens to600incss,js, andtokens.json.600for bold variants.Texttypes/docs/stories: updateFontWeight.Boldfrom700to600in comments, props tables, and story labels.FontWeight.Boldvalue changed from700to600.@font-face: replace Geist Bold (700) with Geist SemiBold (600); align MM Sans/MM Poly bold weights to600.Geist SemiBoldandGeist SemiBold Italicinstead of Bold variants.Written by Cursor Bugbot for commit 2dc1e8f. This will update automatically on new commits. Configure here.