Skip to content

refactor: remove deprecated APIs ahead of v14 stable#3086

Open
oliverlaz wants to merge 1 commit intomasterfrom
refactor/remove-deprecated-apis
Open

refactor: remove deprecated APIs ahead of v14 stable#3086
oliverlaz wants to merge 1 commit intomasterfrom
refactor/remove-deprecated-apis

Conversation

@oliverlaz
Copy link
Copy Markdown
Member

🎯 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)

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

🎨 UI Changes

No visual changes — all removals are API-only.

Remove 19 deprecated items from multiple major versions.

BREAKING CHANGE: remove deprecated public APIs
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Size Change: -2.02 kB (-0.33%)

Total Size: 611 kB

📦 View Changed
Filename Size Change
dist/cjs/emojis.js 2.96 kB +1 B (+0.03%)
dist/cjs/index.js 236 kB -842 B (-0.36%)
dist/cjs/WithAudioPlayback.js 42.2 kB -176 B (-0.42%)
dist/es/emojis.mjs 2.47 kB +1 B (+0.04%)
dist/es/index.mjs 234 kB -832 B (-0.35%)
dist/es/WithAudioPlayback.mjs 42 kB -175 B (-0.41%)
ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.32 kB
dist/cjs/mp3-encoder.js 1.27 kB
dist/css/emoji-replacement.css 456 B
dist/css/index.css 45.4 kB
dist/es/audioProcessing.mjs 1.31 kB
dist/es/mp3-encoder.mjs 756 B

compressed-size-action

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.35%. Comparing base (7b5835e) to head (9b19b74).

Files with missing lines Patch % Lines
...ponents/ChannelList/hooks/useMessageNewListener.ts 0.00% 6 Missing ⚠️
...ponents/InfiniteScrollPaginator/InfiniteScroll.tsx 0.00% 5 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably use moveChannelUpwards function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants