refactor: migrate import SRP screens to design system with Tailwind CSS (Part 2)#26736
Conversation
Replace StyleSheet.create() and raw View/Text components with design-system-react-native Box/Text and useTailwind() in ImportFromSecretRecoveryPhrase and ImportNewSecretRecoveryPhrase. Delete the now-unused .styles.ts files. Made-with: Cursor
|
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. |
…igration Made-with: Cursor
Revert Pressable usage back to TouchableOpacity for header and info actions to preserve native pressed-state opacity feedback and match prior UX behavior.
Use the correct background-section token for the learn-more container and restore Android-specific bottom spacing/padding behavior in import SRP flows to match prior rendering.
Replace deprecated component-library Text usage in import SRP flows and update affected snapshot output. Made-with: Cursor
…ailwind-migration-part2 # Conflicts: # app/components/Views/ImportFromSecretRecoveryPhrase/__snapshots__/index.test.tsx.snap # app/components/Views/ImportNewSecretRecoveryPhrase/index.tsx
The merge with main reverted several Tailwind migration changes: - Restore tw.style() for SafeAreaView (was reverting to removed styles obj) - Replace View with Box for subtitle container - Fix TextVariant.BodyMD → BodyMd - Fix TextColor.Alternative → TextAlternative Made-with: Cursor
…ailwind-migration-part2
Made-with: Cursor
Remove onboarding-code-quality-findings.md from the repository root — working notes inadvertently staged alongside the refactor. Made-with: Cursor
Revert app/components/Views/Onboarding/index.tsx and index.test.tsx to main — these changes are handled in the Part 1 migration PR. Made-with: Cursor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26736 +/- ##
==========================================
- Coverage 81.61% 81.52% -0.09%
==========================================
Files 4598 4617 +19
Lines 120455 121163 +708
Branches 26347 26435 +88
==========================================
+ Hits 98307 98777 +470
- Misses 15258 15482 +224
- Partials 6890 6904 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| <Box | ||
| flexDirection={BoxFlexDirection.Column} | ||
| style={tw.style( | ||
| 'w-full gap-y-[18px] mt-auto', |
There was a problem hiding this comment.
gap-y-[18px] — arbitrary values should be avoided per design system guidelines. Can this use gap-y-4 (16px) or gap-y-5 (20px) instead? If 18px is pixel-perfect from the design spec, please confirm?
There was a problem hiding this comment.
Yes previously was using exactly same pixel 18. Now switch to gap-y-4 because there's another same usage in the same file
| contentContainerStyle={styles.wrapper} | ||
| contentContainerStyle={tw.style( | ||
| 'flex-grow px-4', | ||
| Platform.OS === 'android' ? 'pb-0' : 'pb-4', |
There was a problem hiding this comment.
pb-0 is the default, this is a no-op. Simplify to: Platform.OS !== 'android' && 'pb-4'
| } from '../../../component-library/components/Texts/Text'; | ||
| import { | ||
| TextVariant as LegacyTextVariant, | ||
| TextColor as LegacyTextColor, |
There was a problem hiding this comment.
Why mixing two textVariant/textColor enums? Is there component equivalent to Text into new design library?
There was a problem hiding this comment.
the new Text component just landed in the design system repo last Thursday. Updating the PRs to reflect latest changes
- Replace arbitrary gap-y-[18px] with design token gap-y-4 (16px) - Simplify redundant pb-0 conditional to Platform.OS !== 'android' && 'pb-4' Made-with: Cursor
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.
…ailwind-migration-part2
Replace deprecated component-library Label with design-system-react-native Label. Remove LegacyTextVariant/LegacyTextColor imports in favour of TextVariant.BodyMd + FontWeight.Medium and TextColor.TextDefault. Made-with: Cursor
…cretRecoveryPhrase Column is the default flex direction for Box. Keep BoxFlexDirection import for the two Row usages. Made-with: Cursor
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: SmokeAccounts is required because it covers SRP import/export flows, multi-account management, and integration with account selection components. Per the tag guidance, when changes touch multi-SRP architecture or SRP flows, SmokeWalletPlatform must also be selected due to its coverage of multi-SRP wallet architecture and account hierarchies. Additionally, SmokeIdentity is selected because multi-SRP flows can impact sync behavior and account propagation across devices, which is explicitly tied to multi-SRP changes. No other functional areas (networks, confirmations, trade, snaps, etc.) are directly impacted by these UI changes. Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Replace StyleSheet.create() and raw View/Text components with design-system-react-native Box/Text and useTailwind() in ImportFromSecretRecoveryPhrase and ImportNewSecretRecoveryPhrase. Delete the now-unused .styles.ts files.
Part 2 of 2. Part 1: #26673
Changelog
CHANGELOG entry: null
Related issues
Refs: TO-554 - Migrate @MetaMask/web3auth onboarding screens to Design System with Tailwind CSS
Manual testing steps
No functional changes. Visual regression only — verify import SRP screens render correctly.
Screenshots/Recordings
Before left, after right
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Primarily a UI refactor, but it touches the wallet import/onboarding SRP flows where styling/layout regressions could block users or break keyboard/safe-area behavior across iOS/Android.
Overview
Migrates
ImportFromSecretRecoveryPhraseandImportNewSecretRecoveryPhrasefromStyleSheet.create()and rawView/libraryTextcomponents to design-systemBox/Text/LabelwithuseTailwind()styling, including minor platform-specific spacing tweaks.Deletes the now-unused
styles.tsfiles and updates the Jest snapshot to reflect the new component/styling output.Written by Cursor Bugbot for commit 2c5e19c. This will update automatically on new commits. Configure here.