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)
Sun, Dec 8, 6:48 PM
Unknown Object (File)
Thu, Dec 5, 2:30 AM
Unknown Object (File)
Thu, Dec 5, 2:30 AM
Unknown Object (File)
Thu, Dec 5, 2:29 AM
Unknown Object (File)
Thu, Dec 5, 2:29 AM
Unknown Object (File)
Wed, Dec 4, 2:41 PM
Unknown Object (File)
Wed, Dec 4, 2:41 PM
Unknown Object (File)
Wed, Dec 4, 2:41 PM
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
Branch
kuba/empty_messages_web
Lint
No Lint Coverage
Unit
No Test Coverage

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.