Repository navigation
feat(auth): add password visibility toggle to auth forms - #210
Conversation
- add reusable PasswordInput component to web/src/components/ui/password-input.tsx - wraps Input with Eye/EyeOff toggle from lucide-react (already a dependency) - replace all type="password" fields in sign-in, sign-up, reset-password, and accept-invitation forms - toggle is type="button" to avoid accidental form submission - has aria-label for accessibility - default state is masked, no existing form logic changed Closes ansvisor#209 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
|
Thanks! The fix is purely UI — to test locally, run the web app, go to any auth form (sign-in, sign-up, reset password, or accept invitation), and click the eye icon on the password field to toggle visibility. Default state is masked, no form behavior changed. |
|
Merged — clean reusable |
- className="pr-10" placed after {...props} was silently dropping any
className passed by callers since spread props were overridden
- destructure className from props and merge with cn('pr-10', className)
- pr-10 is always applied as the base; caller className is appended
- no behavior change for the four existing auth form callers (none pass className)
Fixes #211
Follow-up to #210
Summary
Adds a reusable
PasswordInputcomponent and wires it into all four auth forms so users can reveal or mask their password by clicking the eye icon.Closes #209
Changes
web/src/components/ui/password-input.tsx— reusable component that wraps the existingInputwith anEye/EyeOfftoggle fromlucide-react(already a dependency, no new packages added)web/src/components/auth/sign-in-form.tsx— password field swapped toPasswordInputweb/src/components/auth/sign-up-form.tsx— password field swapped toPasswordInputweb/src/components/auth/reset-password-form.tsx— both password fields swapped toPasswordInput,Inputimport removed (no longer needed)web/src/components/team/accept-invitation-card.tsx— both password fields swapped toPasswordInputAcceptance criteria
type="button"— does not submit the formaria-labelset for accessibility (Show password/Hide password)