Page MenuHomePhabricator

[native] Disable Delete chat button when trying to delete a chat and the password input is empty
ClosedPublic

Authored by rohan on Oct 9 2022, 10:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 23, 10:01 PM
Unknown Object (File)
Sat, Jun 22, 5:26 AM
Unknown Object (File)
Fri, Jun 21, 11:02 AM
Unknown Object (File)
Thu, Jun 20, 5:44 AM
Unknown Object (File)
Wed, Jun 19, 2:00 AM
Unknown Object (File)
Mon, Jun 17, 5:56 AM
Unknown Object (File)
Mon, Jun 17, 5:56 AM
Unknown Object (File)
Mon, Jun 17, 5:56 AM
Subscribers

Details

Summary

Disable the button if the password is empty, and also handle the
enter button from being pressed within the input field and make sure not
to attempt to disable the thread.

Test Plan

Tested both cases where the button becomes unclickable and
pressing enter within the input field should not submit the contents of
the field

Demo:

Diff Detail

Repository
rCOMM Comm
Branch
ENG-1920
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan attached a referenced file: F194390: ENG-1920.mov. (Show Details)
rohan requested review of this revision.Oct 9 2022, 10:51 AM

Looks good!

native/chat/settings/delete-thread.react.js
234 ↗(On Diff #17429)

We could probably just drop the Common suffix here. If we do want to include something in the name to indicate that this style is "shared" across different states, we tend to use the word Base elsewhere in the codebase... so maybe deleteButtonBase or baseDeleteButton? Doesn't really matter, up to you

This revision is now accepted and ready to land.Oct 9 2022, 1:27 PM

Changed style name to baseDeleteButton