MetaMask / MetaMask/metamask-mobile
Replace TextInput component with TextField from the component-library
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
### **Description**
There are many instances in the mobile codebase where the default React Native `TextInput` component is still in use. These should be gradually replaced with the new `TextField` component (`app/component-library/components/Form/TextField/TextField.tsx`).
To keep the migration safe, testable, and reviewable, **each pull request (PR) should focus on replacing a single instance** of the `TextInput` component. This step-by-step approach ensures clarity, avoids large diffs, and helps maintain visual and functional consistency.
### **Technical Details**
- Identify and replace a single instance of the `TextInput` component.
- Replace it with the new `TextField` component and migrate all necessary props.
- APIs differ slightly, so ensure any logic or behavior is preserved accurately.
- Validate that the replacement is visually and functionally consistent with the original usage.
### **Acceptance Criteria**
- Only one instance of `TextInput` is replaced in the PR.
- The new `TextField` is correctly implemented with appropriate props and behavior.
- No visual regressions or functional changes are introduced.
- All Jest tests, e2e tests, linting, and Storybook builds must pass.
- PR must include before and after screenshots for UI comparison.
PRs that don’t follow this structure may be closed or requested for revision.
### **Difficulty**: Intermediate
**Good first issue for:** External contributors who can run mobile locally and are experienced with React Native, component props, UI testing, and visual consistency.
Contributor guide
Research direction
Search the mobile codebase for a single React Native TextInput instance, then read app/component-library/components/Form/TextField/TextField.tsx to compare the available props and APIs. Replace only that instance while preserving its behavior, and validate it with the relevant Jest, e2e, lint, and Storybook checks plus before-and-after screenshots.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- frontend, mobile
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100