|
1 | 1 | # Changelog - v3
|
2 | 2 |
|
3 | 3 | ## [v3.6.7] (Aug 11 2023)
|
| 4 | +### Feats: |
| 5 | +* Added a new ImageGrid UI component (for internal use only) (#703) |
| 6 | + |
4 | 7 | ### Fixes:
|
5 |
| -* Removed duplicated getEmoji API call from the `useGetChannel` hook. (#705) |
6 |
| -* fix: Publish `SEND_MESSAGE_FAILED` event (#704) |
7 |
| - * Added handling for failure state in `sendbirdSelectors.getSendUserMessage` and publish the `SEND_MESSAGE_FAILED` event. |
8 |
| - * Fixed typo SEND_MESSAGEGE_FAILURE. |
| 8 | +* Removed duplicated getEmoji API call from the `useGetChannel` hook (#705). |
| 9 | +* Fixed missing `SEND_MESSAGE_FAILED` event publishing (#704): |
| 10 | + * Addressed the failure state in `sendbirdSelectors.getSendUserMessage` and published the `SEND_MESSAGE_FAILED` event. |
| 11 | + * Corrected typo `SEND_MESSAGEGE_FAILURE`. |
| 12 | + |
| 13 | +* Resolved an issue where the `allChannels` couldn't be updated due to state updates occurring only through an internal dispatcher (#708): |
| 14 | + * Introduced `fetchChannelList` to the `ChannelListContext`. |
| 15 | + * Implemented a custom hook function `useFetchChannelList`. |
| 16 | + * Utilized this function to fetch the channel list within the `ChannelListUI` component. |
| 17 | + * Added relevant tests for this function. |
| 18 | + * Provided the method through the `ChannelListContext`: `fetchChannelList`. |
| 19 | + Example Usage: |
| 20 | + ```jsx |
| 21 | + import SendbirdProvider from '@sendbird/uikit-react/SendbirdProvider' |
| 22 | + import useSendbirdStateContext from '@sendbird/uikit-react/useSendbirdStateContext' |
| 23 | + import { ChannelListProvider, useChannelListContext } from '@sendbird/uikit-react/ChannelList/context' |
| 24 | + |
| 25 | + const isAboutSame = (a, b, px) => (Math.abs(a - b) <= px); |
| 26 | + |
| 27 | + const CustomChannelList = () => { |
| 28 | + const { |
| 29 | + allChannels, |
| 30 | + fetchChannelList, |
| 31 | + } = useChannelListContext(); |
| 32 | + |
| 33 | + return ( |
| 34 | + <div |
| 35 | + className="custom-channel-list" |
| 36 | + onScroll={(e) => { |
| 37 | + const target = e.target; |
| 38 | + if (isAboutSame(target.clientHeight + target.scrollTop, target.scrollHeight, 10)) { |
| 39 | + fetchChannelList(); |
| 40 | + } |
| 41 | + }} |
| 42 | + > |
| 43 | + {allChannels.map((channel) => { |
| 44 | + return // custom channel list item |
| 45 | + })} |
| 46 | + </div> |
| 47 | + ); |
| 48 | + }; |
9 | 49 |
|
| 50 | + const CustomApp = () => { |
| 51 | + return ( |
| 52 | + <div className="custom-app"> |
| 53 | + <SendbirdProvider ... > |
| 54 | + <ChannelListProvider ... > |
| 55 | + <CustomChannelList /> |
| 56 | + </ChannelListProvider> |
| 57 | + </SendbirdProvider> |
| 58 | + </div> |
| 59 | + ); |
| 60 | + }; |
| 61 | + ``` |
10 | 62 | ### Chores:
|
11 | 63 | * Added a troubleshooting guide to the README. (#702)
|
12 | 64 | * Made minor improvements to the onboarding process. (#701)
|
|
0 commit comments