Skip to content

Releases: GetStream/stream-chat-react-native

[2.0.0-beta.0] 2020-10-14

15 Oct 11:33

Choose a tag to compare

Pre-release

Upgrade

Please check Upgrade Docs for complete summary of upgrading from 0.x.x to 2.x.x

Changelog

BREAKING CHANGES

Typescript

This library has been moved to full typescript. Please check Typescript doc for details

Component prop changes

Channel

  • add additionalKeyboardAvoidingViewProps prop to allow custom keyboard props

ChannelListMessenger

  • remove setActiveChannel prop

ChannelPreviewMessenger

  • renamed the latestMessage prop to latestMessagePreview. This name change is more semantic to what the prop does and reduces confusion with the lastMessage prop

MessageContent

  • removed retrySendMessage prop in favor of retrySendMessage within MessagesContext

MessageInput

  • remove parent prop to parent_id as it needs to be just an id string instead of the entire parent object
  • add setInputRef prop to actually allow forwarding of the TextInput ref controls

MessageSystem

  • add formatDate prop to allow custom date formatting

ChannelContext

  • We have split the ChannelContext into three separate contexts to further modularize the code and reduce renders as items in context change. The following contexts now contain the following values, previously all held within the ChannelContext:

    • ChannelContext:

      • channel
      • disabled
      • EmptyStateIndicator
      • error
      • eventHistory
      • lastRead
      • loading
      • LoadingIndicator
      • markRead
      • members
      • read
      • setLastRead
      • typing
      • watcherCount
      • watchers
    • MessagesContext

      • Attachment
      • clearEditingState
      • editing
      • editMessage
      • emojiData
      • hasMore
      • loadingMore
      • loadMore
      • Message
      • messages
      • removeMessage
      • retrySendMessage
      • sendMessage
      • setEditingState
      • updateMessage
    • ThreadContext

      • closeThread
      • loadMoreThread
      • openThread
      • thread
      • threadHasMore
      • threadLoadingMore
      • threadMessages
  • All contexts are exported and any values can be accessed through a higher order component (ex: withMessagesContext) or with one of our custom context hooks (ex: access MessagesContext by const { messages } = useMessagesContext();).

[1.3.4] 2020-10-13

15 Oct 10:55

Choose a tag to compare

  • Fixing keyboard glitch functionality for android a7f94b9

[1.3.3] 2020-10-05

15 Oct 10:54

Choose a tag to compare

  • Fixing retry upload functionality e89b87f

[1.3.2] 2020-10-02

02 Oct 08:41

Choose a tag to compare

  • SuggestionsList (for user-mentions feature in MessageInput) doesn't update the position as per keyboard position. For the time being, we have fixed this by dismissing the suggestions list when keyboard gets dismissed - 0fdff4f

  • Exported IconBadge and IconSquare components, to fix the tutorial f1b6a39

  • Added file size to file attachment 7e653a4

[1.3.0] 2020-09-25

25 Sep 13:57

Choose a tag to compare

BREAKING CHANGES

MessageInput

  • Replaced the default image picker react-native-image-picker for react-native-image-crop-picker and added compressImageQuality prop to support image compression out-of-the-box
  • Added FileUploadPreview and ImageUploadPreview props to support custom overrides to those components

KeyboardCompatibleView and Channel component

Implementation of internal KeyboardCompatibleView has been changed so as to make animations smoother and fix existing issues with keyboard behavior.
Support for following props have been dropped from Channel and KeyboardCompatibleView

  • keyboardDismissAnimationDuration
  • keyboardOpenAnimationDuration

Following new props have been introduced on Channel component. They are the same props accepted by KeyboardAvoidingView of react-native.

  • keyboardBehavior ['height' | 'position' | 'padding']
  • keyboardVerticalOffset

