Commit a7f2297
authored
Align shared header divider and height across screens (#6412)
* Replace header/composer dropshadow with borderCoreSubtle divider
ChannelHeader (used by message view + thread view) and MessageComposer
(non-floating mode) now draw a 1.dp border/core/subtle divider at the
boundary with the adjacent surface, matching the Figma "Mobile / Message
List" tokens. ListHeader (used by Channel List + Thread List) is updated
from borderCoreDefault to borderCoreSubtle for a single divider treatment
across all four screens, fulfilling the ticket's "consistent across the
app" goal.
Snapshot baselines refreshed for ChannelHeaderTest, MessageComposerTest,
ChannelListHeaderTest, and ThreadListHeaderTest.
* Standardise message-view header min-height with list screens
The default top-bar wired by ChannelScreen constrained ChannelHeader to a
hardcoded 56.dp, while ListHeader (used by Channel List and Thread List)
renders intrinsically taller (avatar 48.dp + 12.dp top + 12.dp bottom =
72.dp). The mismatch caused the layout to jump when navigating between
list screens and the message/thread view.
Replace the rigid Modifier.height(56.dp) with
Modifier.defaultMinSize(minHeight = 72.dp) so the message-view header
matches the list-header height while still letting custom leading
content (e.g. a back arrow that's larger than 48.dp) drive a taller
header if needed.
* Extract HeaderScaffold from ListHeader; compose ChannelHeader on top
Renames the internal ListHeader composable to HeaderScaffold and lifts the
shared header chrome (Surface + inset row + bottom divider) into a single
building block. ChannelHeader, ChannelListHeader, and ThreadListHeader all
delegate the chrome to HeaderScaffold and only own their domain slots.
Drops the unused color/shape/elevation parameters from the previous
ListHeader signature; both list-header callers used the defaults. Bakes the
design-system padding (spacingSm) and inter-slot gap (spacingXs) into
HeaderScaffold so the four screen-level headers can no longer drift apart on
those values.
ChannelHeader's Row gains 4.dp horizontal padding and an 8.dp inter-slot
gap, matching what the list headers already used. Snapshot baselines for
ChannelHeaderTest re-recorded.1 parent d5e970e commit a7f2297
26 files changed
Lines changed: 33 additions & 56 deletions
File tree
- stream-chat-android-compose
- api
- src
- main/java/io/getstream/chat/android/compose/ui
- channels/header
- components
- messages
- composer
- header
- threads
- test/snapshots/images
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6181 | 6181 | | |
6182 | 6182 | | |
6183 | 6183 | | |
| 6184 | + | |
6184 | 6185 | | |
6185 | | - | |
6186 | 6186 | | |
6187 | 6187 | | |
6188 | 6188 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
| |||
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
54 | | - | |
| 50 | + | |
| 51 | + | |
55 | 52 | | |
56 | 53 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
63 | 57 | | |
64 | 58 | | |
65 | | - | |
| 59 | + | |
66 | 60 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 61 | | |
71 | 62 | | |
72 | 63 | | |
73 | 64 | | |
74 | 65 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 66 | + | |
| 67 | + | |
80 | 68 | | |
81 | 69 | | |
82 | 70 | | |
83 | | - | |
| 71 | + | |
84 | 72 | | |
85 | 73 | | |
86 | 74 | | |
| |||
94 | 82 | | |
95 | 83 | | |
96 | 84 | | |
97 | | - | |
| 85 | + | |
98 | 86 | | |
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
102 | 90 | | |
103 | 91 | | |
104 | | - | |
105 | | - | |
| 92 | + | |
| 93 | + | |
106 | 94 | | |
107 | 95 | | |
108 | 96 | | |
| |||
135 | 123 | | |
136 | 124 | | |
137 | 125 | | |
138 | | - | |
139 | | - | |
| 126 | + | |
| 127 | + | |
140 | 128 | | |
141 | 129 | | |
142 | 130 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
377 | | - | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| |||
Lines changed: 7 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
| 40 | + | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
123 | 120 | | |
124 | 121 | | |
125 | 122 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
144 | 129 | | |
145 | 130 | | |
146 | 131 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments