Skip to content

Commit 61190e8

Browse files
committed
Udpate CHANGELOG with MessageMenu
1 parent 757f47c commit 61190e8

File tree

1 file changed

+81
-5
lines changed

1 file changed

+81
-5
lines changed

CHANGELOG.md

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,92 @@
4343
On Dark -04 -> Ondark-text-disabled
4444
```
4545
46-
### Fixes
47-
- Fixed an issue where the `newMessages` array was not being reset even after the message list scroll reached the bottom, causing the message notification bar to not disappear properly. Manually called `resetNewMessages()` under certain conditions.
48-
- Updated the logic to align with other platforms for consistency. Relocated the logic to the same section where other `disabled` conditions are checked.
49-
50-
### Chores
5146
- Message Menu Component Refactor
5247
- Created `MessageMenuProvider`, `useMessageMenuContext`, and `MessageMenu` component.
5348
- Replaced `MessageItemMenu` with `MessageMenu` in **GroupChannel**. Future PR will apply it to Thread.
5449
- Migrated `MobileContextMenu` and `MobileBottomSheet` using `MessageMenuProvider`.
50+
- Exported the `MobileMenu`
51+
```tsx
52+
import { MobileMenu, MobileContextMenu, MobileBottomSheet } from '@sendbird/uikit-react/ui/MobileMenu';
53+
```
54+
- How to use?
55+
56+
Desktop menu
57+
```tsx
58+
import GroupChannel from '@sendbird/uikit-react/GroupChannel';
59+
import MessageContent from '@sendbird/uikit-react/ui/MessageContent';
60+
import { MessageMenu } from '@sendbird/uikit-react/ui/MessageMenu';
61+
62+
const GroupChannelPage = () => (
63+
<GroupChannel
64+
renderMessageContent={(props) => (
65+
<MessageContent
66+
{...props}
67+
renderMessageMenu={(props) => (
68+
<MessageMenu
69+
{...props}
70+
renderMenuItems={(props) => {
71+
const {
72+
CopyMenuItem,
73+
ReplyMenuItem,
74+
// ...
75+
DeleteMenuItem,
76+
} = props.items;
77+
// organize the menu items using the items
78+
return (
79+
<>
80+
<CopyMenuItem />
81+
<DeleteMenuItem />
82+
</>
83+
);
84+
}}
85+
/>
86+
)}
87+
/>
88+
)}
89+
/>
90+
);
91+
```
92+
Mobile menu
93+
```tsx
94+
import GroupChannel from '@sendbird/uikit-react/GroupChannel';
95+
import MessageContent from '@sendbird/uikit-react/ui/MessageContent';
96+
import { MobileMenu } from '@sendbird/uikit-react/ui/MessageMenu';
5597
98+
const GroupChannelPage = () => (
99+
<GroupChannel
100+
renderMessageContent={(props) => (
101+
<MessageContent
102+
{...props}
103+
renderMobileMenuOnLongPress={(props) => (
104+
<MobileMenu
105+
{...props}
106+
renderMenuItems={(props) => {
107+
const {
108+
CopyMenuItem,
109+
ReplyMenuItem,
110+
// ...
111+
DeleteMenuItem,
112+
} = props.items;
113+
// organize the menu items using the items
114+
return (
115+
<>
116+
<CopyMenuItem />
117+
<DeleteMenuItem />
118+
</>
119+
);
120+
}}
121+
/>
122+
)}
123+
/>
124+
)}
125+
/>
126+
);
127+
```
128+
129+
### Fixes
130+
- Fixed an issue where the `newMessages` array was not being reset even after the message list scroll reached the bottom, causing the message notification bar to not disappear properly. Manually called `resetNewMessages()` under certain conditions.
131+
- Updated the logic to align with other platforms for consistency. Relocated the logic to the same section where other `disabled` conditions are checked.
56132
57133
## [v3.14.10] (June 13, 2024)
58134
### Fixes

0 commit comments

Comments
 (0)