Page MenuHomePhabricator

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

Authored by kuba on Thu, May 25, 2:18 AM.

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.

kuba requested review of this revision.Thu, May 25, 2:36 AM
web/chat/edit-text-message.react.js
48–50 ↗(On Diff #27042)

Shorthand

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

Shorthand

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