|
1 | 1 | # Changelog - v3 |
2 | 2 |
|
| 3 | +## [v3.9.0] (Nov 24 2023) |
| 4 | + |
| 5 | +### Features: |
| 6 | +#### Typing indicator bubble feature |
| 7 | + |
| 8 | +`TypingIndicatorBubble` is a new typing indicator UI that can be turned on through `typingIndicatorTypes` option. When turned on, it will be displayed in `MessageList` upon receiving typing event in real time. |
| 9 | + |
| 10 | +* Added `typingIndicatorTypes` global option |
| 11 | +* Added `TypingIndicatorType` enum |
| 12 | + * How to use? |
| 13 | + ```tsx |
| 14 | + <App |
| 15 | + appId={appId} |
| 16 | + userId={userId} |
| 17 | + uikitOptions={{ |
| 18 | + groupChannel: { |
| 19 | + // Below turns on both bubble and text typing indicators. Default is Text only. |
| 20 | + typingIndicatorTypes: new Set([TypingIndicatorType.Bubble, TypingIndicatorType.Text]), |
| 21 | + } |
| 22 | + }} |
| 23 | + /> |
| 24 | + ``` |
| 25 | +* Added `TypingIndicatorBubble` |
| 26 | + * How to use? |
| 27 | + ```tsx |
| 28 | + const moveScroll = (): void => { |
| 29 | + const current = scrollRef?.current; |
| 30 | + if (current) { |
| 31 | + const bottom = current.scrollHeight - current.scrollTop - current.offsetHeight; |
| 32 | + if (scrollBottom < bottom && scrollBottom < SCROLL_BUFFER) { |
| 33 | + // Move the scroll as much as the height of the message has changed |
| 34 | + current.scrollTop += bottom - scrollBottom; |
| 35 | + } |
| 36 | + } |
| 37 | + }; |
| 38 | + |
| 39 | + return ( |
| 40 | + <TypingIndicatorBubble |
| 41 | + typingMembers={typingMembers} |
| 42 | + handleScroll={moveScroll} // Scroll to the rendered typing indicator message IFF current scroll is bottom. |
| 43 | + /> |
| 44 | + ); |
| 45 | + ``` |
| 46 | + |
| 47 | +#### Others |
| 48 | +* Added support for `eventHandlers.connection.onFailed` callback in `setupConnection`. This callback will be called on connection failure |
| 49 | + * How to use? |
| 50 | + ```tsx |
| 51 | + <Sendbird |
| 52 | + appId={appId} |
| 53 | + userId={undefined} // this will cause an error |
| 54 | + eventHandlers={{ |
| 55 | + connection: { |
| 56 | + onFailed: (error) => { |
| 57 | + alert(error?.message); // display a browser alert and print the error message inside |
| 58 | + } |
| 59 | + } |
| 60 | + }} |
| 61 | + > |
| 62 | + ``` |
| 63 | +* Added new props to the `MessageContent` component: `renderMessageMenu`, `renderEmojiMenu`, and `renderEmojiReactions` |
| 64 | + * How to use? |
| 65 | + ```tsx |
| 66 | + <Channel |
| 67 | + renderMessageContent={(props) => { |
| 68 | + return <MessageContent |
| 69 | + {...props} |
| 70 | + renderMessageMenu={(props) => { |
| 71 | + return <MessageMenu {...props} /> |
| 72 | + }} |
| 73 | + renderEmojiMenu={(props) => { |
| 74 | + return <MessageEmojiMenu {...props} /> |
| 75 | + }} |
| 76 | + renderEmojiReactions={(props) => { |
| 77 | + return <EmojiReactions {...props} /> |
| 78 | + }} |
| 79 | + /> |
| 80 | + }} |
| 81 | + /> |
| 82 | + ``` |
| 83 | +* Added `onProfileEditSuccess` prop to `App` and `ChannelList` components |
| 84 | +* Added `renderFrozenNotification` in `ChannelUIProps` |
| 85 | + * How to use? |
| 86 | + ```tsx |
| 87 | + <Channel |
| 88 | + channelUrl={channelUrl} |
| 89 | + renderFrozenNotification={() => { |
| 90 | + return ( |
| 91 | + <div |
| 92 | + className="sendbird-notification sendbird-notification--frozen sendbird-conversation__messages__notification" |
| 93 | + >My custom Frozen Notification</div> |
| 94 | + ); |
| 95 | + }} |
| 96 | + /> |
| 97 | + ``` |
| 98 | + |
| 99 | +### Fixes: |
| 100 | +* Fixed a bug where setting `startingPoint` scrolls to the middle of the target message when it should be at the top of the message |
| 101 | +* Applied dark theme to the slide left icon |
| 102 | +* Fixed a bug where changing current channel not clearing pending and failed messages from the previous channel |
| 103 | +* Fixed a bug where the thumbnail image of `OGMessage` being displayed as not fitting the container |
| 104 | +* Fixed a bug where resending a failed message in `Thread` results in displaying resulting message in `Channel` |
| 105 | +* Fixed a bug where unread message notification not being removed when scroll reaches bottom |
| 106 | + |
| 107 | +### Improvement: |
| 108 | +* Channels list no longer displays unread message count badge for focused channel |
| 109 | + |
| 110 | + |
3 | 111 | ## [v3.8.2] (Nov 10 2023) |
4 | 112 |
|
5 | 113 | ### Features: |
|
0 commit comments