Commit 8317b73
refactor!: remove deprecated APIs ahead of v14 stable (#3086)
### π― Goal
Remove 19 deprecated APIs that have accumulated over multiple major
versions (some since v10) before the v14 stable release. This reduces
public API surface area and eliminates dead code paths, fallback
patterns, and runtime deprecation warnings.
### π Implementation details
Removed items grouped by category:
**Pin Permissions (7 items)**
- `pinPermissions` prop from `MessageContext`, `MessageProps`,
`MessageListProps`
- `PinEnabledUserRoles` and `PinPermissions` types
- `defaultPinPermissions` constant
- `_permissions` param from `usePinHandler` (signature is now `(message,
notifications)`)
**Pagination Renames (6 items, #1804)**
- `hasMore`, `hasMoreNewer`, `loadMore`, `loadMoreNewer` from
`InfiniteScroll` β use `hasPreviousPage`, `hasNextPage`,
`loadPreviousPage`, `loadNextPage`
- `refreshing` from `LoadMoreButton`, `LoadMorePaginator`,
`PaginatorProps` β use `isLoading`
- Removed `deprecationAndReplacementWarning` utility (zero callers
remain)
**Components & Exports (4 items)**
- Deleted `StreamEmoji` component
- Renamed `UploadButton`/`UploadButtonProps` exports to
`FileInput`/`FileInputProps`
- Removed `latestMessage` prop from `ChannelListItemUI` β use
`latestMessagePreview`
- Removed `popperOptions` prop from `EmojiPicker` β use `placement`
**Utilities (2 items)**
- Deleted `moveChannelUp` (replaced by `moveChannelUpwards`); updated
`useMessageNewListener`
- Deleted `hasNotMoreMessages` (negated duplicate of
`hasMoreMessagesProbably`)
**ChannelList Event Listener Hooks (10 items)**
- Deleted `useChannelDeletedListener`, `useChannelHiddenListener`,
`useChannelTruncatedListener`, `useChannelUpdatedListener`,
`useChannelVisibleListener`, `useMessageNewListener`,
`useNotificationAddedToChannelListener`,
`useNotificationMessageNewListener`,
`useNotificationRemovedFromChannelListener`,
`useUserPresenceChangedListener`
- These hooks were standalone event listeners consuming `ChannelList`
callback props (e.g. `onChannelDeleted`, `onMessageNew`, etc.) β channel
list event handling is now managed internally by the `stream-chat` SDK's
`ChannelManager`
**Bug fix**
- Fixed wrong deprecation comment on `MessageList.tsx` where
`loadMoreNewer` was incorrectly labeled as deprecated
See `ai-docs/DEPRECATED_API_REMOVAL_PLAN.md` for the full inventory and
remaining items.
### β Breaking Changes
| Removed API | Replacement |
| ------------------------------------------------ |
---------------------------------------------------- |
| `pinPermissions` prop | `channelCapabilities` (already used at
runtime) |
| `PinPermissions`, `PinEnabledUserRoles` types | `channelCapabilities`
|
| `defaultPinPermissions` constant | `channelCapabilities` |
| `usePinHandler(msg, permissions, notifications)` | `usePinHandler(msg,
notifications)` |
| `hasMore` / `hasMoreNewer` (InfiniteScroll) | `hasPreviousPage` /
`hasNextPage` |
| `loadMore` / `loadMoreNewer` (InfiniteScroll) | `loadPreviousPage` /
`loadNextPage` |
| `refreshing` (LoadMoreButton, PaginatorProps) | `isLoading` |
| `StreamEmoji` component | (removed, no replacement) |
| `moveChannelUp` utility | `moveChannelUpwards` |
| `UploadButton` / `UploadButtonProps` | `FileInput` / `FileInputProps`
|
| `latestMessage` prop (ChannelListItemUI) | `latestMessagePreview` |
| `popperOptions` prop (EmojiPicker) | `placement` |
| `hasNotMoreMessages` | `hasMoreMessagesProbably` |
| `useChannelDeletedListener` hook | Channel list events handled by
`useChannelListShape` |
| `useChannelHiddenListener` hook | -//- |
| `useChannelTruncatedListener` hook | -//- |
| `useChannelUpdatedListener` hook | -//- |
| `useChannelVisibleListener` hook | -//- |
| `useMessageNewListener` hook | -//- |
| `useNotificationAddedToChannelListener` hook | -//- |
| `useNotificationMessageNewListener` hook | -//- |
| `useNotificationRemovedFromChannelListener` hook | -//- |
| `useUserPresenceChangedListener` hook | -//- |
### π¨ UI Changes
No visual changes β all removals are API-only.
---------
Co-authored-by: Anton Arnautov <arnautov.anton@gmail.com>
Co-authored-by: Anton Arnautov <43254280+arnautov-anton@users.noreply.github.com>1 parent 30e45fa commit 8317b73
File tree
35 files changed
+139
-787
lines changed- ai-docs
- src
- components
- ChannelListItem
- ChannelList
- hooks
- InfiniteScrollPaginator
- __tests__
- LoadMore
- __tests__
- MessageList
- Message
- hooks
- ReactFileUtilities
- Reactions
- context
- mock-builders/event
- plugins/Emojis
- types
- utils
35 files changed
+139
-787
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 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 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 1 | | |
7 | | - | |
8 | 2 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 3 | | |
13 | | - | |
14 | 4 | | |
15 | 5 | | |
Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 0 additions & 35 deletions
This file was deleted.
0 commit comments