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
{{ message }}
Repository navigation
Commit 85d5b4e
Browse filesBrowse the repository at this point in the historyBrowse files
fix!: ship the CustomChannelData typing and remove dead exports and the transliterate dependency (#3403)
BREAKING CHANGE: unused exports and the transliterate dependency are removed, and stream-chat-react now types channel custom data for apps.
- `Root` and `Header` are no longer exported from the package root. They are the parts of `Alert`; use `Alert.Root` and `Alert.Header`.
- `UploadIcon`, `BinIcon`, `PauseIcon` and `PlayIcon` are removed. Copy the SVG into the app, or use `IconPlus` / `IconAttachment`, `IconDelete`, `IconPauseFill` and `IconPlayFill` from the v15 icon set.
- `@stream-io/transliterate` is no longer an optional dependency. Apps that import it must add it to their own dependencies. For mention search, pass a `transliterate` function to stream-chat's mentions middleware.
- Importing `stream-chat-react` now types `channel.data.custom.name` and `.image` (`string | undefined`). Delete the app's own `name` / `image` declarations on `CustomChannelData`; a declaration with another type overrides the SDK's under `skipLibCheck` and fails with TS2430 without it.
- `DefaultChannelData` no longer has `subtitle` or `team`. Declare them on `CustomChannelData` if the app stores them under `custom`; read the channel's team from `channel.data.team`.
- The translation key `messageComposer.icons.attachFiles.text` is removed.
See ai-docs/v15-breaking-changes.md (BC-101) and ai-docs/ai-migration-v14-v15.md.
Copy file name to clipboardExpand all lines: ai-docs/i18n-v15-key-map.json
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"$comment": "Migration table: natural-language translation key (v14) -> namespaced key (v15). Hand-reviewed; nothing regenerates it. Integrators who passed translationsForLanguage/registerTranslation dictionaries keyed on the old strings should use this to rename their keys. Where one v14 key became several v15 keys, `key` is the first and `also` lists the rest: copy the translation to each. See ai-docs/i18n-v15-migration.md.",
Copy file name to clipboardExpand all lines: ai-docs/i18n-v15-migration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ imported and copied into `Streami18n` at construction, so they shipped even if y
36
36
37
37
## Renaming your keys
38
38
39
-
Every old key that v15 still has maps to a new key ([some were removed](#keys-removed-without-a-replacement)). A few now feed two: their entry lists the second under `also`, and the translation goes on both. The full table (661 rows, covering the `aiComponents.*` keys of `stream-chat-react/ai-components` except the attachment's `Image`, which the plugin README maps) is
39
+
Every old key that v15 still has maps to a new key ([some were removed](#keys-removed-without-a-replacement)). A few now feed two: their entry lists the second under `also`, and the translation goes on both. The full table (660 rows, covering the `aiComponents.*` keys of `stream-chat-react/ai-components` except the attachment's `Image`, which the plugin README maps) is
@@ -107,7 +107,7 @@ nothing catches a stale one there. The extra plural categories some languages us
107
107
These v14 keys (from `src/i18n/en.json` at `v14.10.0`, plural suffixes folded) have no entry in the key map. A `t()` call on one of them no longer compiles (`TS2769`), and a dictionary entry for one never matches. Copy you still need is app-owned now: give it a key of your own through `asDynamicKey`, with the English inline, and keep its translations in your dictionaries ([Calling `t` in your own components](#calling-t-in-your-own-components)).
108
108
109
109
```text
110
-
{{ imageCount }} more | {{ user }} is typing... | {{ users }} and {{ user }} are typing... | {{ users }} and more are typing... | +{{ imageCount }} | Allow comments | Allow option suggestion | aria/Collapse sidebar | aria/Expand sidebar | aria/Unblock User | Attachment | Channel members | Close emoji picker | Commands matching | Connection failure, reconnecting now... | Create | Delete for me | Download attachment {{ name }} | Drag your files here to add to your post | Emoji matching | End | End vote | Error connecting to chat, refresh the page to try again. | Error removing members | Error uploading file | Error uploading image | Failed to delete the message | Failed to load channels | Failed to load more channels | Failed to mark channel as read | File is too large: {{ size }}, maximum upload size is {{ limit }} | Image | Link | live | Manage members | Maximum number of votes (from 2 to 10) | mention/Channel | mention/Here | Menu | Messages have been marked unread. | Missing permissions to upload the attachment | network error | New | No chats here yet… | Nobody will be able to vote in this poll anymore. | Ok | Open emoji picker | People matching | Remove | Remove {{ count }} members | Remove channel members | Removed {{ count }} members | Reply to Message | Searching... | searchResultsCount | Select a thread to continue the conversation | Shared live location | Slow Mode ON | Submit | Thread reply | Upload type: "{{ type }}" is not allowed | You've reached the maximum number of files
110
+
{{ imageCount }} more | {{ user }} is typing... | {{ users }} and {{ user }} are typing... | {{ users }} and more are typing... | +{{ imageCount }} | Allow comments | Allow option suggestion | aria/Collapse sidebar | aria/Expand sidebar | aria/Unblock User | Attach files | Attachment | Channel members | Close emoji picker | Commands matching | Connection failure, reconnecting now... | Create | Delete for me | Download attachment {{ name }} | Drag your files here to add to your post | Emoji matching | End | End vote | Error connecting to chat, refresh the page to try again. | Error removing members | Error uploading file | Error uploading image | Failed to delete the message | Failed to load channels | Failed to load more channels | Failed to mark channel as read | File is too large: {{ size }}, maximum upload size is {{ limit }} | Image | Link | live | Manage members | Maximum number of votes (from 2 to 10) | mention/Channel | mention/Here | Menu | Messages have been marked unread. | Missing permissions to upload the attachment | network error | New | No chats here yet… | Nobody will be able to vote in this poll anymore. | Ok | Open emoji picker | People matching | Remove | Remove {{ count }} members | Remove channel members | Removed {{ count }} members | Reply to Message | Searching... | searchResultsCount | Select a thread to continue the conversation | Shared live location | Slow Mode ON | Submit | Thread reply | Upload type: "{{ type }}" is not allowed | You've reached the maximum number of files
|[BC-093](#bc-093)|`MessageContextValue.onMentionsClickMessage` / `onMentionsHoverMessage` and `useMentionsHandler`'s handlers are `undefined` without a handler | Messages and message lists |
164
164
|[BC-094](#bc-094)|`mentionsMarkdownPlugin` and `createMentionPluginAndDisplayTextSet` take mention entities only | Messages and message lists |
165
165
|[BC-095](#bc-095)|`disableQuotedMessages` is removed from `MessageProps`, `MessageListProps` and `useMessagePermissions`| Messages and message lists |
166
+
|[BC-097](#bc-097)| channel detail views render no close button outside a modal without `onClose`; `ChannelDetail` calls `onLayoutChange`| Chat, ChatView and layout |
167
+
|[BC-101](#bc-101)|`Root`, `Header`, `UploadIcon`, `BinIcon`, `PauseIcon`, `PlayIcon` unexported; `@stream-io/transliterate` dropped; `CustomChannelData` typed for apps; `DefaultChannelData` holds only `name` and `image`| Package and runtime |
166
168
|[BC-102](#bc-102)|`initialMessage` is removed from `MessageProps` and `MessageContextValue`; `useIsRenderedAsThreadParent()` tells the thread's parent message apart | Messages and message lists |
### BC-101: `Root`, `Header`, `UploadIcon`, `BinIcon`, `PauseIcon` and `PlayIcon` are no longer exported; `@stream-io/transliterate` is no longer a dependency; `CustomChannelData` is typed for apps and `DefaultChannelData` holds only `name` and `image`
254
+
255
+
- Status: confirmed
256
+
- Area: package / exports / types
257
+
- User impact:
258
+
- compile error (`TS2305`) on importing `Root` or `Header` from `stream-chat-react`, and `undefined` in plain JS. They are the parts of `Alert`, exported under generic names; `Alert.Root`, `Alert.Header` and `Alert.Actions` are unchanged.
259
+
- compile error (`TS2305`) on importing `UploadIcon`, `BinIcon`, `PauseIcon` or `PlayIcon`. No SDK component rendered them in v14 or v15.
260
+
- install: `@stream-io/transliterate` is no longer installed with this package. No SDK code imported it in v14 or v15; an app that imports it without declaring it gets a module-not-found error.
261
+
- types: `channel.data.custom.name` and `.image` are typed `string | undefined` in every app that imports `stream-chat-react`. v14 and earlier v15 release candidates declared the merge of `DefaultChannelData` into `CustomChannelData` in a file `tsc` did not emit, so apps saw `CustomChannelData` without those fields. An app that augments `CustomChannelData` with `name` or `image` under another type gets no error with `skipLibCheck: true` (its own type wins), and `TS2430` inside `stream-chat`'s `custom_types.d.ts` without it.
262
+
- types: `DefaultChannelData` loses `subtitle` and `team`. No SDK code read them; `team` is a top-level channel field in `stream-chat` v10 (`channel.data.team`), not custom data. Code that reads `DefaultChannelData['team']`, or relies on `extends DefaultChannelData` to type `custom.subtitle` / `custom.team`, gets `TS2339`.
263
+
- Old API:
264
+
-`Root`, `Header` (`src/components/Dialog/components/Alert.tsx`), re-exported from the package root through `Dialog/components/index.ts`
265
+
-`UploadIcon`, `BinIcon`, `PauseIcon`, `PlayIcon` (`src/components/MessageComposer/icons.tsx`), re-exported through `MessageComposer/index.ts`
-`src/@types/stream-chat-custom-data.d.ts`, a declaration-only file that `tsc` never copies to `dist/types`
269
+
- Replacement:
270
+
-`Root` / `Header`: `Alert.Root` / `Alert.Header`, the same components.
271
+
- The icons: copy the SVG into the app, or use the v15 icon set: `IconPlus` or `IconAttachment` for `UploadIcon`, `IconDelete` for `BinIcon`, `IconPauseFill` for `PauseIcon`, `IconPlayFill` for `PlayIcon`. They follow the v15 design, not the v14 shapes, and take `BaseIconProps`.
272
+
-`@stream-io/transliterate`: add it to the app's own dependencies if the app imports it. Mention search in `stream-chat` takes a `transliterate` function on its mentions middleware.
273
+
-`CustomChannelData`: delete an app's own `name?: string` / `image?: string` declarations, which are now redundant, and keep the augmentation for the app's other fields. Rename a field the app declares as `name` or `image` with another type. Declare `subtitle?: string` / `team?: string` on `CustomChannelData` if the app stores them under `custom`; read the channel's team from `channel.data.team`.
274
+
- Evidence:
275
+
-`release-v14:src/components/Dialog/components/Alert.tsx:6`, `:25``export const Root` / `export const Header`; `master:src/components/Dialog/components/Alert.tsx` declares both without `export` and exports them as `Alert.Root` / `Alert.Header`, like `Prompt` and `Viewer`
276
+
-`release-v14:src/components/MessageComposer/icons.tsx:3`, `:30`, `:36`, `:47`; `release-v14:src/components/MessageComposer/index.ts:19``export * from './icons'`; no other reference in `src` or `examples` on either branch
277
+
-`release-v14:package.json:122``"@stream-io/transliterate": "^1.5.5"`; no import in `src` on either branch
278
+
-`release-v14:src/@types/stream-chat-custom-data.d.ts:19``interface CustomChannelData extends DefaultChannelData {}`; `release-v14:tsconfig.lib.json` emits declarations from `.ts` sources only, so `dist/types/@types` does not exist. `master:src/types/defaultDataInterfaces.ts` declares `DefaultChannelData` with `image` and `name` only, declares the merge and ships as `dist/types/types/defaultDataInterfaces.d.ts`, re-exported from `dist/types/index.d.ts`
279
+
- commit: REACT-1306
280
+
- Docs impact:
281
+
-`02-state/01-state-and-entities/06-data-conventions.md` (the `CustomChannelData` augmentation sample), `08-release-guides/01-upgrade-to-v15.md`
0 commit comments