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, Oct 30, 11:53 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
Unknown Object (File)
Wed, Oct 30, 11:51 AM
Unknown Object (File)
Wed, Oct 16, 1:13 AM
Unknown Object (File)
Wed, Oct 2, 3:12 AM
Unknown Object (File)
Sep 10 2024, 9:06 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.