Page MenuHomePhabricator

[web] Disable 'change password' button until text inputs are not empty
ClosedPublic

Authored by adar on Dec 1 2022, 7:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 11:49 AM
Unknown Object (File)
Sat, Nov 9, 11:49 AM
Unknown Object (File)
Fri, Nov 8, 9:04 PM
Unknown Object (File)
Thu, Nov 7, 8:27 AM
Unknown Object (File)
Thu, Nov 7, 5:49 AM
Unknown Object (File)
Thu, Nov 7, 5:45 AM
Unknown Object (File)
Tue, Nov 5, 2:08 AM
Unknown Object (File)
Mon, Nov 4, 3:56 PM
Subscribers

Details

Summary

This diff disables the 'Change password' button within user settings until the user has entered text into each of the input fields on the modal. Linked the the linear task ENG-2014

Test Plan

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adar held this revision as a draft.
adar published this revision for review.Dec 1 2022, 7:44 AM

Not sure if inputDisabled handles this already, but I feel like we should be doing other checks too for example

  • new password and confirm new password are the same
  • current password matches the correct current password

But overall looks good, and I know this wasn't part of the linear task, but might be a good follow-up diff to what we have right now.

This revision is now accepted and ready to land.Dec 1 2022, 2:43 PM

current password matches the correct current password

I don't think we should be doing this validation on the front-end.

new password and confirm new password are the same

We could do this validation before enabling the "Change password" button... but in my experience that check usually happens after the "submit" or "change password" button is pressed.