Conversation
📖 Storybook Preview |
|
|
||
| ### Changed | ||
|
|
||
| - **BREAKING:** Migrated `Text` typography types (`TextVariant`, `TextColor`, `FontWeight`, `FontStyle`, `FontFamily`) to `@metamask/design-system-shared`; all imports through `@metamask/design-system-react-native` continue to work without change ([#1047](https://github.com/MetaMask/metamask-design-system/pull/1047)) |
There was a problem hiding this comment.
Although the runtime imports are backwards-compatible, the underlying FontWeight string values changed (e.g. '600' → 'bold'), which is a breaking change for any consumer comparing against raw values. The sub-bullets clarify the scope: idiomatic enum usage is unaffected, but raw-string comparisons will break.
|
|
||
| - **BREAKING:** Migrated `Text` typography types (`TextVariant`, `TextColor`, `FontWeight`, `FontStyle`, `FontFamily`) to `@metamask/design-system-shared`; all imports through `@metamask/design-system-react-native` continue to work without change ([#1047](https://github.com/MetaMask/metamask-design-system/pull/1047)) | ||
| - `FontWeight` underlying string values changed from numeric strings (`'600'`, `'500'`, `'400'`) to semantic identifiers (`'bold'`, `'medium'`, `'regular'`); idiomatic usage (e.g. `FontWeight.Bold`) is unaffected | ||
| - See [Migration Guide](./MIGRATION.md#from-version-0160-to-0170) |
There was a problem hiding this comment.
Consumers who scan node_modules/@metamask/design-system-react-native for Tailwind class names (e.g. to pick up TextColor values) must also scan @metamask/design-system-shared after this release, since the string values now live in the shared package's compiled output. This is documented in the linked migration guide.
| After editing, validate format: | ||
|
|
||
| ```bash | ||
| yarn changelog:validate |
There was a problem hiding this comment.
yarn changelog:validate catches formatting issues (wrong section names, missing version links, malformed entries) before you invest time writing MIGRATION.md. Discovering a format error after completing Steps 4–5 means backtracking; catching it here keeps the workflow linear.
📖 Storybook Preview |
|
|
||
| ### Added | ||
|
|
||
| - Added `TextVariant`, `TextColor`, `FontWeight`, `FontStyle`, `FontFamily`, and `TextPropsShared` shared types for cross-platform use ([#1047](https://github.com/MetaMask/metamask-design-system/pull/1047)) |
There was a problem hiding this comment.
The shared package gains six new exports (TextVariant, TextColor, FontWeight, FontStyle, FontFamily, TextPropsShared) that did not exist before — purely additive. The breaking FontWeight value change belongs to design-system-react-native, not here, because it's that package's concrete implementation that changed behaviour.
Release 32.0.0
This release migrates
Texttypography types to@metamask/design-system-shared, continuing the ADR-0003/0004 const-object + string-union pattern adoption.📦 Package Versions
@metamask/design-system-shared: 0.10.0@metamask/design-system-react-native: 0.17.0🔄 Shared Type Updates (0.10.0)
Text typography types added (#1047)
What Changed:
TextVariant,TextColor, andTextPropsSharedshared types for cross-platform useImpact:
Texttype definitions across React and React Native📱 React Native Updates (0.17.0)
Changed
Texttypography types (TextVariant,TextColor,FontWeight,FontStyle,FontFamily) to@metamask/design-system-shared; all imports through@metamask/design-system-react-nativecontinue to work without change (#1047)FontWeightunderlying string values changed from numeric strings ('600','500','400') to semantic identifiers ('bold','medium','regular'); idiomatic usage (e.g.FontWeight.Bold) is unaffectedFontWeightstring values changed (React Native Only)What Changed:
FontWeightwas previously a TypeScriptenumwith numeric string values; it is now aconstobject with semantic string valuesFontWeight.Bold'600''bold'FontWeight.Medium'500''medium'FontWeight.Regular'400''regular'Migration:
Impact:
FontWeightnumeric string values directlyfontWeight={FontWeight.Bold}) is unaffectedSee migration guide for complete instructions:
✅ Checklist
yarn changelog:validate)Pre-merge author checklist
yarn build && yarn test && yarn lint)yarn changelog:validate)Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because this is a release bump that documents a breaking underlying
FontWeightruntime string-value change; consumers comparing raw string values may break even though import paths remain stable.Overview
Bumps the monorepo to
32.0.0and releases@metamask/design-system-react-native0.17.0and@metamask/design-system-shared0.10.0.Updates changelogs to reflect moving
Texttypography types (TextVariant,TextColor,FontWeight,FontStyle,FontFamily,TextPropsShared) into@metamask/design-system-shared, including a breaking note thatFontWeightraw string values change from numeric strings to semantic identifiers.Adds a release-workflow step to run
yarn changelog:validateafter editing changelogs.Reviewed by Cursor Bugbot for commit a05e001. Bugbot is set up for automated code reviews on this repo. Configure here.