ChannelList

  • We converted the ChannelList component from a class to a function and abstracted the event listener logic into custom hooks. The default event handlers can still be overridden by providing custom prop functions to the ChannelList component. Custom logic can be provided for the following events:

    • onAddedToChannel overrides notification.added_to_channel default
    • onChannelDeleted overrides channel.deleted default
    • onChannelHidden overrides channel.hidden default
    • onChannelTruncated overrides channel.truncated default
    • onChannelUpdated overrides channel.updated default
    • onMessageNew overrides notification.message_new default
    • onRemovedFromChannel overrides notification.removed_from_channel default
  • All custom event handlers now accept two arguments, with the this reference no longer needed in the functional component.

    • 1st argument: setChannels reference to the useState hook that sets the channels in the React Native FlatList
    • 2nd argument: event object returned by the StreamChat instance

e.g.,

// In following example we will override the default handler for notification.added_to_channel
<ChannelList
  filters={}
  onAddedToChannel={(setChannels, event) => {
    setChannels(channels => {
      // Do additional actions on channels array.
      return channels;
    })
  }}
>
  • On upgrading to this release, ensure events and any custom handling functions (ex: onAddedToChannel or onMessageNew) are properly processed and update the list UI as expected.

FileUploadPreview

  • We fixed a bug for being unable to remove a file from the MessageInput and made it consistent to ImageUploadPreview
  • We have removed support for the fileUploadPreview.dismissText theme value
  • We have added support for fileUploadPreview.dismiss, fileUploadPreview.dismissImage, and fileUploadPreview.imageContainer theme values

Deprecated Props

  • We have removed support for the MessageList component's onMessageTouch prop. Please use the onPress prop on the MessageSimple component to perform an action on touch of a message.

  • We have removed support for the Message component's readOnly prop. Please use the disabled value from the ChannelContext instead.

  • We have also dropped support for the following MessageList props:

    • dateSeparator (use DateSeparator instead)
    • headerComponent (use HeaderComponent instead)

this Reference Removal

  • We have removed the this class component reference from the prop functions in MessageSimple. For example, if you wish to override the SDK's standard long press behavior on a message, the onLongPress function passed in to MessageSimple no longer takes the this component reference as it's first argument. The message and the event object become the first and second arguments, respectively.

renderText Function

  • The renderText function utilized in the MessageTextContainer component now accepts a single object containing markdownRules, markdownStyles, and message. Previously each value was a separate function parameter.

[1.2.0] 2020-08-21

21 Aug 13:37

Choose a tag to compare

NO BREAKING CHANGES

  • Following components have been converted to functional component from class based component.

    • Chat
    • KeyboardCompatibleView
    • SuggestionsProvider
    • AutoCompleteInput
    • Spinner
  • So far we exported bundled/transpiled version of components from package as single file - dist/index.js, dist/index.es using rollup. But now we are moving away from this approach and instead distributing original source of components since react-native handles bundling/transpiling part anyways. This also makes it easy for end-users to debug components exported from stream-chat-react-native.

[1.1.1] 2020-08-03

03 Aug 16:12

Choose a tag to compare

[1.1.0] 2020-07-31

31 Jul 20:59

Choose a tag to compare

  • Fixed exports of MessageStatus, MessageContent, MessageAvatar, MessageTextContainer components #268

  • Moving following components to functional components

    • ChannelPreview
    • ChannelPreviewMessenger
    • Attachment
    • Card
    • FileAttachment
    • EmptyStateIndicator, LoadingIndicator, LoadingErrorIndicator
  • Decoupled actionsheet from MessageInput component 59618ad

[1.0.0] 2020-07-29

29 Jul 16:05

Choose a tag to compare

We've already been on a v1 release for a while but never updated our versioning. Right now we're in the process of rewriting our components to be more future proof and we started using hooks, hence the v1.0.0 today.

Breaking change: stream-chat-react-native now relies on hooks and will need react-native >= 0.59.0 to work

Rewrite will involve following changes:

  1. Functional components instead of class based components
  2. Static typing using typescript
  3. UI tests

We are going to increamentally implement these changes and will try to keep everything backwards compatible unless really necessary.

[0.15.2] 2020-07-29

29 Jul 16:05

Choose a tag to compare

  • Exporting AutoCompleteInput component d41d0d5