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
F2024462: D5320.id17429.diff
Mon, Jun 17, 5:56 AM
F2024461: D5320.id.diff
Mon, Jun 17, 5:56 AM
F2024460: D5320.diff
Mon, Jun 17, 5:56 AM
Unknown Object (File)
Mon, Jun 17, 2:59 AM
Unknown Object (File)
Mon, Jun 17, 2:59 AM
Unknown Object (File)
Wed, Jun 12, 3:13 PM
Unknown Object (File)
Mon, Jun 10, 12:35 AM
Unknown Object (File)
Mon, Jun 3, 6:15 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