Release 37.0.0#1140
Conversation
📖 Storybook Preview |
📖 Storybook Preview |
|
|
||
| ### Changed | ||
|
|
||
| - **BREAKING:** Updated `Button`, `ButtonBase`, and `ButtonHero` size and variant exports to use shared const-object + string-union types rather than platform-local enum-based definitions, aligning React with the shared cross-platform type contracts ([#1034](https://github.com/MetaMask/metamask-design-system/pull/1034)) |
There was a problem hiding this comment.
This wording intentionally matches the earlier AvatarBase and AvatarIcon enum-to-union releases. Imports and runtime members stay stable for normal usage, so the consumer-facing guidance is to flag the type contract change without adding unnecessary migration steps.
| - Any reference to the removed entries will produce a TypeScript error after upgrading. | ||
|
|
||
| --- | ||
| ### From version 0.21.0 to 0.22.0 |
There was a problem hiding this comment.
This section is anchored to 0.21.0 to 0.22.0 because that is the version actually being published from this release branch. Keeping the TextField guidance under the older 0.19.0 to 0.20.0 heading would send upgraders to the wrong release when they look for breaking-change docs.
|
|
||
| ### Added | ||
|
|
||
| - Added shared `ButtonBaseSize`, `ButtonSize`, `ButtonHeroSize`, `ButtonVariant`, `ButtonBasePropsShared`, and `ButtonPropsShared` exports so React and React Native button APIs can share one cross-platform type contract ([#1034](https://github.com/MetaMask/metamask-design-system/pull/1034)) |
There was a problem hiding this comment.
Shared package is classified as Added because these exports are new surface area here even though the platform packages describe the same work as breaking. That split helps reviewers see that the shared package gained new public contracts while React and React Native changed where existing contracts come from.
|
|
||
| ## Version Updates | ||
|
|
||
| ### From version 0.19.0 to 0.20.0 |
There was a problem hiding this comment.
The old section opener was moved below the TextField migration. The same guidance is preserved below under 0.21.0 to 0.22.0 so consumers find it under the version they are actually upgrading to.
Release 37.0.0
This release focuses on consumer-facing changelog cleanup for the packages being published, plus migration-guide coverage for the React Native
TextFieldAPI changes included in this release.📦 Package Versions
@metamask/design-system-shared: 0.15.0@metamask/design-system-react: 0.20.0@metamask/design-system-react-native: 0.22.0🔄 Shared Type Updates (0.15.0)
Shared type additions (#1034, #1038, #1081)
What Changed:
ButtonBaseSize,ButtonSize,ButtonHeroSize,ButtonVariant,ButtonBasePropsShared, andButtonPropsSharedButtonIconSize,ButtonIconVariant, andButtonIconPropsSharedTextFieldPropsSharedfor the controlled text-field contract used across platformsImpact:
🌐 React Web Updates (0.20.0)
Changed
Button,ButtonBase, andButtonHerosize and variant exports to use shared const-object + string-union types rather than platform-local enum-based definitions (#1034)@metamask/design-system-reactas beforeButtonIconSizeandButtonIconVariantto use shared const-object + string-union types rather than platform-local enum-based definitions (#1038)@metamask/design-system-reactas beforeMMDS Componentsfile and alignedButtonIconandTextButtonmappings with the current component APIs shown in Dev Mode (#1109)TextButtonmigration guide for extension consumers replacingButtonLinkandButtonVariant.Linkwith the current design-system APIs (#1098)📱 React Native Updates (0.22.0)
Changed
Button,ButtonBase, andButtonHerosize and variant exports to use shared const-object + string-union types rather than platform-local enum-based definitions (#1034)@metamask/design-system-react-nativeas beforeButtonIconSizeandButtonIconVariantto use shared const-object + string-union types rather than platform-local enum-based definitions (#1038)@metamask/design-system-react-nativeas beforeTextFieldandTextFieldSearchnow use a rootBox/View, require nativeTextInputprops underinputProps, renameisReadonlytoisReadOnly, and useinputReffor the inner input ref (#1081)MMDS Componentsfile and alignedButtonIconandTextButtonmappings with the current component APIs shown in Dev Mode (#1109)Shared button size and variant exports (Both Platforms)
What Changed:
ButtonVariant,ButtonBaseSize,ButtonSize,ButtonHeroSize,ButtonIconSize, andButtonIconVariantnow come from shared ADR-0003/ADR-0004 definitions instead of platform-local enumsImpact:
React Native TextField prop layering (React Native)
What Changed:
TextFieldandTextFieldSearchnow treat the root as aBox/ViewTextInputprops must move underinputPropsisReadonlyis renamed toisReadOnlyrefnow targets the outer container andinputReftargets the innerTextInputMigration:
Impact:
TextInputprops or pressable-only props at the top level ofTextField/TextFieldSearchSee migration guides for complete instructions:
✅ Checklist
yarn changelog:validate)0.14.0→0.15.0) - shared type additions0.19.0→0.20.0) - includes breaking changes under pre-1.0 semver0.21.0→0.22.0) - includes breaking changes under pre-1.0 semverTextFieldchangesPre-merge author checklist
yarn build && yarn test && yarn lint)yarn changelog:validate)Pre-merge reviewer checklist
Note
Low Risk
Release-only change: bumps package versions and updates changelog/migration documentation without modifying runtime code. Low risk aside from potential downstream confusion if documented breaking changes don’t match what was actually published.
Overview
Bumps the monorepo release to
37.0.0and increments package versions for@metamask/design-system-shared(0.15.0),@metamask/design-system-react(0.20.0), and@metamask/design-system-react-native(0.22.0).Updates consumer-facing release notes: adds new changelog entries (including documented breaking type-export contract changes and RN
TextFieldAPI migration details), refreshes the RN migration guide section for0.21.0→0.22.0, and updates changelog compare links accordingly.Reviewed by Cursor Bugbot for commit 2140b12. Bugbot is set up for automated code reviews on this repo. Configure here.