You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docusaurus/docs/reactnative/basics/migrating-from-5.x-to-6.x.mdx
+77-8Lines changed: 77 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ title: Migration from 5.x to 6.x
7
7
v6.0 is supported on React native version **0.72** and above.
8
8
:::
9
9
10
-
## Changes
10
+
## Dependency changes
11
11
12
12
The following are the crucial changes of the Stream Chat React Native SDK from version 5.x to 6.x:
13
13
14
-
### Change `react-native-fs` to `react-native-blob-util`
14
+
####Change `react-native-fs` to `react-native-blob-util`
15
15
16
16
The `react-native-fs` package has been replaced to `react-native-blob-util` in favour of the former not being actively maintained. You can replace it by running the following commands:
17
17
@@ -20,7 +20,7 @@ yarn remove react-native-fs
20
20
yarn add react-native-blob-util
21
21
```
22
22
23
-
### Change `react-native-image-resizer` to `@bam.tech/react-native-image-resizer`
23
+
####Change `react-native-image-resizer` to `@bam.tech/react-native-image-resizer`
24
24
25
25
The `react-native-image-resizer` package has been replaced with `@bam.tech/react-native-image-resizer`.
### Change `react-native-image-crop-picker` to `react-native-image-picker`
36
+
####Change `react-native-image-crop-picker` to `react-native-image-picker`
37
37
38
38
The `react-native-image-crop-picker` package has been replaced with `react-native-image-picker`. This is a better alternative, and can help us with our new architecture endeavors.
Also, the dependency is made optional now, so if you don't want to use the image picker, you can remove it from your project and the camera selector icon on the Attachment picker will be simply hidden for you.
48
48
49
-
### Change `react-native-quick-sqlite` to `op-sqlite`
49
+
####Change `react-native-quick-sqlite` to `op-sqlite`
50
50
51
51
The `react-native-quick-sqlite` package has been replaced with `op-sqlite`. This is a faster alternative, and can help us with our new architecture endeavors.
### Remove the usage of `@stream-io/flat-list-mvcp`
60
+
####Remove the usage of `@stream-io/flat-list-mvcp`
61
61
62
62
The dependency on `@stream-io/flat-list-mvcp` package has been removed in favour of React Native's [`FlatList`](https://reactnative.dev/docs/flatlist) component supporting [`maintainVisibleContentPosition`](https://reactnative.dev/docs/scrollview#maintainvisiblecontentposition) from React Native version `>=0.72`. You can replace it by using the `FlatList` component directly.
63
63
@@ -78,7 +78,68 @@ registerNativeHandlers({
78
78
79
79
This also involves not passing the `FlatList` component as a handler to [`registerNativeHandlers`](../customization/native-handlers.mdx#overriding-handlers) anymore.
80
80
81
-
### Remove `NetInfo` from the native handlers
81
+
## SDK changes
82
+
83
+
#### Introduce new Message Menu design
84
+
85
+
The Message Menu design has been revamped to provide a better user experience. The new design is more intuitive and provides a better user experience.
The previous overlay design has been replaced with a bottom sheet modal design.
91
+
:::
92
+
93
+
#### Removed `MessageOverlayContext` and `MessageOverlayProvider`
94
+
95
+
The `MessageOverlayContext` and `MessageOverlayProvider` have been removed.
96
+
97
+
#### Removed props from `OverlayProvider`
98
+
99
+
The following props have been removed from the `OverlayProvider`:
100
+
101
+
-`MessageActionList`
102
+
-`MessageActionListItem`
103
+
-`OverlayReactions`
104
+
-`OverlayReactionsAvatar`
105
+
-`OverlayReactionsItem`
106
+
-`messageTextNumberOfLines`
107
+
-`error`, `isMyMessage`, `isThreadMessage`, `message` and `messageReactions`
108
+
109
+
#### New `Channel` props
110
+
111
+
The props from the `OverlayProvider` have been moved to the `Channel` component. The following props have been added to the `Channel` component:
112
+
113
+
-`MessageActionList`
114
+
-`MessageActionListItem`
115
+
-`OverlayReactions` is changed to `MessageUserReactions`
116
+
-`OverlayReactionsAvatar` is changed to `MessageUserReactionsAvatar`
117
+
-`OverlayReactionsItem` is changed to `MessageUserReactionsItem`
118
+
-`messageTextNumberOfLines`
119
+
120
+
#### Removed `MessageOverlay` in favour of `MessageMenu`.
121
+
122
+
The `MessageOverlay` component has been removed in favour of `MessageMenu`. The `MessageMenu` component is a more versatile and feature-rich component that can be used to show more than just reactions and actions.
123
+
124
+
The `MessageOverlay` component is removed from top level `OverlayProvider` and is replaced with `MessageMenu` in the level of the `Message` component.
125
+
126
+
#### Remove prop from `Message` component.
127
+
128
+
The following props have been removed from the `Message` component:
129
+
130
+
-`setData`
131
+
-`setOverlay`
132
+
-`onLongPress`
133
+
-`onPress`
134
+
-`onPressIn`
135
+
136
+
The later 3 props are removed in favour of similar props on MessagesContext and is therefore not needed. The `setData` prop is removed in favour of the removal of `MessageOverlayContext` and the `setOverlay` is not needed as we don't set the message overlay in `OverlayProvider`.
137
+
138
+
#### Added `BottomSheetModal` component
139
+
140
+
The version introduces a very basic `BottomSheetModal` component that can be used to show a modal at the bottom of the screen. This can be used to show the message actions and reactions.
141
+
142
+
#### Remove `NetInfo` from the native handlers
82
143
83
144
The `NetInfo` package has been removed from the native handlers. This also involves not passing the `NetInfo` utility as a handler to [`registerNativeHandlers`](../customization/native-handlers.mdx#overriding-handlers) anymore.
84
145
@@ -91,6 +152,14 @@ registerNativeHandlers({
91
152
});
92
153
```
93
154
94
-
### Change the type of `quotedMessage` in `MessageInputContext`
155
+
####Change the type of `quotedMessage` in `MessageInputContext`
95
156
96
157
The type of `quotedMessage` is changed from `MessageType | boolean` to `MessageType | undefined` for better in the `MessageInputContext`.
158
+
159
+
## Other changes
160
+
161
+
- The `useMessageActions` hook doesn't take `setOverlay` anymore but takes in `dismissOverlay`.
162
+
- The MessageContext has a new prop - `dismissOverlay`. The definition of `showMessageOverlay` is changed to `(showMessageReactions?: boolean) => void`.
163
+
- The `isMessageActionsVisible` is changed to `showMessageReactions` in `messageAction.ts`.
164
+
- Removed the `useMessageActionAnimation` hook.
165
+
- Removed `alignment` prop from `MessagePinnedHeader` component.
Copy file name to clipboardExpand all lines: docusaurus/docs/reactnative/basics/navigation.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem';
8
8
9
9
Stream Chat for React Native provides many features out of the box that require positioning the components on the screen in a certain manner to get the desired UI.
10
10
11
-
The `AttachmentPicker`, `ImageGallery`, and`MessageOverlay`, all need to be rendered in front of other components to have the desired effect. All of these elements are controlled by the `OverlayProvider`. When used together with navigation, certain steps are needed to be taken to make these components appear fluently.
11
+
The `AttachmentPicker` and`ImageGallery`, all need to be rendered in front of other components to have the desired effect. All of these elements are controlled by the `OverlayProvider`. When used together with navigation, certain steps are needed to be taken to make these components appear fluently.
12
12
13
13
The guidance provided makes the assumption you are using [React Navigation](https://reactnavigation.org/) in your app in conjunction with [`createStackNavigator`](https://reactnavigation.org/docs/stack-navigator/).
Copy file name to clipboardExpand all lines: docusaurus/docs/reactnative/basics/troubleshooting.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ To do this make sure your `Channel` components are always aware of the thread st
79
79
80
80
## Image gallery not full screen
81
81
82
-
If the image viewer or message overlay is not covering the full screen, for instance it is rendering below or behind a Header, it is likely the `OverlayProvider` is not setup in the correct location within the application.
82
+
If the image viewer or message menu is not covering the full screen, for instance it is rendering below or behind a Header, it is likely the `OverlayProvider` is not setup in the correct location within the application.
83
83
Please refer to the [Stream Chat with Navigation](./navigation.mdx) documentation to properly place the `OverlayProvider` in relation to your navigation solution or other components.
84
84
85
85
## Image picker incorrect height
@@ -295,7 +295,7 @@ This includes ensuring you import `react-native-gesture-handler` at the top of y
295
295
import'react-native-gesture-handler';
296
296
```
297
297
298
-
Also do not forget to wrap your component tree(probably above `OverlayProvider`) with `<GestureHandlerRootView>` or `gestureHandlerRootHOC` as mentioned in [RNGH Installation docs](https://docs.swmansion.com/react-native-gesture-handler/docs/installation#js). Not doing so, can cause unusual behaviour with the `MessageOverlay` and `Imagegallery` gestures.
298
+
Also do not forget to wrap your component tree(probably above `OverlayProvider`) with `<GestureHandlerRootView>` or `gestureHandlerRootHOC` as mentioned in [RNGH Installation docs](https://docs.swmansion.com/react-native-gesture-handler/docs/installation#js). Not doing so, can cause unusual behaviour with the `Imagegallery` gestures.
0 commit comments