Commit 5c473d3
authored
feat: reaction list top redesign (#3428)
This pull request refactors the message reaction list UI components to
simplify the codebase, improve maintainability, and enhance layout
flexibility. The main changes include removing redundant code for
reaction items, introducing a new clustered reaction list layout, and
updating prop handling and styling for better alignment and
customization.
**Reaction List Refactor and UI Improvements:**
- Replaced the segmented reaction list type with a new 'clustered'
layout as the default for `reactionListType`, and updated all relevant
components to support this change (`Channel.tsx`, `MessageBubble.tsx`).
[[1]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85L712-R712)
[[2]](diffhunk://#diff-78869e39c4e5a321d52b07aae9183d0bc2aff8c2f2a2d7405cb2547740865793L54-R102)
- Refactored `ReactionListBottom` to delegate clustered reaction
rendering to the new `ReactionListClustered` component, removing the old
segmented logic and redundant icon/count code. Reaction items now
consistently use `ReactionListItem` (`ReactionListBottom.tsx`).
[[1]](diffhunk://#diff-926ded9f8a41b99e3b915a72424b44c11631585a26cfc0fa236d68979dafddb6L2-R5)
[[2]](diffhunk://#diff-926ded9f8a41b99e3b915a72424b44c11631585a26cfc0fa236d68979dafddb6L16-R20)
[[3]](diffhunk://#diff-926ded9f8a41b99e3b915a72424b44c11631585a26cfc0fa236d68979dafddb6L270-R141)
- Updated prop types and usage for reaction list components, ensuring
consistent passing of `reactionListType`, alignment, and removing unused
or redundant props such as `hasReactions` (`MessageBubble.tsx`,
`MessageSimple.tsx`).
[[1]](diffhunk://#diff-78869e39c4e5a321d52b07aae9183d0bc2aff8c2f2a2d7405cb2547740865793L25-R47)
[[2]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L52)
[[3]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L101)
[[4]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L226-R225)
[[5]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83R237-R245)
[[6]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83R255)
[[7]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L296)
[[8]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L307)
[[9]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L316-L320)
[[10]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L430)
[[11]](diffhunk://#diff-6c4943fcf0d32148b663091935ac039195d602cef7654b16bb93514ca2b3ba83L475)
**Styling and Layout Enhancements:**
- Improved alignment and container structure for message bubbles and
reaction lists, including new style properties for wrappers and
containers to better support left/right alignment and error states
(`MessageBubble.tsx`).
[[1]](diffhunk://#diff-78869e39c4e5a321d52b07aae9183d0bc2aff8c2f2a2d7405cb2547740865793L54-R102)
[[2]](diffhunk://#diff-78869e39c4e5a321d52b07aae9183d0bc2aff8c2f2a2d7405cb2547740865793L226-R253)
[[3]](diffhunk://#diff-78869e39c4e5a321d52b07aae9183d0bc2aff8c2f2a2d7405cb2547740865793R264-R265)
- Cleaned up and simplified style hooks in `ReactionListBottom`,
removing unused style properties and semantic color references for a
leaner implementation (`ReactionListBottom.tsx`).
[[1]](diffhunk://#diff-926ded9f8a41b99e3b915a72424b44c11631585a26cfc0fa236d68979dafddb6L321-R153)
[[2]](diffhunk://#diff-926ded9f8a41b99e3b915a72424b44c11631585a26cfc0fa236d68979dafddb6L343-R173)
These changes collectively modernize the reaction list UI, reduce code
duplication, and provide more flexibility for future customization.1 parent 1f8b90d commit 5c473d3
11 files changed
Lines changed: 1080 additions & 774 deletions
File tree
- package/src
- components
- Channel
- Message/MessageSimple
- ReactionList
- __tests__
- Thread/__tests__/__snapshots__
- contexts/themeContext/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
712 | | - | |
| 712 | + | |
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
| |||
Lines changed: 49 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| 45 | + | |
40 | 46 | | |
41 | | - | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
77 | 102 | | |
78 | 103 | | |
79 | 104 | | |
| |||
223 | 248 | | |
224 | 249 | | |
225 | 250 | | |
226 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
227 | 254 | | |
228 | 255 | | |
229 | 256 | | |
| |||
234 | 261 | | |
235 | 262 | | |
236 | 263 | | |
| 264 | + | |
| 265 | + | |
237 | 266 | | |
Lines changed: 5 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | | - | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
| |||
218 | 214 | | |
219 | 215 | | |
220 | 216 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 217 | + | |
236 | 218 | | |
237 | 219 | | |
| 220 | + | |
238 | 221 | | |
239 | 222 | | |
240 | 223 | | |
| |||
246 | 229 | | |
247 | 230 | | |
248 | 231 | | |
| 232 | + | |
249 | 233 | | |
250 | 234 | | |
251 | 235 | | |
252 | 236 | | |
253 | 237 | | |
254 | 238 | | |
255 | 239 | | |
| 240 | + | |
256 | 241 | | |
257 | 242 | | |
258 | 243 | | |
| |||
262 | 247 | | |
263 | 248 | | |
264 | 249 | | |
| 250 | + | |
265 | 251 | | |
266 | 252 | | |
267 | 253 | | |
| |||
289 | 275 | | |
290 | 276 | | |
291 | 277 | | |
292 | | - | |
293 | 278 | | |
294 | 279 | | |
295 | 280 | | |
| |||
300 | 285 | | |
301 | 286 | | |
302 | 287 | | |
303 | | - | |
304 | 288 | | |
305 | 289 | | |
306 | 290 | | |
| |||
309 | 293 | | |
310 | 294 | | |
311 | 295 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | 296 | | |
318 | 297 | | |
319 | 298 | | |
| |||
423 | 402 | | |
424 | 403 | | |
425 | 404 | | |
426 | | - | |
427 | 405 | | |
428 | 406 | | |
429 | 407 | | |
| |||
468 | 446 | | |
469 | 447 | | |
470 | 448 | | |
471 | | - | |
472 | 449 | | |
473 | 450 | | |
474 | 451 | | |
| |||
0 commit comments