Page MenuHomePhabricator

[web] Disabled edit button if edited message is empty
ClosedPublic

Authored by kuba on May 25 2023, 2:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 3:43 PM
Unknown Object (File)
Tue, Nov 5, 9:08 AM
Unknown Object (File)
Tue, Nov 5, 9:08 AM
Unknown Object (File)
Tue, Nov 5, 9:07 AM
Unknown Object (File)
Tue, Nov 5, 9:07 AM
Unknown Object (File)
Wed, Oct 30, 11:53 AM
Unknown Object (File)
Wed, Oct 30, 11:53 AM
Unknown Object (File)
Wed, Oct 30, 11:53 AM
Subscribers

Details

Summary

We want to match editing behavior with the native. If the user types an empty message, the edit button will be disabled, and the user will be prevented from saving the changes.

Test Plan
  • Entered edit mode of a message.
  • Cleared the whole message.
  • Checked if the edit button is disabled.
  • Typed some spaces.
  • Checked if the edit button is still disabled.
  • Typed some text.
  • Checked if the edit button is enabled.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

web/chat/edit-text-message.react.js
66–68 ↗(On Diff #27042)

We don't want to let users send empty messages.

web/chat/edit-text-message.react.js
48–50 ↗(On Diff #27042)

Shorthand

This revision is now accepted and ready to land.May 25 2023, 4:31 AM
kuba marked an inline comment as done.

Shorthand

This revision was landed with ongoing or failed builds.May 25 2023, 4:39 AM
This revision was automatically updated to reflect the committed changes.