Skip to content

Commit 371bd30

Browse files
committed
Update CHANGELOG
1 parent 778680d commit 371bd30

File tree

1 file changed

+56
-4
lines changed

1 file changed

+56
-4
lines changed

CHANGELOG.md

+56-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,64 @@
11
# Changelog - v3
22

33
## [v3.6.7] (Aug 11 2023)
4+
### Feats:
5+
* Added a new ImageGrid UI component (for internal use only) (#703)
6+
47
### 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+
};
949

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+
```
1062
### Chores:
1163
* Added a troubleshooting guide to the README. (#702)
1264
* Made minor improvements to the onboarding process. (#701)

0 commit comments

Comments
 (0)