-
Notifications
You must be signed in to change notification settings - Fork 292
feat: allow to send thread reply to channel #2733
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
Conversation
|
Size Change: +6.08 kB (+0.46%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
| <button | ||
| className='str-chat__message-is-thread-reply-button' | ||
| data-testid='message-is-thread-reply-button' | ||
| onClick={async () => { | ||
| if (!parentMessageRef.current) { | ||
| // search query is performed here in order to prevent multiple search queries in useEffect | ||
| // due to the message list 3x remounting its items | ||
| await querySearchParent(); | ||
| if (parentMessageRef.current) { | ||
| openThread(parentMessageRef.current); | ||
| } else { | ||
| // prevent further search queries if the message is not found in the DB | ||
| parentMessageRef.current = null; | ||
| } | ||
| return; | ||
| } | ||
| openThread(parentMessageRef.current); | ||
| }} | ||
| > | ||
| {t<string>('Thread reply')} | ||
| </button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To prevent surprises with forms, can you please add a type="button prop to the <button /> element?
Also, please add error handling around await querySearchParent(), as in case it fails, the failure will be reported as "Unhandled Promise Rejection" in customer apps, and there is nothing they can do about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, didn't we get rid of the generics of t<string>()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- generics - yes, in another PR that is still to be merged - was waiting for approval of client changes.
type='button'added- added error handling to thread search request
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2733 +/- ##
==========================================
+ Coverage 81.71% 81.74% +0.03%
==========================================
Files 464 467 +3
Lines 9224 9279 +55
Branches 2154 2168 +14
==========================================
+ Hits 7537 7585 +48
- Misses 1335 1339 +4
- Partials 352 355 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
## [13.1.0](v13.0.5...v13.1.0) (2025-06-12) ### Bug Fixes * prevent adding newline in message text composer upon submitting with Enter key ([#2729](#2729)) ([c69e8d0](c69e8d0)) * prevent rendering placeholder for empty message list if messages are actually loaded ([#2731](#2731)) ([759bf44](759bf44)) * use channel_id and channel_type values from event channel.visible ([#2730](#2730)) ([d5f743b](d5f743b)) ### Features * add message reminders ([#2724](#2724)) ([37264db](37264db)) * add translation building capability to Streami18n and useNotifications hook ([#2719](#2719)) ([20c4889](20c4889)) * allow to send thread reply to channel ([#2733](#2733)) ([7fbc478](7fbc478)) ### Chores * **deps:** remove unused dependencies prop-types and textarea-caret ([#2720](#2720)) ([e7708fd](e7708fd))
|
🎉 This PR is included in version 13.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎯 Goal
Closes REACT-413
Depends on:
🎨 UI Changes
show-reply-in-channel.webm