feat: flush stored drafts upon message send - #42054
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 901ee24 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8ab4724 to
901ee24
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #42054 +/- ##
===========================================
+ Coverage 69.30% 69.31% +0.01%
===========================================
Files 4289 4289
Lines 171486 171488 +2
Branches 31062 31111 +49
===========================================
+ Hits 118847 118868 +21
+ Misses 47463 47442 -21
- Partials 5176 5178 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Drafts were only written to the server when the composer unmounted, so sending a message left the stored draft untouched and the room kept showing the draft indicator until you switched rooms.
flushDraftnow accepts an optional value, and the send handler flushes the composer content once the send flow settles. The composer is empty by then, so the draft is discarded. If the flow deliberately left text behind, a message overMessage_MaxAllowedSizefor instance, that text is stored as the draft instead. It reuses the same path as the room change flush, so the send handler only needed one extra line.Issue(s)
Steps to test or reproduce
Further comments
SCC-31