refactor: remove deprecated APIs ahead of v14 stable#3086
Open
refactor: remove deprecated APIs ahead of v14 stable#3086
Conversation
Remove 19 deprecated items from multiple major versions. BREAKING CHANGE: remove deprecated public APIs
|
Size Change: -2.02 kB (-0.33%) Total Size: 611 kB 📦 View Changed
ℹ️ View Unchanged
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3086 +/- ##
==========================================
- Coverage 79.53% 79.35% -0.19%
==========================================
Files 426 424 -2
Lines 12174 12139 -35
Branches 3916 3901 -15
==========================================
- Hits 9683 9633 -50
- Misses 2491 2506 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Comment on lines
+37
to
+44
| if (!lockChannelOrder) { | ||
| const channelIndex = channels.findIndex( | ||
| (channel) => channel.cid === event.cid, | ||
| ); | ||
| if (channelIndex <= 0) return channels; | ||
| const channel = channels[channelIndex]; | ||
| return uniqBy([channel, ...channels], 'cid'); | ||
| } |
Contributor
There was a problem hiding this comment.
This should probably use moveChannelUpwards function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 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)
pinPermissionsprop fromMessageContext,MessageProps,MessageListPropsPinEnabledUserRolesandPinPermissionstypesdefaultPinPermissionsconstant_permissionsparam fromusePinHandler(signature is now(message, notifications))Pagination Renames (6 items, #1804)
hasMore,hasMoreNewer,loadMore,loadMoreNewerfromInfiniteScroll— usehasPreviousPage,hasNextPage,loadPreviousPage,loadNextPagerefreshingfromLoadMoreButton,LoadMorePaginator,PaginatorProps— useisLoadingdeprecationAndReplacementWarningutility (zero callers remain)Components & Exports (4 items)
StreamEmojicomponentUploadButton/UploadButtonPropsexports toFileInput/FileInputPropslatestMessageprop fromChannelListItemUI— uselatestMessagePreviewpopperOptionsprop fromEmojiPicker— useplacementUtilities (2 items)
moveChannelUp(replaced bymoveChannelUpwards); updateduseMessageNewListenerhasNotMoreMessages(negated duplicate ofhasMoreMessagesProbably)Bug fix
MessageList.tsxwhereloadMoreNewerwas incorrectly labeled as deprecatedSee
ai-docs/DEPRECATED_API_REMOVAL_PLAN.mdfor the full inventory and remaining items.⚠ Breaking Changes
pinPermissionspropchannelCapabilities(already used at runtime)PinPermissions,PinEnabledUserRolestypeschannelCapabilitiesdefaultPinPermissionsconstantchannelCapabilitiesusePinHandler(msg, permissions, notifications)usePinHandler(msg, notifications)hasMore/hasMoreNewer(InfiniteScroll)hasPreviousPage/hasNextPageloadMore/loadMoreNewer(InfiniteScroll)loadPreviousPage/loadNextPagerefreshing(LoadMoreButton, PaginatorProps)isLoadingStreamEmojicomponentmoveChannelUputilitymoveChannelUpwardsUploadButton/UploadButtonPropsFileInput/FileInputPropslatestMessageprop (ChannelListItemUI)latestMessagePreviewpopperOptionsprop (EmojiPicker)placementhasNotMoreMessageshasMoreMessagesProbably🎨 UI Changes
No visual changes — all removals are API-only.