Skip to content

Commit b425866

Browse files
renefloorxsahil03xclaude
authored
docs(ui)!: correct migration docs; remove dead MessageDetails (#2680)
* update migration docs with latest changes * Add migration doc for sort option * docs: correct migration docs against verified source Apply ~70+ corrections across all 16 redesign migration docs and v10-migration.md based on a source-by-source verification pass. Fixes non-existent symbols, wrong constructor params, wrong typedef signatures, and stale class names that would prevent migration code examples from compiling. Adds the missing ClientState collection immutability breaking-change section (introduced in 2501f53). Also cleans up five stale dartdoc references in source that seeded some of the wrong names in the docs (StreamMessagePlacement → StreamMessageLayout, UrlAttachmentBuilder → LinkPreviewAttachmentBuilder, StreamChat(config:) → streamChatConfigData:, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * refactor(ui)!: remove unused MessageDetails class The MessageDetails class was only used by itself — no live consumers in packages/ or sample_app. The new messageBuilder signature stopped passing it as an argument, leaving the class as dead public surface area. Delete the file and its export; update CHANGELOG and the migration doc that previously said "no longer passed to builders" to reflect the actual removal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(ui): re-export StreamAvatarTheme/Data from stream_core_flutter The two avatar theme types live in stream_core_flutter, but consumers who only depended on stream_chat_flutter had to add a second import to theme avatars globally. Add them to the show allowlist so existing StreamAvatarThemeData imports keep working, drop the now-redundant stream_core_flutter import from stream_media_gallery_item.dart, and update the migration doc that previously instructed users to import from stream_core_flutter directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(ui): inline AttachmentPickerOptionsBuilder typedef, drop empty file stream_attachment_picker_bottom_sheet.dart only held the AttachmentPickerOptionsBuilder typedef — the filename implied a sheet class that no longer exists after pickers became inline. Move the typedef into stream_attachment_picker.dart (next to the picker widgets and builder functions that use it) and delete the misleading file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: add Stream Core / Stream Chat preamble to redesign README Front-load the two-layer split so future doc passes don't conflate "moved to stream_core_flutter" with "removed." Includes a small core-primitive ↔ chat-wrapper table and a "frequently confused names" list covering the wrong-name patterns that surfaced during the verification pass (StreamMessagePlacement → StreamMessageLayout, kStreamHeaderHeight → kStreamToolbarHeight, etc.). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs: address CodeRabbit review comments - attachments_and_polls.md: fix stale #streamattachmentpickeroption anchor (→ #attachment-picker) and drop reference to the removed showStreamAttachmentPickerModalBottomSheet function. - v10-migration.md: stable-release boundary was beta.12, not beta.13 (matches the upgrade matrix at the top of the doc). - message_actions.md: drop StreamMessageReactionsModal from the showStreamDialog Future<T?> "returns" list — the class is deleted. - message_composer.md: destructure cooldownTimeOut from SlowModePlaceholder so translations.slowModeOnLabel(int) gets its required argument; matches the source dartdoc example verbatim. The fourth flagged comment (onDismissTap row in unread_indicator_button.md) was already removed in the earlier verification pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(ui): use American spelling "customization" in reaction_picker.md Line 31 used British "customisation" while the rest of the doc (and the heading at line 299) uses American "Customization". Match the rest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fixed last StreamMessagePlacement occurrence --------- Co-authored-by: Sahil Kumar <xdsahil@gmail.com> Co-authored-by: Sahil Kumar <sahil@getstream.io> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3b50b8f commit b425866

29 files changed

Lines changed: 1854 additions & 1097 deletions

migrations/redesign/README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@ The redesigned components aim to provide:
1212

1313
Each component migration guide contains specific details about the changes and how to migrate.
1414

15+
## Package Architecture: Stream Core + Stream Chat
16+
17+
The redesigned components are split across two packages:
18+
19+
- **`stream_core_flutter`** — product-agnostic primitives: avatars, badges, buttons, sheets, app bars, message layout, reaction picker, and theming tokens. None of these classes depend on chat-domain models (`Channel`, `Message`, `User`).
20+
- **`stream_chat_flutter`** — chat-domain wrappers that take chat models and delegate visuals to the primitives.
21+
22+
Most core types are re-exported from `stream_chat_flutter`, so a single `package:stream_chat_flutter/stream_chat_flutter.dart` import is usually enough. When a migration doc says a type "moved to `stream_core_flutter`," it has **not** been removed — it has been re-homed to the primitives layer and (in most cases) re-exported here so existing imports keep working.
23+
24+
### Core primitive ↔ chat wrapper
25+
26+
| Core (in `stream_core_flutter`) | Chat wrapper (in `stream_chat_flutter`) |
27+
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
28+
| `StreamAvatar`, `StreamAvatarGroup`, `StreamAvatarStack` | `StreamUserAvatar`, `StreamUserAvatarGroup`, `StreamUserAvatarStack`, `StreamChannelAvatar` |
29+
| `StreamReactionPicker` (takes `StreamReactionPickerItem`s) | `StreamMessageReactionPicker` (takes `Message`) |
30+
| `StreamReactions` (takes `ReactionGroup`s) | `StreamMessageReactions` (takes `Message`) |
31+
32+
### Frequently confused names
33+
34+
- `StreamMessageLayout`**not** `StreamMessagePlacement`.
35+
- `kStreamToolbarHeight`**not** `kStreamHeaderHeight`.
36+
- `StreamAvatarTheme` / `StreamAvatarThemeData` — live in `stream_core_flutter`, re-exported from `stream_chat_flutter`; existing imports continue to work.
37+
1538
## Theming
1639

1740
The redesigned components use `StreamTheme` for theming. If no `StreamTheme` is provided, a default theme is automatically created based on `Theme.of(context).brightness` (light or dark mode).
@@ -118,23 +141,24 @@ class MyCustomButton extends StatelessWidget {
118141

119142
## Components
120143

121-
| Component | Migration Guide |
122-
|-----------|-----------------|
123-
| Stream Avatar | [stream_avatar.md](stream_avatar.md) |
124-
| Channel List Item | [channel_list_item.md](channel_list_item.md) |
125-
| Message Actions | [message_actions.md](message_actions.md) |
126-
| Reaction Picker / Reactions | [reaction_picker.md](reaction_picker.md) |
127-
| Image CDN & Thumbnails | [image_cdn.md](image_cdn.md) |
128-
| Message Widget & Message List | [message_widget.md](message_widget.md) |
129-
| Message Composer | [message_composer.md](message_composer.md) |
130-
| Unread Indicator | [unread_indicator.md](unread_indicator.md) |
131-
| Unread Indicator Button | [unread_indicator_button.md](unread_indicator_button.md) |
132-
| Reaction List & Detail Sheet | [reaction_list.md](reaction_list.md) |
133-
| Audio Waveform Theme | [audio_theme.md](audio_theme.md) |
134-
| Attachments & Polls | [attachments_and_polls.md](attachments_and_polls.md) |
135-
| Media Viewer (Full-screen Media) | [media_viewer.md](media_viewer.md) |
136-
| Headers, Icons & Configuration | [headers_and_icons.md](headers_and_icons.md) |
137-
| Localizations | [localizations.md](localizations.md) |
144+
| Component | Migration Guide |
145+
| -------------------------------- | -------------------------------------------------------- |
146+
| Stream Avatar | [stream_avatar.md](stream_avatar.md) |
147+
| Channel List Item | [channel_list_item.md](channel_list_item.md) |
148+
| Message Actions | [message_actions.md](message_actions.md) |
149+
| Reaction Picker / Reactions | [reaction_picker.md](reaction_picker.md) |
150+
| Image CDN & Thumbnails | [image_cdn.md](image_cdn.md) |
151+
| Message Widget | [message_widget.md](message_widget.md) |
152+
| Message List | [message_list.md](message_list.md) |
153+
| Message Composer | [message_composer.md](message_composer.md) |
154+
| Unread Indicator | [unread_indicator.md](unread_indicator.md) |
155+
| Unread Indicator Button | [unread_indicator_button.md](unread_indicator_button.md) |
156+
| Reaction List & Detail Sheet | [reaction_list.md](reaction_list.md) |
157+
| Audio Waveform Theme | [audio_theme.md](audio_theme.md) |
158+
| Attachments & Polls | [attachments_and_polls.md](attachments_and_polls.md) |
159+
| Media Viewer (Full-screen Media) | [media_viewer.md](media_viewer.md) |
160+
| Headers, Icons & Configuration | [headers_and_icons.md](headers_and_icons.md) |
161+
| Localizations | [localizations.md](localizations.md) |
138162

139163
## Need Help?
140164

0 commit comments

Comments
 (0)