Skip to content

Conversation

hash88o
Copy link

@hash88o hash88o commented Oct 19, 2025

Description

This PR replaces the deprecated TextField component with the new FormTextField component from the component-library in the create-new-vault component. This is part of the ongoing effort tracked in #20483 to migrate all deprecated TextField instances to the new component-library TextField.

Changes made:

  • Replaced TextField import from ui/components/ui/text-field with FormTextField and TextFieldType from ui/components/component-library
  • Updated password field props:
    • Changed type="password" to type={TextFieldType.Password}
    • Converted error prop from string to boolean
    • Added helpText prop for error messages
    • Moved data-testid into inputProps
    • Removed unsupported props: margin, largeLabel
  • Applied same changes to confirm password field

Changelog

CHANGELOG entry: null

Related issues

Fixes: #20483

Manual testing steps

  1. Build the extension with yarn start:test
  2. Load the extension in Chrome/Brave
  3. Navigate to the "Import wallet" flow
  4. Verify the password fields render correctly
  5. Test password validation (minimum 8 characters)
  6. Test password mismatch validation
  7. Verify error messages display properly

Screenshots/Recordings

Before

After

Pre-merge author checklist

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

Copy link
Contributor

github-actions bot commented Oct 19, 2025

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.

@hash88o
Copy link
Author

hash88o commented Oct 19, 2025

I have read the CLA Document and I hereby sign the CLA

@metamaskbot metamaskbot added INVALID-PR-TEMPLATE PR's body doesn't match template and removed INVALID-PR-TEMPLATE PR's body doesn't match template labels Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated TextField component with TextField from the component-library

2 participants