Commit eeebbdc
feat: Update TypingIndicatorBubble to support multiple typing members (#838)
Fixes: [UIKIT-4563](https://sendbird.atlassian.net/browse/UIKIT-4563)
### Docs
-
https://sendbird.atlassian.net/wiki/spaces/UK/pages/2177794776/Typing+indicator+type+2+-+animated+message+bubble
### Standard test sheet
https://docs.google.com/spreadsheets/d/1ytDNIBdMJOUTifYyQrFLRYsSDqpHY87CYXiQG9ZHeso/edit#gid=0
### Figma
https://www.figma.com/file/SVbXU00FhjztekD8AiVukK/UIKit_Work-file_React?node-id=1950%3A5345&mode=dev
### Changelog
- Added `typingIndicatorTypes` global option
- Added `TypingIndicatorType` enum
```
export declare enum TypingIndicatorType {
Text = "text",
Bubble = "bubble"
}
<App
appId={appId}
userId={userId}
...
uikitOptions={{
groupChannel: {
// Below turns on both bubble and text typing indicators. Default is Text only.
typingIndicatorTypes: new Set([TypingIndicatorType.Bubble, TypingIndicatorType.Text]),
}
}}
/>
```
- Added `TypingIndicatorBubble`
```
const moveScroll = (): void => {
const current = scrollRef?.current;
if (current) {
const bottom = current.scrollHeight - current.scrollTop - current.offsetHeight;
if (scrollBottom < bottom && scrollBottom < SCROLL_BUFFER) {
// Move the scroll as much as the height of the message has changed
current.scrollTop += bottom - scrollBottom;
}
}
};
return (
<TypingIndicatorBubble
typingMembers={typingMembers}
handleScroll={moveScroll} // Scroll to the rendered typing indicator message IFF current scroll is bottom.
/>
);
```
[UIKIT-4563]:
https://sendbird.atlassian.net/browse/UIKIT-4563?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
---------
Co-authored-by: Hyungu Kang | Airen <[email protected]>1 parent 8d582f0 commit eeebbdc
File tree
33 files changed
+378
-207
lines changed- src
- lib
- utils
- modules
- App/stories
- Channel/components
- ChannelUI
- MessageList
- ui
- Avatar
- __tests__/__snapshots__
- FileViewer/__tests__/__snapshots__
- MessageContent
- __tests__/__snapshots__
- MessageSearchFileItem/__tests__/__snapshots__
- MessageSearchItem/__tests__/__snapshots__
- OpenchannelConversationHeader/__tests__/__snapshots__
- OpenchannelFileMessage/__tests__/__snapshots__
- OpenchannelOGMessage/__tests__/__snapshots__
- OpenchannelThumbnailMessage/__tests__/__snapshots__
- OpenchannelUserMessage/__tests__/__snapshots__
- TypingIndicatorBubble
- __tests__
- TypingIndicatorMessage
- UserListItem/__tests__/__snapshots__
- utils/typeHelpers
33 files changed
+378
-207
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
285 | | - | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
| |||
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
331 | 343 | | |
332 | 344 | | |
333 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
130 | 133 | | |
131 | 134 | | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
243 | 254 | | |
244 | 255 | | |
245 | 256 | | |
| |||
0 commit comments