fix: allow SRP button text to wrap on OnboardingSheet#27330
Merged
tylerc-consensys merged 2 commits intoMar 16, 2026
Merged
Conversation
The design system ButtonSecondary hardcodes numberOfLines: 1 and ButtonBase uses a fixed h-12, so long strings like "Import using Secret Recovery Phrase" get clipped on narrower devices. Override with min-h-12 h-auto py-3 and numberOfLines: 0 so the button expands to fit its content. Made-with: Cursor
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. |
Same numberOfLines: 1 and fixed-height issue as OnboardingSheet. Apply min-h h-auto py-3 and numberOfLines: 0 to both "Create a new wallet" and "I have an existing wallet" buttons. Made-with: Cursor
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: refactor/onboarding-tailwind-migration-part1) All E2E tests pre-selected. |
Contributor
|
✅ E2E Fixture Validation — Schema is up to date |
|
smgv
reviewed
Mar 12, 2026
7775d2b
into
refactor/onboarding-tailwind-migration-part1
110 checks passed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Users who set their system font size to maximum scale experience button text clipping on the Onboarding and OnboardingSheet screens. The design system
ButtonPrimaryandButtonSecondaryboth hardcodenumberOfLines: 1withellipsizeMode: 'clip', andButtonBaseuses a fixed height (h-12for Lg,h-10for Md). This means longer strings like "Import using Secret Recovery Phrase" and "I have an existing wallet" get cut off instead of wrapping.This fix overrides the button containers to use
min-h h-auto py-3and setsnumberOfLines: 0so buttons expand to fit their content at any font scale.Screens fixed
Onboarding/index.tsxOnboardingSheet/index.tsxRoot cause
Two constraints in
@metamask/design-system-react-native:ButtonPrimaryandButtonSecondaryboth passnumberOfLines: 1, ellipsizeMode: 'clip'toButtonBasetext propsButtonBaseapplies a fixed height class (h-12for Lg,h-10for Md) viaTWCLASSMAP_BUTTONBASE_SIZE_DIMENSIONBoth are overridable from the consumer side via
textPropsandtwClassName.Changelog
CHANGELOG entry: null
Related issues
Depends on: #26673
Manual testing steps
Screenshots/Recordings
Before
Button text is clipped to one line on devices with max font scale:
After
Buttons expand to fit the full text:
Pre-merge author checklist
Pre-merge reviewer checklist