You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ai-migration): fix signature/prop claims; prefer /css/* alias
Four SDK-mismatch fixes surfaced by validating the guide against
node_modules/stream-chat-react/dist/types:
- Hook name: useMessageComposer β useMessageComposerController. The
former does not exist in v14. The human migration guide had the
correct name; the AI guide had a hallucination.
- usePinHandler v14 signature is (message) with no second arg;
notifications are published internally via useNotificationApi().
- FileIcon props: `size` is not removed, only retyped from number to
FileIconSize ('sm' | 'md' | 'lg' | 'xl'); new `sizeConfig` prop
exists. Only `big`, `sizeSmall`, `type` were removed.
- ModalGalleryProps: no `initialIndex`. Actual props are { items,
className?, modalClassName?, closeOnBackgroundClick? }.
Also recommend the /css/* alias over /dist/css/* for stylesheet
imports: package.json exports map aliases it, so consumers do not need
to depend on the internal dist/ layout.
Copy file name to clipboardExpand all lines: ai-docs/ai-migration.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,16 +25,16 @@ Required workflow:
25
25
1. Upgrade both packages to their latest versions together. The v14 peer-dep floor moved; leaving `stream-chat` on a v13-era version will fail peer resolution.
26
26
-`stream-chat-react` β latest v14
27
27
-`stream-chat` β latest
28
-
2. Update stylesheet imports. The `/v2` path no longer resolves.
28
+
2. Update stylesheet imports. The `/v2` path no longer resolves. Prefer the aliased `stream-chat-react/css/*` path over `stream-chat-react/dist/css/*` β the alias is defined in the package's `exports` map and hides the internal `dist/` layout.
29
29
```ts
30
30
// before
31
31
import'stream-chat-react/dist/css/v2/index.css';
32
32
// after
33
-
import'stream-chat-react/dist/css/index.css';
33
+
import'stream-chat-react/css/index.css';
34
34
```
35
35
3. If the app uses `EmojiPicker`, also import its dedicated stylesheet:
@@ -172,7 +172,7 @@ For richer rendering, override `QuotedMessage` or `QuotedMessagePreview` in `Wit
172
172
-`useChannelDeletedListener`, `useNotificationMessageNewListener`, `useMobileNavigation`, siblings β no shim; remove the calls (`ChannelList` handles these events internally)
173
173
-`ToggleSidebarButton`, `ToggleButtonIcon`, `MenuIcon`, `NAV_SIDEBAR_DESKTOP_BREAKPOINT` β app-owned sidebar (see Phase 6)
174
174
-`pinPermissions`, `PinPermissions`, `PinEnabledUserRoles`, `defaultPinPermissions` β rely on `channelCapabilities['pin-message']`; remove the props
-`usePinHandler(message, pinPermissions, notifications)` β `usePinHandler(message)` (no second argument; notifications are published via `useNotificationApi()` internally)
- **`useChannelPreviewInfo()`** returns a stable empty group info object instead of `null`/`undefined` β any `groupChannelDisplayInfo == null` checks are now always false.
381
381
- **`useLatestMessagePreview()`** reports native `giphy` attachments with `type: 'giphy'`, not `image`.
- **`Gallery` / `ModalGallery`.** `ModalGallery` API went from `{images, index}` to `{items, initialIndex? }`. `Gallery` alone no longer renders a thumbnail grid β supply `GalleryUI` or use `ModalGallery` for the old behavior.
382
+
- **`FileIcon` props.** `filename` β `fileName`; `big`, `sizeSmall`, `type` removed. `size` is retyped from a pixel number to `FileIconSize` (`'sm' | 'md' | 'lg' | 'xl'`); new `sizeConfig` prop allows overriding per-size dimensions. `mimeTypeToIcon(type, mimeType)` β `mimeTypeToIcon(mimeType?)`.
383
+
- **`Gallery` / `ModalGallery`.** `ModalGallery` API went from `{images, index}` to `{items}` (also accepts `className`, `modalClassName`, `closeOnBackgroundClick`). `Gallery` alone no longer renders a thumbnail grid β supply `GalleryUI` or use `ModalGallery` for the old behavior.
0 commit comments