feat: migrate TooltipModal to design system components#27753
Conversation
|
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. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Affected areas:
The changes are primarily cosmetic/styling refactors with no functional logic changes, but the tooltip display in these flows should be validated to ensure the safe area insets work correctly on both iOS and Android, and that the design system components render properly. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|




Description
TooltipModalwas using legacy component-library patterns (StyleSheet.create, rawView, deprecatedBottomSheetFooter, and component-libraryText) that are no longer consistent with the current UI development standards.This PR migrates
TooltipModalto fully conform to the new standards:ViewwithBoxfrom@metamask/design-system-react-nativeText/TextVariant/TextColorwith the design system equivalents (TextVariant.BodyMd,TextColor.TextAlternative)BottomSheetFooter(which used a brokenObject.assign+StyleSheet.createapproach for style overrides) with the design systemBottomSheetFooter, which applies styles via a style array andtwClassNamecorrectlyStyleSheet.createand the companionToolTipModal.styles.tsfileuseSafeAreaInsetsfor device-aware bottom padding on the footeruseTailwindfor all Tailwind-based stylingThe deprecated
BottomSheetFooterhad a bug where passingpaddingHorizontalvia itsstyleprop did not apply correctly — the internalObject.assign+StyleSheet.createmerge caused the shorthandpaddingHorizontalto be overridden by already-resolved longhand values. The design system component resolves this by applying styles as a proper array where the last entry wins.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-4249
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it changes
TooltipModal’s component implementation and removes thebottomPaddingnavigation/typing option, which could affect any callers relying on that param or footer spacing behavior.Overview
Migrates
TooltipModalto the MetaMask design system by replacing legacyView/StyleSheetstyling and the deprecated component-library footer withBox, design-systemText, and design-systemBottomSheetFooterusing Tailwind (useTailwind).Updates footer spacing to use
useSafeAreaInsetsfor bottom padding and removes the custombottomPaddingroute param/options plumbing end-to-end (ToolTipModal.types.ts,useTooltipModal,KeyValueRowtooltip types/usage, and related tests), deletingToolTipModal.styles.tsand adjusting snapshots/mocks accordingly.Written by Cursor Bugbot for commit 66dbdb8. This will update automatically on new commits. Configure here.