|
43 | 43 | On Dark -04 -> Ondark-text-disabled
|
44 | 44 | ```
|
45 | 45 |
|
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 |
51 | 46 | - Message Menu Component Refactor
|
52 | 47 | - Created `MessageMenuProvider`, `useMessageMenuContext`, and `MessageMenu` component.
|
53 | 48 | - Replaced `MessageItemMenu` with `MessageMenu` in **GroupChannel**. Future PR will apply it to Thread.
|
54 | 49 | - 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'; |
55 | 97 |
|
| 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. |
56 | 132 |
|
57 | 133 | ## [v3.14.10] (June 13, 2024)
|
58 | 134 | ### Fixes
|
|
0 commit comments