Commit 08dc4b6
authored
fix: align chat view sidebars and attachment preview remove icon (#3004)
### 🎯 Goal
Fix two UI regressions:
- the attachment preview dismiss/remove icon was not respecting dark
mode tokens
- ChatView channel/thread toggling caused width jumps because the
channel and thread sidebars used different width contracts
### 🛠 Implementation details
- Remove the nested SVG color override from
`src/components/MessageInput/styling/RemoveAttachmentPreviewButton.scss`
so the icon inherits the existing close-control tokens.
- Restore the failing `AttachmentPreviewList` test suite by fixing the
missing React import in `PlayButton`, aligning the tests with the
current media preview test IDs/override props, and seeding
edited-message state through `messageComposer`.
- Give `ThreadList` the same sidebar width/flex contract as
`ChannelList`, and ensure the thread detail pane flexes correctly inside
`ChatView.Threads`.
- In the Vite example, define a shared `350px` sidebar baseline for both
channel and thread views instead of separate ad hoc widths.
### 🎨 UI Changes
- Attachment preview remove icons now inherit the correct dark mode
colors.
- Channel and thread sidebars now stay width-aligned when toggling in
ChatView.
- The sample app uses a shared `350px` sidebar baseline for both views.1 parent fbe28d0 commit 08dc4b6
7 files changed
Lines changed: 123 additions & 62 deletions
File tree
- examples/vite/src
- src/components
- Button
- ChatView/styling
- MessageInput
- __tests__
- __snapshots__
- styling
- Threads/ThreadList/styling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
147 | 155 | | |
148 | 156 | | |
Lines changed: 49 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 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 | + | |
32 | 57 | | |
33 | 58 | | |
34 | 59 | | |
| |||
47 | 72 | | |
48 | 73 | | |
49 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
50 | 84 | | |
51 | 85 | | |
52 | 86 | | |
| |||
55 | 89 | | |
56 | 90 | | |
57 | 91 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 92 | + | |
74 | 93 | | |
75 | 94 | | |
76 | 95 | | |
| |||
202 | 221 | | |
203 | 222 | | |
204 | 223 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 224 | + | |
208 | 225 | | |
209 | 226 | | |
210 | 227 | | |
| |||
229 | 246 | | |
230 | 247 | | |
231 | 248 | | |
232 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
233 | 252 | | |
234 | 253 | | |
235 | 254 | | |
| |||
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
250 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
| |||
277 | 298 | | |
278 | 299 | | |
279 | 300 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 301 | + | |
285 | 302 | | |
286 | 303 | | |
287 | 304 | | |
288 | 305 | | |
289 | 306 | | |
290 | 307 | | |
291 | 308 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 309 | | |
300 | 310 | | |
301 | 311 | | |
| |||
310 | 320 | | |
311 | 321 | | |
312 | 322 | | |
313 | | - | |
| 323 | + | |
314 | 324 | | |
315 | 325 | | |
316 | 326 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 10 | | |
Lines changed: 59 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
12 | 27 | | |
13 | 28 | | |
14 | 29 | | |
15 | 30 | | |
16 | 31 | | |
| 32 | + | |
17 | 33 | | |
18 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
19 | 53 | | |
20 | 54 | | |
21 | 55 | | |
| 56 | + | |
22 | 57 | | |
| 58 | + | |
| 59 | + | |
23 | 60 | | |
24 | 61 | | |
25 | 62 | | |
26 | 63 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 64 | + | |
30 | 65 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
34 | 69 | | |
35 | | - | |
| 70 | + | |
36 | 71 | | |
37 | 72 | | |
38 | 73 | | |
| |||
51 | 86 | | |
52 | 87 | | |
53 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
54 | 99 | | |
55 | 100 | | |
56 | 101 | | |
57 | 102 | | |
58 | 103 | | |
| 104 | + | |
59 | 105 | | |
| 106 | + | |
| 107 | + | |
60 | 108 | | |
61 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
62 | 114 | | |
63 | 115 | | |
64 | 116 | | |
| |||
0 commit comments