@@ -3,25 +3,30 @@ id: upgrading-from-v3
33title : Upgrading from V3
44---
55
6+ import Tabs from ' @theme/Tabs' ;
7+ import TabItem from ' @theme/TabItem' ;
8+
69import pinMessageAction from ' ../assets/basics/upgrading-from-v3/pin_message_action.png' ;
710import pinnedMessage from ' ../assets/basics/upgrading-from-v3/pinned_message.png' ;
811import scrollViewWarning from ' ../assets/basics/upgrading-from-v3/scroll_view_warning.png' ;
912import slowMode from ' ../assets/basics/upgrading-from-v3/slow_mode.gif' ;
1013
14+ import galleryBefore1 from ' ../assets/basics/upgrading-from-v3/gallery_before_1.png' ;
15+ import galleryBefore2 from ' ../assets/basics/upgrading-from-v3/gallery_before_2.png' ;
16+ import galleryBefore3 from ' ../assets/basics/upgrading-from-v3/gallery_before_3.png' ;
17+ import galleryAfter1 from ' ../assets/basics/upgrading-from-v3/gallery_after_1.png' ;
18+ import galleryAfter2 from ' ../assets/basics/upgrading-from-v3/gallery_after_2.png' ;
19+ import galleryAfter3 from ' ../assets/basics/upgrading-from-v3/gallery_after_3.png' ;
20+
1121## Add a required ` threadList ` prop
1222
1323Add a ` threadList ` prop on ` Channel ` component which wraps the Thread component as following:
1424
1525(This change is only required if you use ` Thread ` component within your application. )
1626
1727``` tsx
18- <Channel
19- channel = { channel }
20- thread = { thread }
21- threadList
22- >
23- <Thread />
24- </View >
28+ <Channel channel = { channel } thread = { thread } threadList >
29+ <Thread />
2530</Channel >
2631```
2732
@@ -209,6 +214,78 @@ npx pod-install
209214
210215## Whats new in v4?
211216
217+ ### Optimized Image Attachments
218+
219+ [Gallery](../ui-components/gallery.mdx) component has been revamped to be more performant and more responsive.
220+ Heavy images have been one of the crucial reasons previously for slow performance on low end devices. In this version of SDK,
221+ we render resized version of images to avoid heavy load on memory.
222+
223+ Also previously all the image attachments used to be rendered in fixed size container, which was not ideal for portrait or landscape images since
224+ user won't be able to see a cropped image on UI. In this version, we render images in dynamic size container, depending on aspect ratio of image.
225+
226+ <Tabs
227+ defaultValue = ' case1'
228+ values = { [
229+ { label: ' Case 1' , value: ' case1' },
230+ { label: ' Case 2' , value: ' case2' },
231+ { label: ' Case 3' , value: ' case3' },
232+ ]}
233+ >
234+ <TabItem value = ' case1' >
235+
236+ <table >
237+ <tr >
238+ <td align = ' center' >Before</td >
239+ <td align = ' center' >After</td >
240+ </tr >
241+ <tr >
242+ <td align = ' center' width = ' 50%' >
243+ <img src = { galleryBefore1 } />
244+ </td >
245+ <td align = ' center' width = ' 50%' >
246+ <img src = { galleryAfter1 } />
247+ </td >
248+ </tr >
249+ </table >
250+
251+ </TabItem >
252+ <TabItem value = ' case2' >
253+
254+ <table >
255+ <tr >
256+ <td align = ' center' >Before</td >
257+ <td align = ' center' >After</td >
258+ </tr >
259+ <tr >
260+ <td align = ' center' width = ' 50%' >
261+ <img src = { galleryBefore2 } />
262+ </td >
263+ <td align = ' center' width = ' 50%' >
264+ <img src = { galleryAfter2 } />
265+ </td >
266+ </tr >
267+ </table >
268+
269+ </TabItem >
270+ <TabItem value = ' case3' >
271+ <table >
272+ <tr >
273+ <td align = ' center' >Before</td >
274+ <td align = ' center' >After</td >
275+ </tr >
276+ <tr >
277+ <td align = ' center' width = ' 50%' >
278+ <img src = { galleryBefore3 } />
279+ </td >
280+ <td align = ' center' width = ' 50%' >
281+ <img src = { galleryAfter3 } />
282+ </td >
283+ </tr >
284+ <tr ></tr >
285+ </table >
286+ </TabItem >
287+ </Tabs >
288+
212289### Slow Mode Feature
213290
214291Slow mode helps reduce noise on a channel by limiting users to a maximum of 1 message per cooldown interval.
@@ -269,6 +346,8 @@ You can override these capabilities on UI level by providing [`overrideOwnCapabi
269346
270347### UI/UX Changes and Performance Improvements
271348
349+ - Images will be rendered
350+
272351- Background for the overlay which opens up when user long-presses on a message, has been replaced with
273352 opacity based background instead of [BlurView](https://github.com/Kureev/react-native-blur) [#874](https://github.com/GetStream/stream-chat-react-native/pull/874)
274353 This dependency caused a lot of issues due to its underlying native [BlurView](https://github.com/Dimezis/BlurView) dependency.
@@ -287,18 +366,18 @@ You can override these capabilities on UI level by providing [`overrideOwnCapabi
287366
288367Following two new props on `Channel` componenent allows customizing UI for autocomplete suggestions list:
289368
290- - `AutoCompleteSuggestionHeader`
291- - `AutoCompleteSuggestionList`
292- - `AutoCompleteSuggestionItem`
369+ - [ `AutoCompleteSuggestionHeader`](../core-components/channel.mdx#autocompletesuggestionheader)
370+ - [ `AutoCompleteSuggestionList`](../core-components/channel.mdx#autocompletesuggestionlist)
371+ - [ `AutoCompleteSuggestionItem`](../core-components/channel.mdx#autocompletesuggestionitem)
293372
294373For details please read the docs on [Autocomplete Suggestions Customizations](../guides/auto_complete_suggestion_list_customizations.mdx)
295374
296375#### Message Actions
297376
298377Following two new props on `OverlayProvider` component allows customizing UI for message actions:
299378
300- - `MessageActionList`
301- - `MessageActionListItem`
379+ - [ `MessageActionList`](../core-components/overlay_provider.mdx#messageactionlist)
380+ - [ `MessageActionListItem`](../core-components/overlay_provider.mdx#messageactionlistitem)
302381
303382Additionally styles of the message actions can be customized using following new theme keys:
304383
@@ -329,6 +408,11 @@ This prop has following 4 possible values:
329408- `sender`: The deleted messages in the channel will only be visible to sender.
330409- `receiver`: The deleted messages in the channel will only be visible to receiver.
331410
411+ #### Overlay Reactions User Avatar
412+
413+ Avatar of users (shown in OverlayReactions component) who reacted to message, can now be customized
414+ using a prop on `OverlayProvide` component - [`OverlayReactionsAvatar`](../core-components/overlay_provider.mdx#overlayreactionsavatar).
415+
332416### Fixes Issues
333417
334418#### Warning about Virtualized List wrapped inside ScrollView
@@ -346,3 +430,24 @@ You can customize the truncation length of message text by providing a prop [`me
346430```tsx
347431<OverlayProvider messageTextNumberOfLines = { 300 } >{ /** child components */ } </OverlayProvider >
348432```
433+
434+ #### ChannelList ignores updated filters if api call is in progress
435+
436+ https://github.com/GetStream/stream-chat-react-native/issues/678
437+
438+ If the screen which creates the filter prop for ChannelList quickly renders two or more
439+ different filters, only the first filter will be fetched, with the subsequent filters
440+ being discarded. This results in a stale ChannelList until it is manually refreshed.
441+
442+ #### Failed messages can't be deleted
443+
444+ Delete action on failed message would result in error previously, which has been fixed in this release.
445+
446+ #### Mentioned users get removed after editing message
447+
448+ https://github.com/GetStream/stream-chat-react-native/issues/1023
449+
450+ #### Url parsing crashes the app when text contains special character
451+
452+ Application would crash if the message text contains special character and someone
453+ replies to the message. This has been fixed in this release.
0 commit comments