Skip to content

Releases: sendbird/sendbird-uikit-react

[v3.3.3] (Dec 22 2022)

22 Dec 06:49
3535566

Choose a tag to compare

Fix:

  • Change default value of the image compression rate to 70%(0.7)

[v3.3.2] (Dec 8 2022)

08 Dec 02:19
285df35

Choose a tag to compare

[v3.3.2] (Dec 8 2022)

Features:

  • Add props renderTitle to the component

    • renderHeader of 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 manually

    export 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 renderHeader of .
  • 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 isMentionEnabled of .
  • Change the props type messageSearchQuery of 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)

23 Nov 06:58

Choose a tag to compare

[v3.3.1] (Nov 23 2022)
Fixes:

  • Rename properties of useThreadContext
    • channelStatus to channelState
    • parentMessageInfoStatus to parentMessageState
    • threadListStatus to threadListState
  • 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 with
      import Thread from "@sendbird/uikit-react/Thread"
    • Also you can use ThreadProvider and useThreadContext for customization. Import it with
      import { ThreadProvider, useThreadContext } from "@sendbird/uikit-react/Thread/context"
    • And the other UI components are provided under the Thread. ThreadUI, ThreadHeader, ParentMessageInfo, ParentMessageInfoItem, ThreadList, ThreadListItem, and ThreadMessageInput are it
  • Add channel props
    • threadReplySelectType: Type of the value should be
      enum ThreadReplySelectType { PARENT, THREAD }
      You can see how to use it below
      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 menu
      type onReplyInThread = ({ message: UserMessage | FileMessage }) => void
    • onQuoteMessageClick: This function is called when user click the quote message on the message of Channel
      type onQuoteMessageClick = ({ message: UserMessage | FileMessage }) => {}
    • onMessageAnimated: This function is called after that message item is animated
      type onMessageAnimated = () => void
    • onMessageHighlighted: This function is called after that message item is highlighted
      type onMessageHighlighted = () => void
  • Add ui/ThreadReplies component
    interface 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)

23 Nov 05:41
df73f01

Choose a tag to compare

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 with
      import Thread from "@sendbird/uikit-react/Thread"
    • Also you can use ThreadProvider and useThreadContext for customization. Import it with
      import { ThreadProvider, useThreadContext } from "@sendbird/uikit-react/Thread/context"
    • And the other UI components are provided under the Thread. ThreadUI, ThreadHeader, ParentMessageInfo, ParentMessageInfoItem, ThreadList, ThreadListItem, and ThreadMessageInput are it
  • Add channel props
    • threadReplySelectType: Type of the value should be
      enum ThreadReplySelectType { PARENT, THREAD }
      You can see how to use it below
      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 menu
      type onReplyInThread = ({ message: UserMessage | FileMessage }) => void
    • onQuoteMessageClick: This function is called when user click the quote message on the message of Channel
      type onQuoteMessageClick = ({ message: UserMessage | FileMessage }) => {}
    • onMessageAnimated: This function is called after that message item is animated
      type onMessageAnimated = () => void
    • onMessageHighlighted: This function is called after that message item is highlighted
      type onMessageHighlighted = () => void
  • Add ui/ThreadReplies component
    interface 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)

15 Nov 01:31
f18cb4d

Choose a tag to compare

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

https://sendbird.atlassian.net/browse/SDKRLSD-562

[v3.2.5] (Nov 7 2022)

06 Nov 23:20

Choose a tag to compare

Fix:

  • Modify the type of parameters in the sendbirdSelectors
    There has been unsyncronous between reality and types
    This fix only affects to TypeScript
    • getLeaveGroupChannel: channel to channelUrl
    • getEnterOpenChannel: channel to channelUrl
    • getExitOpenChannel: channel to channelUrl

[v3.2.4] (Nov 1 2022)

02 Nov 03:31
e48710f

Choose a tag to compare

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)

14 Oct 03:57
d4c95d1

Choose a tag to compare

Feature:

  • Add a prop disableMarkAsRead into the
    This prop disables calling markAsRead in the Channel component

[v3.2.2] (Oct 13 2022)

13 Oct 02:03
319d263

Choose a tag to compare

Feature:

  • Export a type OutgoingMessageStates
    • Type: enum OutgoingMessageStates { NONE, PENDING, SENT, FAILED, DELIVERED, READ }
  • Export a util function getOutgoingMessageState
    • Importing path: "@sendbird/uikit-react/utils/message/getOutgoingMessageState"
    • Interface: function getOutgoingMessageState(channel, message): OutgoingMessageStates
  • Add a prop disableMarkAsDelivered into 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)

04 Oct 05:22

Choose a tag to compare

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