refactor: Simplified TextButton and removed start and end accessory#1001
Merged
Conversation
Contributor
📖 Storybook Preview |
georgewrmarshall
requested changes
Mar 26, 2026
georgewrmarshall
left a comment
Contributor
There was a problem hiding this comment.
Great simplification! Left some suggestions
Contributor
📖 Storybook Preview |
Contributor
📖 Storybook Preview |
georgewrmarshall
previously approved these changes
Mar 27, 2026
Contributor
There was a problem hiding this comment.
LGTM! Massive improvement. 🚀 One aspect that might improve accessibility that we can talk with @amandaye0h about is visual differentiator for color blind folks like a different weight or underline.
- checked storybook story in ios simulator ✅
Contributor
📖 Storybook Preview |
Contributor
📖 Storybook Preview |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Contributor
📖 Storybook Preview |
georgewrmarshall
added a commit
that referenced
this pull request
Mar 27, 2026
## Release 26.0.0 This release adds new BannerAlert components, introduces `KeyValueRow` for React Native, includes breaking simplifications to React Native `TextButton` and `TextField`, and continues ADR-0003/0004 shared type migrations. ### 📦 Package Versions - `@metamask/design-system-shared`: **0.5.0** - `@metamask/design-system-react`: **0.12.0** - `@metamask/design-system-react-native`: **0.12.0** ### 🔄 Shared Type Updates (0.5.0) #### Component Type Additions (#975, #997) **What Changed:** - Added `BannerAlertSeverity` const object + `BannerAlertPropsShared` - Added `AvatarNetworkPropsShared` type (ADR-0004) **Impact:** - Enables consistent cross-platform `BannerAlert` severity/types - Continues ADR-0003/ADR-0004 const-object + string-union + shared types adoption ### 🌐 React Web Updates (0.12.0) #### Added - Added `BannerAlert` component (#975) #### Changed - Updated `TextButton` hover/pressed styles to be text-only (no background fill) (#1001) - Updated `Candlestick` icon asset with smaller size variant (#998) ### 📱 React Native Updates (0.12.0) #### Added - Added `BannerAlert` component (#966) - Added `KeyValueRow` component (#959) #### Changed - **BREAKING:** Simplified `TextButton` to a text-only control and removed `size`/`TextButtonSize`, inverse/disabled props, and icon/accessory props (#1001) - Migration: `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120` - **BREAKING:** Removed `TextFieldSize` and the `size` prop; `TextField` is now a single fixed-height (48px) row (#1000) - Migration: `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120` - Updated `Candlestick` icon asset with smaller size variant (#998) #### Fixed - Improved `Input` single-line typography alignment (including iOS placeholder behavior) (#1000) ###⚠️ Breaking Changes #### TextButton API (React Native) **What Changed:** - Removed `size`/`TextButtonSize`, `isDisabled`, `isInverse`, and start/end icon & accessory props - `TextButton` now aligns with `Text` typography and press handlers (`variant`, `fontWeight`, `onPress`, etc.) **Migration:** See `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120`. **Impact:** - Affects all React Native `TextButton` usages relying on the removed props #### TextField Size API (React Native) **What Changed:** - Removed `TextFieldSize` and the `size` prop - `TextField` is now a single fixed-height (48px) row **Migration:** See `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120`. **Impact:** - Affects all React Native `TextField` usages passing `size` / importing `TextFieldSize` ### ✅ Checklist - [x] Changelogs updated with human-readable descriptions - [x] Changelog validation passed (`yarn changelog:validate`) - [x] Version bumps follow semantic versioning - [x] design-system-shared: minor (0.4.0 → 0.5.0) - new shared types - [x] design-system-react: minor (0.11.0 → 0.12.0) - new component + non-breaking changes - [x] design-system-react-native: minor (0.11.0 → 0.12.0) - new components + breaking API changes (pre-1.0) - [x] Breaking changes documented with migration guidance - [x] Migration guides updated with before/after examples (if breaking changes) - [x] PR references included in changelog entries ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've reviewed the [Release Workflow](./.cursor/rules/release-workflow.md) cursor rule - [x] All tests pass (`yarn build && yarn test && yarn lint`) - [x] Changelog validation passes (`yarn changelog:validate`) ## **Pre-merge reviewer checklist** - [ ] I've reviewed the [Reviewing Release PRs](./docs/reviewing-release-prs.md) guide - [ ] Package versions follow semantic versioning - [ ] Changelog entries are consumer-facing (not commit message regurgitation) - [ ] Breaking changes are documented in MIGRATION.md with examples - [ ] All unreleased changes are accounted for in changelogs <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Mostly a version/changelog release PR, but includes documented **breaking** React Native API removals for `TextButton` and `TextField` that can break downstream consumers on upgrade. > > **Overview** > Bumps the monorepo version to `26.0.0` and releases `@metamask/design-system-react`/`@metamask/design-system-react-native` to `0.12.0` and `@metamask/design-system-shared` to `0.5.0`. > > Updates changelogs and the React Native migration guide to reflect new `BannerAlert` (web + RN) and `KeyValueRow` (RN), shared type additions (`BannerAlertSeverity`/`BannerAlertPropsShared`, `AvatarNetworkPropsShared`), and **breaking** RN API changes removing `TextButton` sizing/icons/disabled/inverse props and removing `TextField` sizing (`TextFieldSize`/`size`) in favor of a fixed-height row. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5ead00c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
georgewrmarshall
pushed a commit
that referenced
this pull request
Apr 27, 2026
…1001) ## **Description** This PR updates **`@metamask/design-system-react-native`** in two areas (depending on what is already on the target branch): 1. **`TextButton` (breaking simplification)** - **Why:** Reduce API surface and implementation complexity so `TextButton` is a thin, predictable wrapper around design-system `Text`. - **What:** `TextButton` now renders `Text` with `onPress` / `onPressIn` / `onPressOut` only (no `Pressable`). Press state drives `TextColor.PrimaryDefault` → `PrimaryDefaultPressed`. - **Removed:** `size`, `TextButtonSize`, `isDisabled`, `isInverse`, start/end icons and accessories, and related constants/tests/stories/docs. - **Consumers:** Use `Text` props such as `variant` (default `TextVariant.BodyMd`), `fontWeight` (default `Medium`), optional `textProps`, and `twClassName` for layout/typography. `TextButtonSize` is no longer exported from this package—use `TextVariant` instead. ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-655 ## **Manual testing steps** 1. From the repo root: `yarn storybook:ios` or `yarn storybook:android` (or your usual RN Storybook flow). 2. Open **TextButton** stories: confirm default and variants render, `onPress` fires, and pressed styling matches design (primary → pressed primary). 3. If your app used the old API: confirm call sites compile after removing `size`, `isDisabled`, `isInverse`, icons/accessories, and switching sizing to `Text` `variant` / props as needed. ## **Screenshots/Recordings** ### **Before** ### **After** https://github.com/user-attachments/assets/156a3514-97fb-407f-9a6f-d35a2f8ed0e4 ## **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] > **Medium Risk** > Medium risk because it is a breaking API change that removes multiple exported props/enums (`TextButtonSize`, icons/accessories, inverse/disabled handling) and changes interaction styling behavior, requiring downstream app migrations. > > **Overview** > **Breaking refactor of `TextButton` in `@metamask/design-system-react-native`.** `TextButton` is now a text-only inline link that renders `Text` directly, taking `variant`/`fontWeight` and `Text` press handlers; pressed state is handled internally to switch between `TextColor.PrimaryDefault` and `PrimaryDefaultPressed`. > > The old API surface is removed: `TextButtonSize` (enum + export), `size`, `isDisabled`, `isInverse`, start/end icons and accessories, `textProps`, and the `Pressable`-based implementation (including related constants). Stories, tests, and component docs are rewritten to match the new props, and `MIGRATION.md` adds a 0.11.0→0.12.0 guide for updating call sites. > > Separately, the web `TextButton` styles drop `hover:bg-hover`/`active:bg-pressed` background classes, keeping text/decoration state changes only. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2d1a0bb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
georgewrmarshall
added a commit
that referenced
this pull request
Apr 27, 2026
## Release 26.0.0 This release adds new BannerAlert components, introduces `KeyValueRow` for React Native, includes breaking simplifications to React Native `TextButton` and `TextField`, and continues ADR-0003/0004 shared type migrations. ### 📦 Package Versions - `@metamask/design-system-shared`: **0.5.0** - `@metamask/design-system-react`: **0.12.0** - `@metamask/design-system-react-native`: **0.12.0** ### 🔄 Shared Type Updates (0.5.0) #### Component Type Additions (#975, #997) **What Changed:** - Added `BannerAlertSeverity` const object + `BannerAlertPropsShared` - Added `AvatarNetworkPropsShared` type (ADR-0004) **Impact:** - Enables consistent cross-platform `BannerAlert` severity/types - Continues ADR-0003/ADR-0004 const-object + string-union + shared types adoption ### 🌐 React Web Updates (0.12.0) #### Added - Added `BannerAlert` component (#975) #### Changed - Updated `TextButton` hover/pressed styles to be text-only (no background fill) (#1001) - Updated `Candlestick` icon asset with smaller size variant (#998) ### 📱 React Native Updates (0.12.0) #### Added - Added `BannerAlert` component (#966) - Added `KeyValueRow` component (#959) #### Changed - **BREAKING:** Simplified `TextButton` to a text-only control and removed `size`/`TextButtonSize`, inverse/disabled props, and icon/accessory props (#1001) - Migration: `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120` - **BREAKING:** Removed `TextFieldSize` and the `size` prop; `TextField` is now a single fixed-height (48px) row (#1000) - Migration: `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120` - Updated `Candlestick` icon asset with smaller size variant (#998) #### Fixed - Improved `Input` single-line typography alignment (including iOS placeholder behavior) (#1000) ###⚠️ Breaking Changes #### TextButton API (React Native) **What Changed:** - Removed `size`/`TextButtonSize`, `isDisabled`, `isInverse`, and start/end icon & accessory props - `TextButton` now aligns with `Text` typography and press handlers (`variant`, `fontWeight`, `onPress`, etc.) **Migration:** See `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120`. **Impact:** - Affects all React Native `TextButton` usages relying on the removed props #### TextField Size API (React Native) **What Changed:** - Removed `TextFieldSize` and the `size` prop - `TextField` is now a single fixed-height (48px) row **Migration:** See `./packages/design-system-react-native/MIGRATION.md#from-version-0110-to-0120`. **Impact:** - Affects all React Native `TextField` usages passing `size` / importing `TextFieldSize` ### ✅ Checklist - [x] Changelogs updated with human-readable descriptions - [x] Changelog validation passed (`yarn changelog:validate`) - [x] Version bumps follow semantic versioning - [x] design-system-shared: minor (0.4.0 → 0.5.0) - new shared types - [x] design-system-react: minor (0.11.0 → 0.12.0) - new component + non-breaking changes - [x] design-system-react-native: minor (0.11.0 → 0.12.0) - new components + breaking API changes (pre-1.0) - [x] Breaking changes documented with migration guidance - [x] Migration guides updated with before/after examples (if breaking changes) - [x] PR references included in changelog entries ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've reviewed the [Release Workflow](./.cursor/rules/release-workflow.md) cursor rule - [x] All tests pass (`yarn build && yarn test && yarn lint`) - [x] Changelog validation passes (`yarn changelog:validate`) ## **Pre-merge reviewer checklist** - [ ] I've reviewed the [Reviewing Release PRs](./docs/reviewing-release-prs.md) guide - [ ] Package versions follow semantic versioning - [ ] Changelog entries are consumer-facing (not commit message regurgitation) - [ ] Breaking changes are documented in MIGRATION.md with examples - [ ] All unreleased changes are accounted for in changelogs <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Mostly a version/changelog release PR, but includes documented **breaking** React Native API removals for `TextButton` and `TextField` that can break downstream consumers on upgrade. > > **Overview** > Bumps the monorepo version to `26.0.0` and releases `@metamask/design-system-react`/`@metamask/design-system-react-native` to `0.12.0` and `@metamask/design-system-shared` to `0.5.0`. > > Updates changelogs and the React Native migration guide to reflect new `BannerAlert` (web + RN) and `KeyValueRow` (RN), shared type additions (`BannerAlertSeverity`/`BannerAlertPropsShared`, `AvatarNetworkPropsShared`), and **breaking** RN API changes removing `TextButton` sizing/icons/disabled/inverse props and removing `TextField` sizing (`TextFieldSize`/`size`) in favor of a fixed-height row. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5ead00c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR updates
@metamask/design-system-react-nativein two areas (depending on what is already on the target branch):TextButton(breaking simplification)TextButtonis a thin, predictable wrapper around design-systemText.TextButtonnow rendersTextwithonPress/onPressIn/onPressOutonly (noPressable). Press state drivesTextColor.PrimaryDefault→PrimaryDefaultPressed.size,TextButtonSize,isDisabled,isInverse, start/end icons and accessories, and related constants/tests/stories/docs.Textprops such asvariant(defaultTextVariant.BodyMd),fontWeight(defaultMedium), optionaltextProps, andtwClassNamefor layout/typography.TextButtonSizeis no longer exported from this package—useTextVariantinstead.Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-655
Manual testing steps
yarn storybook:iosoryarn storybook:android(or your usual RN Storybook flow).onPressfires, and pressed styling matches design (primary → pressed primary).size,isDisabled,isInverse, icons/accessories, and switching sizing toTextvariant/ props as needed.Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-03-25.at.00.24.12.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Breaking API change removes
TextButtonSize, disabled/inverse states, and all icon/accessory support, requiring consumer updates. Interaction styling now relies onTextpress events and internal pressed state, which could subtly change behavior/appearance in existing screens.Overview
Simplifies React Native
TextButtoninto a thin wrapper aroundTextfor inline link-style interactions, usingvariant/fontWeightandTextpress props instead of aPressablecontainer.Breaking: removes
TextButtonSizeandsize, all disabled/inverse and start/end icon/accessory props, and stops exportingTextButtonSizefrom package types/exports. Storybook, tests, Figma code-connect, and docs/migration guide are updated to reflect the new text-only API and recommend tertiaryButtonwhen icons are needed.Also tweaks web
TextButtonhover/active classes to no longer apply background color.Written by Cursor Bugbot for commit 2e5d0d8. This will update automatically on new commits. Configure here.