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
Removing the deprecated MessageContentFactory before updating the message item design.
🛠 Implementation details
Remove class and all related references. All the if checks that were checking if (factory == Deprecated) were simplified to only the true branch.
🎨 UI Changes
None
🧪 Testing
Everything should work as normal
Summary by CodeRabbit
Breaking Changes
Removed the deprecated MessageContentFactory class and its related APIs from public use. Applications relying on this class will need to migrate to the ChatTheme component factory approach.
Refactoring
Simplified message component signatures across the library by consolidating factory parameters for improved consistency and ease of use.
✏️ Tip: You can customize this high-level summary in your review settings.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
The PR removes the deprecated MessageContentFactory class and parameter from the public API. Message content rendering now exclusively uses ChatTheme.componentFactory, eliminating the factory parameter from multiple composable functions and simplifying branching logic across the Compose library.
Entire file deleted (158 lines). Removed deprecated MessageContentFactory class with public methods for composing message content (Giphy, Deleted, Text, Quoted, etc.). Class was annotated for deprecation in favor of ChatTheme.componentFactory.
Removed messageContentFactory parameter from public composables (MessageContent, MessageItem, DefaultMessageItemFooterContent, DefaultMessageItemCenterContent, RegularMessageContent, MessageContainer, DefaultMessageItem). Eliminated conditional branching and now consistently use ChatTheme.componentFactory for all message content rendering.
Message List stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageList.kt, stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/MessagesScreen.kt
Removed messageContentFactory parameter from public MessageList() and MessagesScreen() overloads. Simplified message item composition to always use component factory without conditional logic or factory parameter passing.
Removed messageContentFactory parameter from ChatTheme(...) constructor. Removed ChatTheme.messageContentFactory accessor property. Removed LocalMessageContentFactory compositionLocalof declaration. Removed messageContentFactory from internal calls in ChatComponentFactory (e.g., DefaultMessageContainer, MessageListItemContainer).
Public API Surface stream-chat-android-compose/api/stream-chat-android-compose.api
Updated public API signatures to reflect removal of messageContentFactory parameters from MessageContent, MessageContainer, MessageItem, MessageList, MessagesScreen, and ChatTheme. Removed MessageContentFactory class from public surface.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Update design of quoted message #6084 — Removes quoted-message UI components and factory surface, directly related to message content composition refactoring.
🐰 A factory deprecated bids farewell,
No more branching in our shell!
ComponentTheme now leads the way,
Simpler paths for every day. ✨
Message content, clean and free—
No conditions left to see!
Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title 'Delete deprecated MessageContentFactory' clearly and accurately describes the primary change: removing an entire deprecated class and all its references throughout the codebase.
Description check
✅ Passed
The description covers the main sections (Goal, Implementation details, UI Changes, Testing) but lacks several recommended elements from the template like changelog updates, test coverage details, and contributor checklist completion.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
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.
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
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
Removing the deprecated
MessageContentFactorybefore updating the message item design.🛠 Implementation details
Remove class and all related references. All the if checks that were checking
if (factory == Deprecated)were simplified to only the true branch.🎨 UI Changes
None
🧪 Testing
Everything should work as normal
Summary by CodeRabbit
Breaking Changes
Refactoring
✏️ Tip: You can customize this high-level summary in your review settings.