Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIS-1038] Fix composer allowing whitespace only messages to be sent #1293

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

b-onc
Copy link
Contributor

@b-onc b-onc commented Jul 20, 2021

Composer send button should be disabled when the message is only whitespace. Sending whitespace only message breaks our UI.

Also, backend trims the whitespace when the message is published. If we send the message with leading/trailing whitespace, the UI first shows the message, but when backend sends the actual message, UI jumps. So it's better to send trimmed message to backend, to prevent UI jumps.

@b-onc b-onc added 🐞 Bug An issue or PR related to a bug 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK labels Jul 20, 2021
@b-onc b-onc requested a review from nuno-vieira July 20, 2021 13:40
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2021

Codecov Report

Merging #1293 (13fc30b) into main (11ed592) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1293   +/-   ##
=======================================
  Coverage   91.30%   91.30%           
=======================================
  Files         219      219           
  Lines        9492     9492           
=======================================
  Hits         8667     8667           
  Misses        825      825           
Flag Coverage Δ
llc-tests 91.30% <ø> (ø)
llc-tests-ios12 91.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11ed592...13fc30b. Read the comment docs.

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@b-onc b-onc merged commit 89732b5 into main Jul 20, 2021
@b-onc b-onc deleted the cis-1038-whitespace-message branch July 20, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug An issue or PR related to a bug 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants