@sendbird/uikit-react
Advanced tools
Changelog
[v3.9.1] (Dec 8 2023)
IntersectionObserver
uikitUploadSizeLimit
to the Open Channel Message Input
<Avatar />
component to fix ruined alignlatest_last_message
is the default order.<EditUserProfileUI />
into Modal and View parts<ReactionItem />
component<EmojiReactions />
Changelog
[v3.9.0] (Nov 24 2023)
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.
typingIndicatorTypes
global optionTypingIndicatorType
enum
<App
appId={appId}
userId={userId}
uikitOptions={{
groupChannel: {
// Below turns on both bubble and text typing indicators. Default is Text only.
typingIndicatorTypes: new Set([TypingIndicatorType.Bubble, TypingIndicatorType.Text]),
}
}}
/>
TypingIndicatorBubble
const moveScroll = (): void => {
const current = scrollRef?.current;
if (current) {
const bottom = current.scrollHeight - current.scrollTop - current.offsetHeight;
if (scrollBottom < bottom && scrollBottom < SCROLL_BUFFER) {
// Move the scroll as much as the height of the message has changed
current.scrollTop += bottom - scrollBottom;
}
}
};
return (
<TypingIndicatorBubble
typingMembers={typingMembers}
handleScroll={moveScroll} // Scroll to the rendered typing indicator message IFF current scroll is bottom.
/>
);
eventHandlers.connection.onFailed
callback in setupConnection
. This callback will be called on connection failure
<Sendbird
appId={appId}
userId={undefined} // this will cause an error
eventHandlers={{
connection: {
onFailed: (error) => {
alert(error?.message); // display a browser alert and print the error message inside
}
}
}}
>
MessageContent
component: renderMessageMenu
, renderEmojiMenu
, and renderEmojiReactions
<Channel
renderMessageContent={(props) => {
return <MessageContent
{...props}
renderMessageMenu={(props) => {
return <MessageMenu {...props} />
}}
renderEmojiMenu={(props) => {
return <MessageEmojiMenu {...props} />
}}
renderEmojiReactions={(props) => {
return <EmojiReactions {...props} />
}}
/>
}}
/>
onProfileEditSuccess
prop to App
and ChannelList
componentsrenderFrozenNotification
in ChannelUIProps
<Channel
channelUrl={channelUrl}
renderFrozenNotification={() => {
return (
<div
className="sendbird-notification sendbird-notification--frozen sendbird-conversation__messages__notification"
>My custom Frozen Notification</div>
);
}}
/>
VoiceMessageInputWrapper
and useHandleUploadFiles
import { useHandleUploadFiles } from '@sendbird/uikit-react/Channel/hooks/useHandleUploadFiles'
import { VoiceMessageInputWrapper, VoiceMessageInputWrapperProps } from '@sendbird/uikit-react/Channel/components/MessageInput'
startingPoint
scrolls to the middle of the target message when it should be at the top of the messageOGMessage
being displayed as not fitting the containerThread
results in displaying resulting message in Channel
Changelog
[v3.8.2] (Nov 10 2023)
MessageContent
is not customizable with three new optional properties:
renderSenderProfile
, renderMessageBody
, and renderMessageHeader
import Channel from '@sendbird/uikit-react/Channel'
import { useSendbirdStateContext } from '@sendbird/uikit-react/useSendbirdStateContext'
import { useChannelContext } from '@sendbird/uikit-react/Channel/context'
import MessageContent from '@sendbird/uikit-react/ui/MessageContent'
const CustomChannel = () => {
const { config } = useSendbirdStateContext();
const { userId } = config;
const { currentGroupChannel } = useChannelContext();
return (
<Channel
...
renderMessage={({ message }) => {
return (
<MessageContent
userId={userId}
channel={currentGroupChannel}
message={message}
...
renderSenderProfile={(props: MessageProfileProps) => (
<MessageProfile {...props}/>
)}
renderMessageBody={(props: MessageBodyProps) => (
<MessageBody {...props}/>
)}
renderMessageHeader={(props: MessageHeaderProps) => (
<MessageHeader {...props}/>
)}
/>
)
}}
/>
)
}
UnreadCount
banner since stringresizingWidth
and resizingHeight
ImageCompression
to the Thread
moduleImageCompression
for sending file message and multiple files messagechannel.members
instead of fetching for non-super group channels in the SuggestedMentionList
Changelog
[v3.8.0] (Nov 3 2023)
DateSeparators
and UnreadCount
.initialMessagesFetch
callback from the hook to provide more flexibility in UIKit customization.UserProfileProvider
in `OpenChannelSettings``.package.json
. If you were using the package in a Native CJS environment, this might have an impact.
In that case, you can migrate the path as follows:
- const ChannelList = require('@sendbird/uikit-react/cjs/ChannelList');
+ const ChannelList = require('@sendbird/uikit-react/ChannelList');