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)
Sat, Nov 2, 8:43 PM
Unknown Object (File)
Sat, Nov 2, 8:43 PM
Unknown Object (File)
Sat, Nov 2, 8:43 PM
Unknown Object (File)
Sat, Nov 2, 8:42 PM
Unknown Object (File)
Sat, Nov 2, 8:40 PM
Unknown Object (File)
Oct 6 2024, 5:11 PM
Unknown Object (File)
Sep 27 2024, 3:30 PM
Unknown Object (File)
Sep 18 2024, 1:51 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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