Skip to content

v3.0.0

Compare
Choose a tag to compare
@bang9 bang9 released this 28 Jun 05:04
· 539 commits to main since this release
210cca5

3.0.0 (2023-06-28)

Release notes

Feature configurations

  • The minimum @sendbird/chat version has been increased from 4.3.0 to 4.9.2.
  • You can now configure the features of UIKit through the uikitOptions prop of SendbirdUIKitContainer.
<SendbirdUIKitContainer
  uikitOptions={{
    common: {
      enableUsingDefaultUserProfile: true,
    },
    groupChannel: {
      enableMention: false,
      enableOgtag: true,
      enableReaction: true,
      enableTypingIndicator: true,
      input: {
        camera: {
          enablePhoto: true,
          enableVideo: true,
        },
        gallery: {
          enablePhoto: true,
          enableVideo: true,
        },
        enableDocument: true,
      },
    },
    groupChannelList: {
      enableTypingIndicator: true,
      enableMessageReceiptStatus: true,
    },
    groupChannelSettings: {
      enableMessageSearch: true,
    },
    openChannel: {
      enableOgtag: true,
      input: {
        camera: {
          enablePhoto: true,
          enableVideo: true,
        },
        gallery: {
          enablePhoto: true,
          enableVideo: true,
        },
        enableDocument: true,
      },
    },
  }}
/>

Breaking changes

Project configurations

The minimum React-Native version has been increased from 0.63.3 to 0.65.0.

Local cache is now a mandatory requirement.

  • You must inject localCacheStorage into SendbirdUIKitContainer.
<SendbirdUIKitContainer chatOptions={{ localCacheStorage: AsyncStorage }} />

Code migrations and removal of deprecated items

Feature configurations

  • The feature configuration options that were previously present in the chatOptions prop of SendbirdUIKitContainer have been moved to uikitOptions prop.

    • chatOptions.enableUserMention is replaced with uikitOptions.groupChannel.enableMention
    • chatOptions.enableGroupChannelOGTag is replaced with uikitOptions.groupChannel.enableOgtag
    • chatOptions.enableChannelListTypingIndicator replaced with uikitOptions.groupChannelList.enableTypingIndicator
    • chatOptions.enableChannelListMessageReceiptStatus is replaced with uikitOptions.groupChannelList.enableMessageReceiptStatus
    • chatOptions.enableMessageSearch is replaced with uikitOptions.groupChannelSettings.enableMessageSearch
    • chatOptions.enableOpenChannelOGTag is replaced with uikitOptions.openChannel.enableOgtag
    • chatOptions.enableUsingDefaultUserProfile is replaced with uikitOptions.common.enableUsingDefaultUserProfile

Resources

  • StringSet

    • OPEN_CHANNEL.LIST_BANNER_FROZEN is replaced with LABELS.CHANNEL_MESSAGE_LIST_FROZEN
    • GROUP_CHANNEL.LIST_BANNER_FROZEN is replaced with LABELS.CHANNEL_MESSAGE_LIST_FROZEN
    • GROUP_CHANNEL.DIALOG_MESSAGE_COPY is replaced with LABELS.CHANNEL_MESSAGE_COPY
    • GROUP_CHANNEL.DIALOG_MESSAGE_EDIT is replaced with LABELS.CHANNEL_MESSAGE_EDIT
    • GROUP_CHANNEL.DIALOG_MESSAGE_SAVE is replaced with LABELS.CHANNEL_MESSAGE_SAVE
    • GROUP_CHANNEL.DIALOG_MESSAGE_DELETE is replaced with LABELS.CHANNEL_MESSAGE_DELETE
    • GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_TITLE is replaced with LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_TITLE
    • GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_OK is replaced with LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_OK
    • GROUP_CHANNEL.DIALOG_MESSAGE_DELETE_CONFIRM_CANCEL is replaced with LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_CANCEL
    • GROUP_CHANNEL.DIALOG_MESSAGE_FAILED_RETRY is replaced with LABELS.CHANNEL_MESSAGE_FAILED_RETRY
    • GROUP_CHANNEL.DIALOG_MESSAGE_FAILED_REMOVE is replaced with LABELS.CHANNEL_MESSAGE_FAILED_REMOVE
    • GROUP_CHANNEL.DIALOG_ATTACHMENT_CAMERA(LABELS.CHANNEL_INPUT_ATTACHMENT_CAMERA) is replaced with LABELS.CHANNEL_INPUT_ATTACHMENT_CAMERA_PHOTO and LABELS.CHANNEL_INPUT_ATTACHMENT_CAMERA_VIDEO
    • GROUP_CHANNEL.DIALOG_ATTACHMENT_PHOTO_LIBRARY is replaced with LABELS.CHANNEL_INPUT_ATTACHMENT_PHOTO_LIBRARY
    • GROUP_CHANNEL.DIALOG_ATTACHMENT_FILES is replaced with LABELS.CHANNEL_INPUT_ATTACHMENT_FILES
    • GROUP_CHANNEL.INPUT_PLACEHOLDER_ACTIVE is replaced with LABELS.CHANNEL_INPUT_PLACEHOLDER_ACTIVE
    • GROUP_CHANNEL.INPUT_PLACEHOLDER_DISABLED is replaced with LABELS.CHANNEL_INPUT_PLACEHOLDER_DISABLED
    • GROUP_CHANNEL.INPUT_PLACEHOLDER_MUTED is replaced with LABELS.CHANNEL_INPUT_PLACEHOLDER_MUTED
    • GROUP_CHANNEL.INPUT_EDIT_OK is replaced with LABELS.CHANNEL_INPUT_EDIT_OK
    • GROUP_CHANNEL.INPUT_EDIT_CANCEL is replaced with LABELS.CHANNEL_INPUT_EDIT_CANCEL
    • GROUP_CHANNEL_MEMBERS.USER_BAR_ME_POSTFIX is replaced with LABELS.USER_BAR_ME_POSTFIX
    • GROUP_CHANNEL_MEMBERS.USER_BAR_OPERATOR is replaced with LABELS.USER_BAR_OPERATOR
  • Theme

    • Messsage in colors is replaced with GroupChannelMessage (colors.ui.message -> colors.ui.groupChannelMessage)

