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
feat: new reaction list design and improvements to MessageSimple component (#2700)
* feat: add new message action list and reaction selector UI
* fix: remove unnecessary props from OverlayContext
* docs: add comments for the props
* tests: add tests for the components
* tests: add tests for the components
* fix: chat.test.ts
* fix: chat.test.ts
* fix: add tests for the code
* fix: use rn animated to create new modal and add docs
* fix: add opacity for the message action list item when pressed
* fix: make modal better and change component names
* fix: update test snapdhots
* docs: message actions customizations
* docs: message actions customizations
* fix: theme improvements
* fix: message component render improvements
* docs: update migration guide
* feat: new reaction list design and improvements to MessageSimple component
* tests: add tests for the components
* docs: reaction list new design docs
* docs: add changes to migration guide
* docs: add changes to migration guide
* docs: add changes to migration guide
* chore: resolve conflicts from base branch
* chore: resolve conflicts from base branch
* fix: sample app overlay backdrop bug
* fix: reaction list type
* feat: add FlatList for Reaction Picker
* feat: add FlatList for Reaction Picker
* feat: add FlatList for Reaction Picker
You can switch to `bottom` reaction list design by setting the [`reactionListPosition`](../core-components/channel.mdx#reactionlistposition) prop to `bottom` in the `Channel` component. The Reaction list component can be completely customized by providing a custom component to the [`ReactionListTop`](../core-components/channel.mdx#reactionlisttop) prop in the `Channel` component for top reactions list and [`ReactionListBottom`](../core-components/channel.mdx#reactionlistbottom) prop for bottom reactions list. The default mode is `top` as it was in the previous version.
100
+
93
101
#### Remove `StreamChatRN` and introduce `ChatConfigContext`
94
102
95
103
The `StreamChatRN` global config is removed in favour of the `ChatConfigContext`. The `ChatConfigContext` is a more versatile and feature-rich context that can be used to provide any global configuration to the chat application.
@@ -153,7 +161,7 @@ The `MessageOverlay` component has been removed in favour of `MessageMenu`. The
153
161
154
162
The `MessageOverlay` component is removed from top level `OverlayProvider` and is replaced with `MessageMenu` in the level of the `Message` component.
155
163
156
-
#### Remove prop from `Message` component.
164
+
#### Remove props from `Message` component.
157
165
158
166
The following props have been removed from the `Message` component:
159
167
@@ -165,6 +173,23 @@ The following props have been removed from the `Message` component:
165
173
166
174
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`.
167
175
176
+
#### Removed props from `MessageContent` component
177
+
178
+
The following props have been removed from the `MessageContent` component:
179
+
180
+
-`hasReactions`, `lastGroupMessage`, `members`, `onlyEmojis`, `showMessageStatus` imported from the Message Context.
181
+
-`addtionalTouchableProps` is changed to `additionalPressableProps`.
182
+
-`MessageFooter`, `MessageHeader`, `MessageDeleted`, `MessagePinnedHeader`, `MessageReplies`, `MessageStatus`, `onPressInMessage` imported from the Messages Context.
183
+
184
+
The props were redundant as per the new fixes in the Reaction Design and message simple component's improvements.
185
+
186
+
#### Add props to `MessageSimple` component
187
+
188
+
The components from the `MessageContent` components are rendered now in `MessageSimple` component so few of the props that were removed from `MessageContent` are added to `MessageSimple` component(as mentioned above).
189
+
190
+
-`isMyMessage`, `lastGroupMessage`, `members`, `onlyEmojis`, `otherAttachments`, `showMessageStatus` imported from the Message Context.
191
+
-`MessageDeleted`, `MessageFooter`, `MessageHeader`, `MessagePinnedHeader`, `MessageReplies`, `MessageStatus`, `ReactionListBottom`, `reactionListPosition` and `ReactionListTop` imported from the Messages Context.
192
+
168
193
#### Added `BottomSheetModal` component
169
194
170
195
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.
@@ -186,6 +211,10 @@ registerNativeHandlers({
186
211
187
212
The type of `quotedMessage` is changed from `MessageType | boolean` to `MessageType | undefined` for better in the `MessageInputContext`.
188
213
214
+
#### Refactor of theme object
215
+
216
+
The default theme object has been refactored to provide a better customization experience. The theme object is now more organized and provides better control over the customization. You can check the object [here](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/contexts/themeContext/utils/theme.ts).
217
+
189
218
#### Remove the deprecated code
190
219
191
220
- We have removed `loadChannelAtMessage` from channel context because it was no more used.
Function to handle a reaction on a message. This function is called when a user reacts to a message. The function is passed the message ID, the reaction type, and the user ID of the user who reacted to the message. The function should update the message with the reaction and update the message in the message context.
Additional props provided to the underlying [Pressable](https://reactnative.dev/docs/pressable#props) used by components within a message such as [`MessageContent`](../../../../ui-components/message-content.mdx).
0 commit comments