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)
Thu, Mar 7, 6:26 PM
Unknown Object (File)
Thu, Mar 7, 6:26 PM
Unknown Object (File)
Thu, Mar 7, 1:40 AM
Unknown Object (File)
Tue, Mar 5, 11:47 PM
Unknown Object (File)
Tue, Mar 5, 11:47 PM
Unknown Object (File)
Feb 27 2024, 4:31 AM
Unknown Object (File)
Feb 27 2024, 4:31 AM
Unknown Object (File)
Feb 27 2024, 4:31 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
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.