Commit 6a5f169
authored
release: v3.13.3 (#1027)
## [v3.13.3] (Mar 22, 2024)
### Features
* Added a `renderMenuItem` to the `MessageMenu` component
* How to use?
```tsx
<GroupChannel
renderMessageContent={(props) => (
<MessageContent
{...props}
renderMessageMenu={(props) => (
<MessageMenu
{...props}
renderMenuItem={(props) => {
const {
className,
onClick,
dataSbId,
disable,
text,
} = props;
return <MenuItem /> // Render Custom Menu Item
}}
/>
)}
/>
)}
/>
```
* Added `onBeforeDownloadFileMessage` to the `<GroupChannel />` and
`<Thread />` modules
* How to use?
```tsx
const ONE_MB = 1024 * 1024;
/**
* Use this list to check if it's displayed as a ThumbnailMessage.
*
(https://github.com/sendbird/sendbird-uikit-react/blob/main/src/utils/index.ts)
*/
const ThumbnailMessageTypes = [
'image/jpeg',
'image/jpg',
'image/png',
'image/gif',
'image/svg+xml',
'image/webp', // not supported in IE
'video/mpeg',
'video/ogg',
'video/webm',
'video/mp4',
];
<GroupChannel // or Thread
onBeforeDownloadFileMessage={async ({ message, index = null }) => {
if (message.isFileMessage()) {
const confirmed = window.confirm(`The file size is ${(message.size /
ONE_MB).toFixed(2)}MB. Would you like to continue downloading?`);
return confirmed;
}
if (message.isMultipleFilesMessage()) {
const confirmed = window.confirm(`The file size is
${(message.fileInfoList[index].fileSize / ONE_MB).toFixed(2)}MB. Would
you like to continue downloading?`);
return confirmed;
}
return true;
}}
/>
```
* Added `onDownloadClick` to the `FileViewer`, `FileViewerView`,
`MobileBottomSheet`, `MobileContextMenu`, and `MobileMenu`
### Fixes
* Improved the stability of the ChannelSettings Modals
* Support menu on the `MembersModal`, `MutedMembersModal`, and
`OperatorsModal`
* Display `Operator` description on the `MembersModal`
* Fixed the `width` size of the `OGMessageItemBody` component
* Added fallback logic on template rendering error
* Replaced the hardcoded text ` (You)` with the StringSet
`CHANNEL_SETTING__MEMBERS__YOU` in the `UserListItem`1 parent 7f17963 commit 6a5f169
2 files changed
+76
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
3 | 77 | | |
4 | 78 | | |
5 | 79 | | |
6 | | - | |
| 80 | + | |
7 | 81 | | |
8 | 82 | | |
9 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments