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
F1787716: D5249.id17201.diff
Sat, May 18, 10:55 PM
F1787565: D5249.id.diff
Sat, May 18, 9:24 PM
F1787552: D5249.id17200.diff
Sat, May 18, 9:16 PM
F1783046: D5249.id17151.diff
Sat, May 18, 9:35 AM
Unknown Object (File)
Fri, May 17, 7:00 AM
Unknown Object (File)
Tue, May 14, 9:28 AM
Unknown Object (File)
Mon, May 6, 4:57 PM
Unknown Object (File)
Mon, Apr 22, 11:10 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
Branch
ENG-1913
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

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