Skip to content

Commit e5f11ee

Browse files
Updating changelog
1 parent 40e49c1 commit e5f11ee

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

CHANGELOG.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,26 @@
44

55
**BREAKING CHANGES**
66

7-
*ChannelList*
7+
## MessageInput
8+
9+
- Replaced the default image picker [react-native-image-picker](https://github.com/react-native-community/react-native-image-picker) for [react-native-image-crop-picker](https://github.com/ivpusic/react-native-image-crop-picker) and added `compressImageQuality` prop to support image compression out-of-the-box
10+
- Added `FileUploadPreview` and `ImageUploadPreview` props to support custom overrides to those components
11+
12+
## KeyboardCompatibleView and Channel component
13+
14+
Implementation of internal KeyboardCompatibleView has been changed so as to make animations smoother and fix existing issues with keyboard behavior.
15+
Support for following props have been dropped from Channel and KeyboardCompatibleView
16+
17+
- keyboardDismissAnimationDuration
18+
- keyboardOpenAnimationDuration
19+
20+
Following new props have been introduced on `Channel` component. They are the same props accepted by KeyboardAvoidingView of react-native.
21+
22+
- keyboardBehavior ['height' | 'position' | 'padding']
23+
- keyboardVerticalOffset
24+
25+
26+
## ChannelList
827

928
- 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:
1029

@@ -21,34 +40,43 @@
2140
- 1st argument: `setChannels` reference to the `useState` hook that sets the `channels` in the React Native FlatList
2241
- 2nd argument: `event` object returned by the StreamChat instance
2342

43+
e.g.,
44+
45+
```js
46+
// In following example we will override the default handler for notification.added_to_channel
47+
<ChannelList
48+
filters={}
49+
onAddedToChannel={(setChannels, event) => {
50+
setChannels(channels => {
51+
// Do additional actions on channels array.
52+
return channels;
53+
})
54+
}}
55+
>
56+
```
2457
- 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.
2558

26-
*FileUploadPreview*
59+
## FileUploadPreview
2760

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

32-
*MessageInput*
33-
34-
- We replaced the default image picker [react-native-image-picker](https://github.com/react-native-community/react-native-image-picker) for [react-native-image-crop-picker](https://github.com/ivpusic/react-native-image-crop-picker) and added `compressImageQuality` prop to support image compression out-of-the-box
35-
- Added `FileUploadPreview` and `ImageUploadPreview` props to support custom overrides to those components
36-
37-
*Deprecated Props*
65+
## Deprecated Props
3866

39-
- We have removed support for the `MessageList` component's `onMessageTouch` prop. Since this prop no longer exists, we have also removed `dismissKeyboardOnMessageTouch`. Please use the `onPress` prop on the `MessageSimple` component to perform an action on touch of a message.
67+
- 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.
4068

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

4371
- We have also dropped support for the following `MessageList` props:
4472
- `dateSeparator` (use DateSeparator instead)
4573
- `headerComponent` (use HeaderComponent instead)
4674

47-
*this Reference Removal*
75+
## this Reference Removal
4876

4977
- 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.
5078

51-
*renderText Function*
79+
## renderText Function
5280

5381
- 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.
5482

0 commit comments

Comments
 (0)