Commit 29fc127
docs(ui): showcase, localization, theming, and composer snapshots (#2649)
* docs(ui): more docs screenshots
Adds four new snapshot scenarios:
- `flutter_showcase` — hero image with four phone crops on a split
blue/black background. Two unique screens (message list + channel list),
each rendered light and dark, with a Flutter logo card centred.
- `localization_support` — two iPhone 13 frames side by side rendering
the same modal in English and Italian, with a floating
`StreamMessageComposer` whose placeholder pulls from
`context.translations.writeAMessageLabel`.
- `theming_default` / `theming_red` — same chat scaffold rendered against
the docs default theme and a red brand/chrome variant to demonstrate
`StreamColorScheme` overrides.
- `message_input_custom_buttons` — composer snapshot demonstrating
`messageComposerLeading` / `*InputLeading` / `*InputTrailing` /
`*Trailing` builder overrides. The trailing button is a
`StatefulWidget` that toggles between voice and send icons based on
text emptiness.
Also adds `docsScreenshotsDarkTheme()` (mirrors the light theme but with
dark brightness, black scaffold/appBar, and `StreamColorScheme.dark()`
text colours) and `stream_chat_localizations` to `dev_dependencies`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: Update Docs Snapshots
* docs(ui): add deviceFrame param to docsGoldenTest, drop flutter_showcase
`docsGoldenTest` gains a `DeviceInfo? deviceFrame` parameter. When set,
the helper wraps the builder's widget in `DeviceFrame(device: …,
isFrameVisible: true, screen: …)` so individual tests no longer need to
construct the wrap themselves. The parameter is opt-in — leaving it
null keeps the previous no-frame behavior for tests like
`localization_support` that manage multiple frames in a single canvas.
Migrate the in-PR theming snapshots and three existing v10.0.0 sites
that used the inline `DeviceFrame(screen: …)` wrap:
- `theming_default` / `theming_red`
- `channel_list_view`, `slidable_channel_list`
- `message_list_view`
Each drops the `DeviceFrame(...)` wrapper around `MaterialApp(...)` and
adds `deviceFrame: Devices.ios.iPhone13` to the `docsGoldenTest` call.
Drop the `flutter_showcase` snapshot — no longer needed.
Also fix `message_styles`: the body text said "This is a message from
Bob." but the author (`_sender`) is now Noah Smith after the
sample-user roster swap. Switch to an interpolation
(`'… from ${_sender.name}.'`) so the copy can't drift again the next
time a sample user is reassigned. Audited the rest of the suite — no
other hardcoded user-name references in message bodies.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): match SDK trailing button size in custom composer snapshot
`DefaultStreamMessageComposerInputTrailing` (the production widget that
renders the send / mic button) ships at `StreamButtonSize.small` (32 px).
Our `_CustomComposerTrailingButton` used `medium` (40 px) for both the
voice and send branches, so the blue circle dwarfed the input pill.
Drop both branches to `small` to match the production button's footprint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): start-align hint in custom composer snapshot
The `message_input_custom_buttons` demo had buttons in both the
`messageComposerInputLeading` (emoji) and `messageComposerInputTrailing`
(attachment) slots. With buttons on both sides of the pill's `TextField`,
the short "Type a message…" hint visually appeared centered between
them, even though it was technically start-aligned within the field.
Remove the inside trailing attachment button so the pill is just
`[emoji | text]` — the hint now sits right after the emoji.
Also bump the outer trailing mic/send button from default `medium`
(40px) to `large` (48px) so it matches `DefaultStreamMessageComposerLeading`'s
`StreamButtonSize.large` attachment button — the snapshot is meant to
show "attachment on outer-left ↔ mic on outer-right" symmetry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): use ghost+secondary mic style at attachment size
In the custom composer snapshot the outer trailing mic/send button
was `solid+primary` (blue circle). Switch it to `ghost+secondary` so it
visually matches the SDK's default `_VoiceRecordingButton`, while keeping
`size: large` to match the outer leading attachment button's footprint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): switch custom composer trailing to outline type
Outline now mirrors `DefaultStreamMessageComposerLeading`'s
`type: outline, style: secondary` attachment button — the trailing
mic/send becomes a visual twin of the leading attachment circle.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): solid+primary send variant in custom composer trailing
The voice branch keeps the outline+secondary style (matches an idle
mic affordance), but the send branch flips to solid+primary so it
visually signals "ready to send" — same blue circle the SDK uses by
default in `DefaultStreamMessageComposerInputTrailing`.
The snapshot doesn't change (controller starts empty so only the voice
branch renders), but the demo code now models the toggle correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): bump change_position send to large, fix custom_send_icon bg
`message_input_change_position` previously rendered the moved-out
trailing via `DefaultStreamMessageComposerInputTrailing`, which is
hard-coded to `size: small`. Replace with a direct `StreamButton.icon`
at `size: large`, wrapped in a `Row` with a leading `SizedBox(spacing.xs)`
gap — mirrors the spacing the leading `+` button gets on the other side
and matches the trailing button size in `message_input_custom_buttons`.
`message_input_custom_send_icon` builds its own `ThemeData` to demo a
`StreamIcons` override, but didn't set `scaffoldBackgroundColor`. M3's
default light scaffold has a faint pink tint, which produced a coloured
bar above the divider unlike every other composer snapshot. Pin it to
pure white to match.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): align custom composer snapshot height with siblings
`message_input_custom_buttons` was 120 px tall while every other
composer snapshot (default, change_position, custom_send_icon,
slow_mode) is 100 px. Drop to 100 for consistency. The quoted-message
snapshot stays at 160 since it needs room for the quoted-message header.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): override composer send icon via inherited Theme
`message_input_custom_send_icon` was hand-building its own `ThemeData`
to inject a `StreamIcons` override, which forced it to redeclare
`scaffoldBackgroundColor` and re-derive the text theme from scratch.
Use `docsScreenshotsTheme()` as the base and wrap the composer subtree
in a `Builder` + `Theme(data: copyWith(extensions: ...))` so the icon
override flows through Material's inherited `Theme` widget instead of
a duplicated `ThemeData`. Drops the now-unused `stream_core_flutter`
import in this test.
Also bumps the `message_input_quoted_message` snapshot height to 180
so the reply header + composer fit cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): pull MaterialApp wrap into docsGoldenTest
Every docs snapshot builder was rebuilding the same outer wrap —
`MaterialApp(theme: docsScreenshotsTheme(), debugShowCheckedModeBanner: false, home: …)`.
Move that wrap into `docsGoldenTest`'s default `app:` callback so the
builder just returns the `home:` widget. Tests with custom theme/locale
(theming_test, localization_support_test) opt out by passing their own
`app:` callback.
Net −101 lines across 13 files; no golden output changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci(docs): run analyze/format/test on docs/** changes
`stream_flutter_workflow.yml` only triggered on `packages/**` and
`sample_app/**`, so docs-only PRs (this branch included) skipped the
analyze, format-validate, and test jobs entirely. Add `docs/**` to the
trigger paths.
Also apply the formatter to two files the new check would have flagged
(trailing newline + collapsed one-liner) so the validate step passes on
this PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: Update Docs Snapshots
* docs(ui): model custom composer snapshot on WhatsApp layout
Re-arrange the slot demo so it mirrors a recognisable real-world chat
composer (WhatsApp): emoji inside the pill on the left, attachment +
camera icons inside on the right, and a solid green mic/send button
outside on the right.
`StreamButtonTheme` wraps the trailing button to override the primary
solid background to WhatsApp's brand green (#25D366); the state toggle
between voice and send icons stays the same.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): regenerate custom composer snapshot for WhatsApp layout
The previous commit landed the code change but a botched rebase
restored the old PNG. Regenerate so the file actually matches the
emoji + attachment + camera + green-mic layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): simplify custom composer to Stream-themed slots
Drop the camera slot and the WhatsApp-green override on the trailing
mic/send button. The snapshot now demonstrates the slot mechanics with
a single attachment icon inside the pill and a default-styled mic/send
outside, so the styling falls back to the SDK's primary accent colour
instead of a hard-coded brand colour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(ui): drop emoji slot from custom composer snapshot
The demo now exercises three slots — outer leading hidden, inner
trailing (attachment), outer trailing (mic/send) — which is enough to
illustrate slot overrides without the extra emoji noise.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: Update Docs Snapshots
---------
Co-authored-by: Sahil Kumar <sahil@getstream.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: xsahil03x <25670178+xsahil03x@users.noreply.github.com>1 parent 7ae7874 commit 29fc127
24 files changed
Lines changed: 1088 additions & 587 deletions
File tree
- .github/workflows
- docs/docs_screenshots
- test
- channel
- localization
- goldens/macos
- message_input
- goldens/macos
- message_list
- goldens/macos
- message_search
- polls
- src
- theming
- goldens/macos
- thread_list
- user_list
- voice_recording
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
Lines changed: 7 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
| |||
Lines changed: 103 additions & 125 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
| |||
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| 49 | + | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| |||
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
148 | 137 | | |
149 | 138 | | |
150 | 139 | | |
| |||
175 | 164 | | |
176 | 165 | | |
177 | 166 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
210 | 194 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
214 | 199 | | |
215 | 200 | | |
216 | 201 | | |
| |||
220 | 205 | | |
221 | 206 | | |
222 | 207 | | |
| 208 | + | |
223 | 209 | | |
224 | 210 | | |
225 | 211 | | |
| |||
292 | 278 | | |
293 | 279 | | |
294 | 280 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
339 | 311 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
348 | 326 | | |
349 | 327 | | |
350 | 328 | | |
| |||
0 commit comments