Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR centralizes UI customization into ChatTheme/ChatComponentFactory, removes many per-call composable slots (channel/item/empty/loading/divider), moves reaction-sorting into MessageListConfig, simplifies header/poll surfaces, and converts several previously public composables to internal. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
895-900:⚠️ Potential issue | 🟠 Major
Channels(...)is still exporting the old slot-based API.Line 900 still exposes
io/getstream/chat/android/compose/ui/channels/list/ChannelsKt.Channels(...)with four composable lambdas, so callers can bypass the trimmedChannelListsurface and keep depending on the legacy customization path. Please makeChannelsinternal too, or prune this signature the same way asChannelList, before regenerating the API.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/api/stream-chat-android-compose.api` around lines 895 - 900, The exported API still includes the legacy slot-based symbol Channels (io/getstream/chat/android/compose/ui/channels/list/ChannelsKt.Channels(...) with four composable lambdas) so callers can bypass ChannelList; update the source so that Channels is not publicly exposed (make Channels internal or remove/prune the legacy overload to match the trimmed ChannelList surface), then regenerate the compiled API so the ChannelsKt.Channels(...) signature is no longer present in the generated .api file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Around line 895-896: Add a new MIGRATION_TO_V7.md (and update CHANGELOG)
documenting the breaking API changes for ChannelList, ChannelListHeader,
ChannelHeader, MessageList, MessageContent, ChannelScreen, PinnedMessageList,
ThreadList, and PollCreationHeader: describe that slot/callback customization
previously passed into these composables is now provided via
ChatComponentFactory, and that reactionSorting has moved into MessageListConfig;
for each symbol (e.g., ChannelList overloads shown in the diff, MessageList,
MessageContent) include concrete before/after snippets, guidance on wiring
custom components through ChatComponentFactory, examples of creating/updating
MessageListConfig with reactionSorting, and any runtime/behavioral changes
callers must handle.
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.kt`:
- Around line 703-704: Add a KDoc block to the public composable PollDialogs to
document its purpose, parameters and usage: describe that PollDialogs is a
state-driven Composable that observes state from the MessageListViewModel
parameter (explain which data/fields it reads and how it reacts to updates),
state/thread expectations (Compose main thread/UI-only usage and any
coroutine/dispatcher assumptions), lifecycle note (how it should be used in a
parent composable and what triggers re-composition), and any preconditions or
recommended usage patterns for callers of PollDialogs. Reference the function
name PollDialogs and the MessageListViewModel type in the KDoc so callers know
this composable consumes view-model state.
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadList.kt`:
- Around line 140-149: The loading and empty branches re-use the caller's
modifier causing duplicate styling because the outer Box already uses
Box(modifier = modifier.padding(padding)); update the calls to
ThreadListLoadingContent and ThreadListEmptyContent to pass a fresh Modifier
(e.g., Modifier) or Modifier.padding(...) instead of the incoming modifier so
they don't re-apply the caller modifier; locate the usages in ThreadList where
ChatTheme.componentFactory.ThreadListLoadingContent(params =
ThreadListLoadingContentParams(modifier = ...)) and
ThreadListEmptyContent(params = ThreadListEmptyContentParams(modifier = ...))
are invoked and replace the passed modifier with Modifier to match the main
thread list branch.
---
Outside diff comments:
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Around line 895-900: The exported API still includes the legacy slot-based
symbol Channels
(io/getstream/chat/android/compose/ui/channels/list/ChannelsKt.Channels(...)
with four composable lambdas) so callers can bypass ChannelList; update the
source so that Channels is not publicly exposed (make Channels internal or
remove/prune the legacy overload to match the trimmed ChannelList surface), then
regenerate the compiled API so the ChannelsKt.Channels(...) signature is no
longer present in the generated .api file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: aa59f8fd-553d-4991-bf44-cf5689b356ce
📒 Files selected for processing (30)
stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/ChannelsScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/header/ChannelListHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/ChannelList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/Channels.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/MessageActions.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/poll/PollAnswers.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/ChannelScreen.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/poll/PollCreationHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/header/ChannelHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/Messages.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/pinned/PinnedMessageList.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/threads/ThreadList.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/channels/ChannelsTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageListTest.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/ChannelItem.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/channels/ChannelList.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageList.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomChannelHeader.ktstream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customattachments/MessagesActivity.kt
💤 Files with no reviewable changes (7)
- stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/ChannelScreen.kt
- stream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customattachments/MessagesActivity.kt
- stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageListTest.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt
- stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
c30ca6e to
da1b0ad
Compare
|
- Fix ChatClientConfig mapping table: correct v6 sources for each param, fix userPresence default (true not false), clarify backgroundSyncEnabled is removed (not mapped to isAutomaticSyncOnReconnectEnabled) - Replace hardcoded version numbers with "check Maven Central" - Add removed lambda parameters for ChannelList, MessageList, ChannelScreen, ChannelListHeader, ChannelHeader (PR #6365) - Document ChatComponentFactory as the replacement for all slot params with link to migration docs - Add cross-reference between §3.4 and §7.2 for changed defaults


Goal
Trim the public API surface of the Compose SDK by removing composable slot parameters (e.g.
itemContent), styling parameters (e.g.color), and forwarded callback parameters from public composables. Customization should go throughChatComponentFactoryinstead.Implementation
ChannelList,MessageList,PinnedMessageList,ThreadList, andMessageContentChannelListHeader,ChannelHeader,PollCreationHeaderMessageListandChannelScreen(e.g.onMessageLinkClick,onUserAvatarClick,onUserMentionClick, poll callbacks)MessagesandChannelscomposables internalreactionSortingfromMessageListparameters toChatUiConfigTesting
Everything should be working as before
Summary by CodeRabbit
Refactor
Chores
Docs