Commit ee63c40
feat: message headers redesign (#3437)
This pull request makes several significant updates to the handling and
display of message reminders and thread navigation in the sample app and
core library. The main changes include refactoring the way message
reminder headers are implemented, improving thread navigation (including
scrolling to a targeted message), and exposing new header components for
easier customization. Additionally, some code cleanup and minor UI
improvements are included.
**Message Reminder and Header Refactoring:**
* Removed the custom `MessageReminderHeader` and related logic from the
sample app, shifting responsibility for reminder headers to the core
library and exposing them as customizable components
(`MessageReminderHeader`, `MessageSavedForLaterHeader`,
`SentToChannelHeader`).
[[1]](diffhunk://#diff-e4b7ff703c5409150f35f3d93f9b4a6ca081dcc4bf8115f4fdb2a2d0439c6205L1-L92)
[[2]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R144-R146)
[[3]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R372-R374)
[[4]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R692-R694)
[[5]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R1954-R1956)
[[6]](diffhunk://#diff-d3e4f4cdcef10807a38eab86f6ead6bbfe01980e7326f3cadfeb8186760d7af1R68-R70)
[[7]](diffhunk://#diff-d3e4f4cdcef10807a38eab86f6ead6bbfe01980e7326f3cadfeb8186760d7af1R184-R186)
* Updated the message actions to use the `Bell` icon directly from the
core library instead of a local copy, and adjusted the icon prop to use
`stroke` instead of `pathFill` for consistency.
[[1]](diffhunk://#diff-3003c10c02dbe4fd6a088502b48ef3cf6b539a4c30704273f10482dbc8ae52a5R12-L13)
[[2]](diffhunk://#diff-3003c10c02dbe4fd6a088502b48ef3cf6b539a4c30704273f10482dbc8ae52a5L97-R97)
[[3]](diffhunk://#diff-550d274d1ba08f0f6b63d767444bd4f08e1e0e6daa758b818cc5cf213fda5c55L1-L22)
**Thread Navigation and Targeted Message Scroll:**
* Enhanced thread navigation by passing an optional `targetedMessageId`
when navigating to the thread screen, allowing the UI to scroll directly
to a specific message within a thread.
[[1]](diffhunk://#diff-2335969a90d85933b956775f38af8bf0485cd538b0e73115b8087467d7ed116aL179-R179)
[[2]](diffhunk://#diff-2335969a90d85933b956775f38af8bf0485cd538b0e73115b8087467d7ed116aR188)
[[3]](diffhunk://#diff-f6f5acf3649a7159a27117d2ea15769405d09c079894eb8bc3a5e765cca5e9d8R43)
[[4]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606L77-R76)
[[5]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606L131-R147)
* Added an `onBackPressThread` callback to the thread context and
channel props, enabling the thread screen to return to the channel
screen and optionally scroll to a targeted message.
[[1]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85L407-R413)
[[2]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R716)
[[3]](diffhunk://#diff-f7139f4cdb523365cfc277d72b827a3432325b9c6460cf14628f9df67d0e4d85R2000)
[[4]](diffhunk://#diff-1c9dec060e52c82d28b7c313abbac01d23d19ddda8dc53cf82174b5432231231R15)
[[5]](diffhunk://#diff-1c9dec060e52c82d28b7c313abbac01d23d19ddda8dc53cf82174b5432231231R43)
[[6]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606R119-R125)
**Component and Prop Management:**
* Removed direct usage of `MessageHeader` and `MessageReminderHeader`
props in the sample app screens, relying on the core library's exposed
components and context for message header rendering.
[[1]](diffhunk://#diff-2335969a90d85933b956775f38af8bf0485cd538b0e73115b8087467d7ed116aL236)
[[2]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606L18-L23)
[[3]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606L90)
[[4]](diffhunk://#diff-d205a2fd76b4c4f669af948205f8a5e11c6267f3e4e26dc91e3a6036cd87d606L131-R147)
**Minor Improvements and Cleanup:**
* Fixed a minor translation string in `ChannelPreviewMessage` to remove
an unnecessary colon from the translation key.
* Ensured the `onThreadSelect` prop is passed to the
`MessageWithContext` component for better thread handling.
These changes collectively improve the flexibility, maintainability, and
user experience of message reminders and thread navigation in the app.
---------
Co-authored-by: Ivan Sekovanikj <[email protected]>1 parent 065306c commit ee63c40
File tree
38 files changed
+631
-150
lines changed- examples/SampleApp/src
- components/Reminders
- icons
- screens
- utils
- package/src
- components
- ChannelPreview
- Channel
- hooks
- Message
- MessageSimple
- Headers
- hooks
- contexts
- messageContext
- messagesContext
- themeContext/utils
- threadContext
- i18n
- icons
38 files changed
+631
-150
lines changedLines changed: 0 additions & 92 deletions
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
174 | 173 | | |
175 | 174 | | |
176 | 175 | | |
177 | | - | |
| 176 | + | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| |||
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
128 | 133 | | |
129 | 134 | | |
130 | 135 | | |
131 | | - | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
136 | 142 | | |
137 | 143 | | |
138 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| |||
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
404 | 410 | | |
405 | 411 | | |
406 | 412 | | |
407 | | - | |
| 413 | + | |
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
| |||
683 | 689 | | |
684 | 690 | | |
685 | 691 | | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
686 | 695 | | |
687 | 696 | | |
688 | 697 | | |
| |||
704 | 713 | | |
705 | 714 | | |
706 | 715 | | |
| 716 | + | |
707 | 717 | | |
708 | 718 | | |
709 | 719 | | |
| |||
1941 | 1951 | | |
1942 | 1952 | | |
1943 | 1953 | | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
1944 | 1957 | | |
1945 | 1958 | | |
1946 | 1959 | | |
| |||
1984 | 1997 | | |
1985 | 1998 | | |
1986 | 1999 | | |
| 2000 | + | |
1987 | 2001 | | |
1988 | 2002 | | |
1989 | 2003 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
0 commit comments