Components

  • GroupChannelFragment(GroupChannelProps),

    • In order to specify the local cache as mandatory, the queryCreator prop has been removed.
  • ChannelMessageList (GroupChannelProps, OpenChannelProps)

    • onPressImageMessage prop is replaced with onPressMediaMessage
    • onLeaveScrollBottom prop is replaced with onScrolledAwayFromBottom
    • onPressAvatar prop is replaced with onShowUserProfile
  • ChannelInput (GroupChannelProps, OpenChannelProps)

    • onSendFileMessage prop is replaced with onPressSendUserMessage
    • onSendUserMessage prop is replaced with onPressSendUserMessage
    • onUpdateFileMessage prop is replaced with onPressUpdateUserMessage
    • onUpdateUserMessage prop is replaced with onPressUpdateFileMessage
  • GroupChannelListFragment(GroupChannelListProps)

    • In order to specify the local cache as mandatory, the queryCreator prop has been removed.
    • renderGroupChannelPreview has been changed from (channel: SendbirdGroupChannel, onLongPressChannel: () => void) => React.ReactElement | null to (props: { channel: SendbirdGroupChannel; onPress: () => void; onLongPress: () => void; }) => React.ReactElement | null.
  • MessageRenderer component is replaced with GroupChannelMessageRenderer

Hooks

  • useGroupChannelMessages, useOpenChannelMessages
    • nextMessages and newMessagesFromMembers properties are replaced with newMessages

Changelogs

⚠ BREAKING CHANGES

  • update signature of channel preview prop in group channel list and open channel list
  • removed queryCreator from the group channel and group channel list
  • update minimum chat sdk version
  • bumped peer dependency version of chat sdk
  • react-native minimum version changed to 0.65.0 from 0.63.3
  • made chatOptions.localCacheStorage of SendbirdUIKitContainer required
  • deprecated item removal in foundation package
  • deprecated item removal in ChannelInput
  • deprecated MessageRenderer removal (replaced to GroupChannelMessageRenderer)
  • deprecated item removal in ChannelMessageList
  • deprecated item removal in uikit-chat-hooks package
  • deprecated item removal in StringSet

Features

  • added AttachmentsButton to ChannelInput component (687f3a0)
  • bumped peer dependency version of chat sdk (a57aff0)
  • deprecated item removal in ChannelInput (6a326ca)
  • deprecated item removal in ChannelMessageList (3a68a33)
  • deprecated item removal in foundation package (96f9717)
  • deprecated item removal in StringSet (956236b)
  • deprecated item removal in uikit-chat-hooks package (48fabfe)
  • deprecated MessageRenderer removal (replaced to GroupChannelMessageRenderer) (488e0b6)
  • hide ui elements when the channel is ephemeral (eacc2da)
  • made chatOptions.localCacheStorage of SendbirdUIKitContainer required (2f07d0d)
  • react-native minimum version changed to 0.65.0 from 0.63.3 (39a9852)
  • support options for default user profile(default: false) (6671a61)
  • support options for ogtag in channel (d80b8a0)
  • update minimum chat sdk version (5330d1f)
  • use uikitWithAppInfo internally (a182ead)

Bug Fixes

  • ensure correct display of reply messages when replyType is configured in uikit configs (a00b089)
  • fixed config linking in mention manager (6e8ba6c)
  • fixed menuItemsCreator timing (279fd98)
  • fixed onPress related handlers in message renderer for proper functionality (6da20db)
  • focusing animation of message search results has been modified to apply only to the message component (c5d22a2)
  • foundation: fixed slight cropping at the bottom of images in AvatarGroup (76ccadf)
  • replaced unsupported Object.hasOwn (f165273)

Miscellaneous Chores

  • removed queryCreator from the group channel and group channel list (ca3bc98)
  • update signature of channel preview prop in group channel list and open channel list (d3e8afa)

Improvements

  • defensively modify reducer logic to prevent duplicate objects (bc3cfb1)
  • modify useGroupChannel and useOpenChannel hooks to refetch the channel when the url has changed (5b8e105)
  • react-native-scrollview-enhancer handle as a optional (d570851)