Releases: sendbird/sendbird-uikit-react
[v3.3.3] (Dec 22 2022)
Fix:
- Change default value of the image compression rate to 70%(0.7)
[v3.3.2] (Dec 8 2022)
[v3.3.2] (Dec 8 2022)
Features:
-
Add props
renderTitleto the componentrenderHeaderof will be deprecated
-
Add interface overrideInviteUser
Add overrideInviteUser to ChannelList, CreateChannel and ChannelSettings
This interface overrides InviteMember functionality. Customer has to create the channel
and close the popup manuallyexport type OverrideInviteUserType = { users: Array<string>; onClose: () => void; channelType: 'group' | 'supergroup' | 'broadcast'; }; export interface ChannelListProps { overrideInviteUser?(params: OverrideInviteUserType): void; } export interface CreateChannelProps { overrideInviteUser?(params: OverrideInviteUserType): void; } export type OverrideInviteMemberType = { users: Array<string>; onClose: () => void; channel: GroupChannel; }; ChannelSettings.overrideInviteUser?(params: OverrideInviteMemberType): void;
example:
<ChannelList overrideInviteUser={({users, onClose, channelType}) => { createMyChannel(users, channelType).then(() => { onClose(); }) }} />
Fixes:
- Allow to override entire message search query.
Now message search query supports searching messages in multiple channels. - Modify type definitions for props
ThreadUIProps.renderMessage. - Remove duplication of create channel button when using
renderHeaderof . - The online status should work even configureSession is provided.
This was disabled because of a bug in sessionHandler in SDK now, we can re-enable this. - Create channel sometimes had empty operatorID.
Use sendbird state to access currentUserID and use it incase prop value is empty.
Also, remove legacy HOC pattern. - Add the props type
isMentionEnabledof . - Change the props type
messageSearchQueryof to MessageSearchQueryParams.
What's Changed
- [v3.3.1] (Nov 23 2022) by @HoonBaek in #369
- fix: Add types for renderMessage of ThreadUI by @HoonBaek in #371
- fix: create channel sometimes had empty operatorID by @sravan-s in #372
- fix: onlinestatus should work even configureSession is provided by @sravan-s in #366
- Fix: Mark as read definitely when receiving message by @HoonBaek in #373
- feat: add interface overrideInviteUser by @sravan-s in #370
- fix: Allow overriding entire message search query by @HoonBaek in #374
- fix: Include renderIconButton into the renderHeader range by @HoonBaek in #375
- fix: Change the type definition of messageSearchQuery by @HoonBaek in #376
- fix: Add props type isMentionEnabled to the App component by @HoonBaek in #377
- Release v3.3.2 on Dec 8 by @HoonBaek in #378
Full Changelog: v3.3.0...v3.3.2
[v3.3.1] (Nov 23 2022)
[v3.3.1] (Nov 23 2022)
Fixes:
- Rename properties of
useThreadContextchannelStatustochannelStateparentMessageInfoStatustoparentMessageStatethreadListStatustothreadListState
- Change the state types to enum
enum ChannelStateTypes { NIL = 'NIL', LOADING = 'LOADING', INVALID = 'INVALID', INITIALIZED = 'INITIALIZED', } enum ParentMessageStateTypes { NIL = 'NIL', LOADING = 'LOADING', INVALID = 'INVALID', INITIALIZED = 'INITIALIZED', } enum ThreadListStateTypes { NIL = 'NIL', LOADING = 'LOADING', INVALID = 'INVALID', INITIALIZED = 'INITIALIZED', }
[v3.3.0] (Nov 23 2022)
Features:
- Provide new module
Thread. See the specific informations of this module on the Docs page- You can use a combined component
Thread. Import it withimport Thread from "@sendbird/uikit-react/Thread"
- Also you can use
ThreadProvideranduseThreadContextfor customization. Import it withimport { ThreadProvider, useThreadContext } from "@sendbird/uikit-react/Thread/context"
- And the other UI components are provided under the Thread.
ThreadUI,ThreadHeader,ParentMessageInfo,ParentMessageInfoItem,ThreadList,ThreadListItem, andThreadMessageInputare it
- You can use a combined component
- Add channel props
threadReplySelectType: Type of the value should beYou can see how to use it belowenum ThreadReplySelectType { PARENT, THREAD }
import { ThreadReplySelectType } from "@sendbird/uikit-react/Channel/context"; <Channel ... threadReplySelectType={ThreadReplySelectType.PARENT} />
animatedMessage: Type of the value should be number(messageId)onReplyInThread: This function is called when user click the button "Reply in thread" on the message context menutype onReplyInThread = ({ message: UserMessage | FileMessage }) => void
onQuoteMessageClick: This function is called when user click the quote message on the message of Channeltype onQuoteMessageClick = ({ message: UserMessage | FileMessage }) => {}
onMessageAnimated: This function is called after that message item is animatedtype onMessageAnimated = () => void
onMessageHighlighted: This function is called after that message item is highlightedtype onMessageHighlighted = () => void
- Add
ui/ThreadRepliescomponentinterface ThreadRepliesProps { className?: string; threadInfo: ThreadInfo; onClick?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void; }
Fixes:
- Do not allow operator to unregister itself on the OperatorList of GroupChannel
- Create new group channel when user open 1:1 channel on the UserProfile
- Register the channel creator as an operator in 1:1 channel
[v3.3.0] (Nov 23 2022)
Features:
- Provide new module
Thread. See the specific informations of this module on the Docs page- You can use a combined component
Thread. Import it withimport Thread from "@sendbird/uikit-react/Thread"
- Also you can use
ThreadProvideranduseThreadContextfor customization. Import it withimport { ThreadProvider, useThreadContext } from "@sendbird/uikit-react/Thread/context"
- And the other UI components are provided under the Thread.
ThreadUI,ThreadHeader,ParentMessageInfo,ParentMessageInfoItem,ThreadList,ThreadListItem, andThreadMessageInputare it
- You can use a combined component
- Add channel props
threadReplySelectType: Type of the value should beYou can see how to use it belowenum ThreadReplySelectType { PARENT, THREAD }
import { ThreadReplySelectType } from "@sendbird/uikit-react/Channel/context"; <Channel ... threadReplySelectType={ThreadReplySelectType.PARENT} />
animatedMessage: Type of the value should be number(messageId)onReplyInThread: This function is called when user click the button "Reply in thread" on the message context menutype onReplyInThread = ({ message: UserMessage | FileMessage }) => void
onQuoteMessageClick: This function is called when user click the quote message on the message of Channeltype onQuoteMessageClick = ({ message: UserMessage | FileMessage }) => {}
onMessageAnimated: This function is called after that message item is animatedtype onMessageAnimated = () => void
onMessageHighlighted: This function is called after that message item is highlightedtype onMessageHighlighted = () => void
- Add
ui/ThreadRepliescomponentinterface ThreadRepliesProps { className?: string; threadInfo: ThreadInfo; onClick?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void; }
Fixes:
- Do not allow operator to unregister itself on the OperatorList of GroupChannel
- Create new group channel when user open 1:1 channel on the UserProfile
- Register the channel creator as an operator in 1:1 channel
[v3.2.6] (Nov 14 2022)
Fix:
- Use ref instead of querySelector for DOM manipulation
Fixes the issue where input is not cleared when multiple channels are open at the same time - Apply pre-line into the OpenChannelUserMessage
Fixes the issue where OpenChannel UserMessage doesnt have new line
[v3.2.5] (Nov 7 2022)
Fix:
- Modify the type of parameters in the sendbirdSelectors
There has been unsyncronous between reality and types
This fix only affects to TypeScript- getLeaveGroupChannel:
channeltochannelUrl - getEnterOpenChannel:
channeltochannelUrl - getExitOpenChannel:
channeltochannelUrl
- getLeaveGroupChannel:
[v3.2.4] (Nov 1 2022)
Features:
- For Channel component, added separate prop isLoading?.boolean
Usage:<Channel channelUrl {currentChannelUrl} isLoading={!currentChannelUrl} /> - For flicker in ChannelList, no extra props
Fixes:
- React UIKit placeholder rendering issue
- Fix scroll issue in ChannelList where user cannot load more channels
- Modify TS interface getLeaveChannel to getLeaveGroupChannel in selectors
[v3.2.3] (Oct 14 2022)
Feature:
- Add a prop
disableMarkAsReadinto the
This prop disables calling markAsRead in the Channel component
[v3.2.2] (Oct 13 2022)
Feature:
- Export a type
OutgoingMessageStates- Type:
enum OutgoingMessageStates { NONE, PENDING, SENT, FAILED, DELIVERED, READ }
- Type:
- Export a util function
getOutgoingMessageState- Importing path: "@sendbird/uikit-react/utils/message/getOutgoingMessageState"
- Interface:
function getOutgoingMessageState(channel, message): OutgoingMessageStates
- Add a prop
disableMarkAsDeliveredinto the and
Some of our customers do not use the markAsDelivery feature,
but we always have called the markAsDelivered on the ChannelList with every channel
It caused a rate-limit issue, so we add a new prop to disable the markAdDelivered call for that case
[v3.2.1] (Oct 04 2022)
Fixes:
- Donot bundle chat sdk with uikit compiled code
Compiled UIKit code that is distributed through npm shouldnt have Chat SDK minified code included in it Chat SDK should be a dependency of UIKit
Advantages:
- Chat SDK bug fixes will be added for free
- Eliminate the need for handlers
What caused the issue:
If you are usig rollup for bundling
in config.external you have to be specific
ie>
This works:
external: [
'@sendbird/chat',
'@sendbird/chat/groupChannel',
'@sendbird/chat/openChannel',
'@sendbird/chat/message',
]
This doesnt:
external: [ '@sendbird/chat', ]
- Only react and react-dom should be peerDependencies
For npm >= v7, npm autoinstall peerDependency packages According to https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependencies You want to express the compatibility of your package with a host tool or library while not necessarily doing a require of this host Even though react is required, its better to show that react is the host tool