Skip to content

Releases: GetStream/stream-chat-react-native

[3.2.0] (2021-03-23)

23 Mar 21:43
Compare
Choose a tag to compare

🛑 BREAKING

  • Minimum required stream-chat version is 3.5.1.
  • Following values have been moved from MessagesContext a separate context - PaginatedMessageListContext
    • hasMore
    • messages
    • loadMore
    • loadMoreRecent
    • loadMoreThread
    • loadingMore
    • loadingMoreRecent

Non breaking:

Websocket and Push

From this release when app goes to background, websocket connection will be dropped by default.
This is necessary to allow push notifications.

We only send push notification, when user doesn't have any active websocket connection (which is established when you call client.connectUser). When your app goes to background, your device will keep the ws connection alive for around 15-20 seconds, and so within this period you won't receive any push notification. Until now, it was upto end user to drop the connection by explicitly calling client.closeConnection() or client.wsConnection.disconnect(), when app goes to background.
But from this release, we have moved this functionality to OOTB.

  • If you don't have push system configured for your application, you can disable this functionality by adding a prop on Chat component - closeConnectionOnBackground={false}
  • As described earlier, please make sure you are on stream-chat >= 3.5.1

Other

  • Allow use of Channel component with uninitialized channel
  • Allow custom config of i18next config
  • UI fixes and animation improvements for reactions

[3.1.2] (2021-02-17)

17 Mar 16:46
Compare
Choose a tag to compare

NO CODE CHANGE

Fixed versioning in version.json during package publishing, which we use to track the version of RN sdk through
client.setUserAgent call.

[3.1.1] (2021-02-17)

17 Mar 16:45
Compare
Choose a tag to compare

Fixed type definition pointers in package.json

[3.1.0] (2021-03-15)

15 Mar 13:38
Compare
Choose a tag to compare
  • 🛑 BREAKING: Removed a prop handleOnPress on Input component.

  • Added support for new props on Input component, which can be used on Channel component as prop to replace undelying input component (reference)

    • closeAttachmentPicker (function)
    • openAttachmentPicker (function)
    • openCommandsPicker (function)
    • toggleAttachmentPicker (function)
  • Added support for new prop on Channel component - InputButtons, to replace the extra buttons on the left on input box #536

  • Added support for messageActions prop as callback. Also added support for prop messageActions on Channel component #548
    Earlier you could override messageActions prop as following:

    <Channel
      messageActions=[
        {
          action: () => { /** Some message action logic */ };
          title: "Pin Message";
          icon: PinIcon;
          titleStyle: {};
        },
        {
          action: () => { /** Some message action logic */ };
          title: "Delete Message";
          icon: PinIcon;
          titleStyle: {};
        }
      ]
    >
      {/** MessageList and MessageInput component here */}
    </Channel>

    But now, you can selectly keep certain action and remove some:

    /** Lets say you only want to keep threadReply and copyMessage actions */
    <Channel
      messageActions={({
        blockUser,
        copyMessage,
        deleteMessage,
        editMessage,
        flagMessage,
        muteUser,
        reply,
        retry,
        threadReply,
      }) => ([
        threadReply, copyMessage
      ])}
    >
      {/** MessageList and MessageInput component here */}
    </Channel>
  • Issue fix: make OverlayReactions customizable through props. c7a83b8

  • Issue fix: Image upload for expo and assets-library 5a2d0e8

  • Issue fix: Compatibility with jest as described in #508 a172c15

[3.0.0] 2021-02-23

23 Feb 19:42
Compare
Choose a tag to compare

Version 3.x is a major revamp of the SDK and comes with many breaking changes. The new implementation takes advantage of React Context along with many popular community libraries such as Reanimated V2 to deliver a superior chat experience. Upgrading will require re-implementing your integration but will yield performance and functional benefits. It is highly recommended you read the Cookbook and examine the SampleApp / TypeScriptMessaging apps before upgrading to understand what is required.

New features

  • Modern UX around reaction picker functionality, similar to iMessage
  • Inline replies
  • "Also send to channel" option on Threads
  • In app attachment picker
  • Improved avatars for grouped channels.
  • Rich image viewers with options to share the image outside the app, or view the image in gallery view.
  • "Copy Message" action as part of message actions.

Improvements

  • In previous versions, we did a lot of prop drilling throughout component trees, which makes it quite hard for end user to decide exactly where to set a particular prop. We have tried to centralize component customization on following three higher order components:

    • OverlayProvider
    • ChannelList
    • Channel

    We have prepared a visual guide to help you with component customizations - Guide

  • In v2.x.x, we decided to move away from class based components, towards functional components along with react hooks. React hooks are definitely a big addition to react eco-system, but when not careful it has potential to hammer the performance. We have handled all these issues as part of v3.0.0 using careful revamp around all the contexts and memoizations, which improves the app performance by a great margin.

  • We have decided to abondon styled-components, are decided to have our own implementation

    • Removed dot notation for theming applications
    • Removed css string notation for styles on theme
    • Added displayName to components with bracket notation denoting the theme path e.g. MessageStatus.displayName = 'MessageStatus{message{status}}'; indicates the theme path would be modified via const customTheme: DeepPartial<Theme> = { message: { status: { ...customizations } } }. Please check our theme docs for more details.

Dependency changes:

Please find detailed docs about this release in our wiki

Note for Expo

  • As of this release, expo is on version 40 which uses a version of React Native with a bug in the Dimensions API that occurs upon reloading an app in the simulator. Version 3.x uses relative sizing widely and depends on this API so issues will be visible in Expo until they update the custom React Native version they ship.

  • [Android] As part of this release, we implemented a new feature - inline replies, similar to whatsapp. Bi-directional scrolling/pagination was necessary for this feature. To keep smooth scrolling experience, we implemented our own solution for react-native. Although, Expo being close-source project, we can't do any such thing for Expo. So inline reply feature is not recommended to use in Expo, since you will not have a good scroll experience on Android, while scrolling down in message list.

[3.0.0-beta.2] 2021-02-17

17 Feb 15:30
Compare
Choose a tag to compare
Pre-release

Please find detailed docs about this release in our wiki

Version 3.x is a major revamp of the SDK and comes with many breaking changes. The new implementation takes advantage of React Context along with many popular community libraries such as Reanimated V2 to deliver a superior chat experience. Upgrading will require re-implementing your integration but will yield performance and functional benefits. It is highly recommended you read the Cookbook and examine the SampleApp / TypeScriptMessaging apps before upgrading to understand what is required.

NOTE: As of release expo is on version 40 which uses a version of React Native with a bug in the Dimensions API that occurs upon reloading an app in the simulator. Version 3.x uses relative sizing widely and depends on this API so issues will be visible in Expo until they update the custom React Native version they ship.

[2.2.2] 2021-02-07

07 Feb 15:05
Compare
Choose a tag to compare

Handling the case of standlone Channel component (without ChannelList) on top of fix in v2.2.1 - ba7d744

[2.2.1] 2021-02-03

03 Feb 16:51
Compare
Choose a tag to compare

For push notifications, we usually recommend users to disconnect websocket when app goes to background and reconnect when app comes to foreground. But channel list UI doesn't update properly once the ws is re-connected. This issue has been fixed in this commit 8a35e50

[2.2.0] 2021-02-02

02 Feb 16:30
Compare
Choose a tag to compare

Switched to react-native-markdown-package for markdown of message text #505

[2.1.4] 2021-01-29

29 Jan 12:30
Compare
Choose a tag to compare

Fixed broken re-send message functionality, upon failure b3c028f