Page MenuHomePhabricator

[web] Disable 'Delete' button for threads when the password input is empty
ClosedPublic

Authored by rohan on Sep 28 2022, 10:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:45 AM
Unknown Object (File)
Tue, Nov 5, 9:43 AM
Unknown Object (File)
Sep 27 2024, 2:36 AM

Details

Summary

Added a check in the disabled property of the delete button to
check if there is an password entered into the input field - if not,
disable the button.

Test Plan

Tested on web and it works as expected. Handled cases where the
modal is opened for the first time, and also when a password is deleted.
The button remains disabled whenever the input is empty.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested changes to this revision.Sep 28 2022, 10:54 AM
ginsu added inline comments.
web/modals/threads/settings/thread-settings-delete-tab.react.js
113 ↗(On Diff #17151)

Nit: I personally would write the case like this, but would love to hear what the other reviewers think

This revision now requires changes to proceed.Sep 28 2022, 10:54 AM
web/modals/threads/settings/thread-settings-delete-tab.react.js
113 ↗(On Diff #17151)

I'm happy to change it to that - might make evaluation more consistent as opposed to checking with`!`

Update the way it checks for no password

Final (hopefully) fix on formatting

looks good, thanks for taking a first pass @ginsu

This revision is now accepted and ready to land.Sep 29 2022, 11:53 AM