-
Notifications
You must be signed in to change notification settings - Fork 309
Update design of quoted message #6084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SDK Size Comparison 📏
|
e316231 to
08e62ef
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughRemoves multiple quoted-message composables and formatting APIs, introduces an internal QuotedMessageBodyBuilder, threads an onCancelAction through composer/input components, updates theme/color APIs (removing quoted-message styles), removes PRODUCT attachment type, adds drawable assets and string changes, and adds tests for the new body builder. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as MessagesActivity (Compose)
participant Composer as MessageComposer
participant Input as MessageInput
participant VM as ComposerViewModel / ListViewModel
User->>UI: Tap cancel icon on quoted composer
UI->>Composer: onCancelAction()
Composer->>Input: forward onCancelAction
Input->>VM: composerViewModel.dismissMessageActions()
VM-->>UI: state updated (actions dismissed)
UI-->>User: UI hides quoted composer / updates state
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
3544-3578:MessageTheme/StreamColorsdata-class-style API churn (componentN,copy, constructor arity) will break destructuring and compiled consumers.
If these are intentionally part of the public API, try to minimize reorder/add churn (or discourage destructuring in docs). Where possible, prefer additive APIs (new named getters) over constructor/copy signature growth to keep ABI steadier.Also applies to: 3625-3714
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.kt (1)
68-83: Missing KDoc for the newonCancelActionparameter.The new
onCancelActionparameter is undocumented in the KDoc comment block (lines 54-67). As per coding guidelines, public APIs should be documented with KDoc.📝 Suggested KDoc addition
Add the following to the KDoc block:
* `@param` onValueChange Handler when the value changes. * `@param` onAttachmentRemoved Handler when the user removes a selected attachment. + * `@param` onCancelAction Handler when the user cancels the current message action (e.g., reply or edit). * `@param` modifier Modifier for styling.
🤖 Fix all issues with AI agents
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Around line 1851-1852: The public API for QuotedMessage exposes two Message
parameters in the generated signature which risks call-site confusion; update
the Kotlin declaration of QuotedMessage to use explicit, distinct parameter
names and a stable parameter order (e.g., quotedMessage vs
parentMessage/currentMessage) and ensure the function parameter list in the
source matches that order exactly, add KDoc to each parameter describing its
role, and consider providing a clear overload or named parameters usage example
in the source so call-sites and the generated signature are unambiguous.
- Around line 1683-1684: Add migration documentation and release notes stating
that the public Composable MessageInput now has a required onCancelAction
parameter (previously optional), describe that this is a breaking API change for
v7 releases, and provide a short migration example showing callers must pass an
onCancelAction lambda (or a default helper) when calling MessageInput; update
CHANGELOG / release notes to mention MessageInput and onCancelAction,
recommended migration code patterns, and that all internal callers were already
updated.
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt`:
- Around line 149-172: The function MessageComposerQuotedMessage currently
ignores its modifier parameter; update the composable to apply the passed-in
modifier so callers can style it (e.g., use Box(modifier = modifier) or
Box(modifier = modifier.then(...)) ), ensuring the modifier is applied to the
root container (MessageComposerQuotedMessage's Box) and not dropped; keep
internal alignment/offset for ComposerCancelIcon unchanged and do not remove
QuotedMessage or ComposerCancelIcon.
- Around line 86-146: The quoted message body is being remembered only by
message and currentUser, so include the bodyBuilder (or its inputs) in the
remember keys to avoid stale UI: change the body remember call to include
bodyBuilder (e.g., remember(bodyBuilder, message, currentUser) {
bodyBuilder.build(message, currentUser) }) or include the relevant
theme-dependent inputs; also propagate the modifier parameter from
MessageComposerQuotedMessage into the QuotedMessage call so external
styling/test tags apply (ensure MessageComposerQuotedMessage passes its modifier
through to QuotedMessage).
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt`:
- Around line 262-269: The remember call that creates a QuotedMessageBodyBuilder
must include streamCdnImageResizing in its key list; update the remember
invocation (the one returning QuotedMessageBodyBuilder(resources,
autoTranslationEnabled, durationFormatter, streamCdnImageResizing)) to pass
streamCdnImageResizing alongside resources, autoTranslationEnabled, and
durationFormatter so the builder is recreated whenever streamCdnImageResizing
changes.
🧹 Nitpick comments (9)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.kt (1)
51-79: LGTM! Consider adding a preview.The Row layout and UI elements are well-structured. Based on coding guidelines, Compose previews should use
@StreamPreviewhelpers. Consider adding one for easier development iteration.💡 Optional: Add a StreamPreview
`@StreamPreview` `@Composable` private fun MessageInputOptionsPreview() { ChatTheme { MessageInputOptions( activeAction = Edit(Message()), onCancelAction = {}, ) } }stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt (2)
44-62: Consider using backtick test naming convention.Per coding guidelines, test methods should use backtick names for readability. While the
@ParameterizedTest(name = "{0}")provides descriptive test run names, the method itself could follow the convention:- fun testBuild( + fun `build returns expected QuotedMessageBody`(
64-74: Document the reason for suppressions.Per coding guidelines, suppressions should be documented. Consider adding brief comments:
- `@Suppress`("LargeClass") + `@Suppress`("LargeClass") // Contains comprehensive test data for all attachment types companion object { ... `@JvmStatic` - `@Suppress`("LongMethod") + `@Suppress`("LongMethod") // Parameterized test data covering all QuotedMessageBody scenarios fun attachmentTestCases() = listOf(stream-chat-android-compose/api/stream-chat-android-compose.api (1)
3224-3226:ChatTheme(...)public API has an extremely long parameter list — consider a params object/builder to stabilize the surface.
Large, positional parameter lists are hard to use correctly and very costly to evolve; a dedicatedChatThemeParams(or builder DSL) tends to reduce future breaking changes and makes call sites self-documenting.stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt (1)
423-445: Good extraction of the trailing icon composable.The refactoring improves readability by moving the inline Icon into a named composable. One minor accessibility consideration:
contentDescription = nullmeans screen readers won't announce the button's purpose. Consider providing a descriptive string like "Send message".♻️ Suggested improvement for accessibility
painter = painterResource(id = R.drawable.stream_compose_ic_send), tint = ChatTheme.colors.primaryAccent, - contentDescription = null, + contentDescription = "Send message", )stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt (2)
1759-1785: Public API change: document (and sanity-check) the newonCancelhook inMessageComposerInput.
- KDoc above
RowScope.MessageComposerInputdoesn’t mentiononCancel(Line 1772), and this is a public customization surface. As per coding guidelines, public APIs should be fully documented.- If you’re trying to minimize breaking changes for custom
ChatComponentFactoryimplementations, consider a default (onCancel: () -> Unit = {}) and/or an overload that preserves the prior signature. As per coding guidelines, ...
126-126: Avoid name shadowing:MessageComposerQuotedMessagedelegation is correct but fragile/unclear.The method body relies on named arguments (
message = …,currentUser = …) to resolve the importedio.getstream.chat.android.compose.ui.components.messages.MessageComposerQuotedMessage, not the factory method itself. This is easy to misread and can break if someone “simplifies” to positional args. Also, KDoc doesn’t mentiononCancelClick.Proposed clarity fix (alias the import)
-import io.getstream.chat.android.compose.ui.components.messages.MessageComposerQuotedMessage +import io.getstream.chat.android.compose.ui.components.messages.MessageComposerQuotedMessage as DefaultMessageComposerQuotedMessage @@ public fun MessageComposerQuotedMessage( modifier: Modifier, state: MessageComposerState, quotedMessage: Message, onCancelClick: () -> Unit, ) { - MessageComposerQuotedMessage( + DefaultMessageComposerQuotedMessage( modifier = modifier, message = quotedMessage, currentUser = state.currentUser, onCancelClick = onCancelClick, ) }Also applies to: 1787-1810
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt (1)
25-120: StreamColors KDoc is now out of sync with the constructor (new semantic tokens are undocumented).Please add
@paramdocs for the new public fields (e.g.,textPrimary,chatBgAttachmentIncoming/outgoing,chatReplyIndicatorIncoming/outgoing,chatTextMessage) so generated docs match the actual theming API. As per coding guidelines, ...stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (1)
175-287: Nice cohesion in the new internal rendering; please add snapshot coverage for regressions.The extraction into small composables (
QuotedMessageUserName,QuotedMessageText,QuotedMessageAttachmentPreview, etc.) makes the new design easier to reason about. Given this is a visual redesign, adding/refreshing Paparazzi snapshots for quoted/reply states would help prevent accidental regressions. Based on learnings, ...
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (35)
stream-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/attachments/content/QuotedMessageAttachmentContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageText.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.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/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/messages/list/QuotedMessageStyle.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/QuotedMessageTextFormatter.ktstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_chart.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_file.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_link.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_map_pin.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_microphone.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_play_solid.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_video_outline.xmlstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/util/DefaultQuotedMessageTextFormatterTest.ktstream-chat-android-core/api/stream-chat-android-core.apistream-chat-android-core/src/main/java/io/getstream/chat/android/models/AttachmentType.ktstream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/general/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-ui-common/src/main/res/values/strings.xmlstream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt
💤 Files with no reviewable changes (11)
- stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/messages/list/QuotedMessageStyle.kt
- stream-chat-android-core/api/stream-chat-android-core.api
- stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/util/DefaultQuotedMessageTextFormatterTest.kt
- stream-chat-android-core/src/main/java/io/getstream/chat/android/models/AttachmentType.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/QuotedMessageAttachmentContent.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageContent.kt
- stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageText.kt
- stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/general/ChatTheme.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/QuotedMessageTextFormatter.kt
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{kt,kts}
📄 CodeRabbit inference engine (AGENTS.md)
Format and apply Kotlin style with Spotless (4 spaces, no wildcard imports, licence headers)
Files:
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.kt
**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
**/*.kt: Use@OptInannotations explicitly; avoid suppressions unless documented
Document public APIs with KDoc, including thread expectations and state notes
Files:
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.kt
**/stream-chat-android-compose/**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
**/stream-chat-android-compose/**/*.kt: Compose components should follow noun-based naming (e.g.,MessageList,ChannelListHeader)
Compose previews should use@StreamPreviewhelpers
Files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
**/src/test/**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
**/src/test/**/*.kt: Use backtick test names (for example:funmessage list filters muted channels()) for readability
Use deterministic tests withrunTest+ virtual time for concurrency-sensitive logic (uploads, sync, message state)
Keep helper extensions private/internal in test files
Files:
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt
**/stream-chat-android-compose/**/*Test.kt
📄 CodeRabbit inference engine (AGENTS.md)
Add Paparazzi snapshots for Compose UI regressions and run
verifyPaparazziDebug
Files:
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt
🧠 Learnings (6)
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*Test.kt : Add Paparazzi snapshots for Compose UI regressions and run `verifyPaparazziDebug`
Applied to files:
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xmlstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_file.xmlstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-ui-components/**/*Test.kt : Record Shot baselines when behaviour changes in XML kit UI tests
Applied to files:
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_play_solid.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_file.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_video_outline.xmlstream-chat-android-ui-common/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_chart.xmlstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_microphone.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*.kt : Compose previews should use `StreamPreview` helpers
Applied to files:
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xmlstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.ktstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_file.xmlstream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/src/main/res/drawable/stream_compose_ic_link.xmlstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*.kt : Compose components should follow noun-based naming (e.g., `MessageList`, `ChannelListHeader`)
Applied to files:
stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/src/test/**/*.kt : Use backtick test names (for example: `fun `message list filters muted channels`()`) for readability
Applied to files:
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/src/test/**/*.kt : Use deterministic tests with `runTest` + virtual time for concurrency-sensitive logic (uploads, sync, message state)
Applied to files:
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt
🧬 Code graph analysis (3)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (3)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt (1)
rememberBodyBuilder(255-270)stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/ComposerCancelIcon.kt (1)
ComposerCancelIcon(41-59)stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/ImageUtils.kt (4)
StreamAsyncImage(113-128)StreamAsyncImage(142-168)StreamAsyncImage(182-197)StreamAsyncImage(211-247)
stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt (1)
stream-chat-android-core/src/testFixtures/kotlin/io/getstream/chat/android/Mother.kt (2)
randomPoll(866-908)randomLocation(1132-1148)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt (1)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (1)
MessageComposerQuotedMessage(149-172)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build / compose apks
- GitHub Check: base-android-ci / Run unit tests
- GitHub Check: base-android-ci / Run static checks
- GitHub Check: base-android-ci / Build
- GitHub Check: Detekt
- GitHub Check: compare-sdk-sizes / Compare SDK sizes
🔇 Additional comments (23)
stream-chat-android-ui-common/src/main/res/values/strings.xml (1)
152-153: LGTM! Emoji prefixes removed from location strings.The removal of the map pin emoji (📍) from both location labels aligns with the design update objective and provides cleaner, more accessible text. This is consistent with the broader effort to update UI presentation across the app.
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInputOptions.kt (2)
35-42: LGTM!The KDoc accurately reflects the updated behavior, documenting that this component now only renders for
Editactions.
49-49: Reply handling is properly covered in MessageInput component.The
if (activeAction !is Edit) returnearly return is intentional design. Reply actions are handled inMessageInput.kt(lines 105-110), whereif (activeAction is Reply)triggersMessageComposerQuotedMessagerendering. The change is correct with no regression risk.stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/cookbook/ui/CustomComposerAndAttachmentsPicker.kt (1)
146-146: LGTM!The
onCancelActioncallback is correctly wired to dismiss message actions, aligning with the new API introduced inMessageInputfor handling cancel events on quoted/reply messages.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt (1)
41-90: Well-structured builder consolidating quoted message logic.The
QuotedMessageBodyBuildercleanly centralizes the rendering logic for quoted messages across various content types (deleted, poll, location, attachments). The cascadingwhenexpression provides clear precedence for different message states.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageTheme.kt (1)
112-114: Document the@Suppress("DEPRECATION_ERROR")suppression.The annotation suppresses errors from accessing deprecated ERROR-level properties in
StreamColors(ownMessagesBackground,otherMessagesBackground,deletedMessagesBackground,ownMessageText,otherMessageText). Per coding guidelines, avoid suppressions unless documented—add a KDoc comment explaining that this is intentional and necessary to access these deprecated but still-functional color properties during the migration to the newMessageThemeAPI.stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilderTest.kt (2)
652-692: Well-structured mock helpers.The mock setup is clean and correctly handles all the string and plural resources needed by the builder. Keeping these as private functions in the companion object follows the guidelines for test helper visibility.
74-650: Excellent test coverage.The test cases comprehensively cover all attachment types, edge cases, and auto-translation scenarios. The parameterized approach with descriptive names makes it easy to identify which scenarios are being tested.
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
2891-2902: No breaking change—MessageComposerInputandMessageComposerQuotedMessagehave default implementations in the interface.Custom
ChatComponentFactoryimplementations are not forced to override these methods. Both methods already have default implementations in theChatComponentFactoryinterface (see lines 1768–1785 and 1798–1810 in ChatComponentFactory.kt), so existing custom factories continue to work without modification.stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_play_solid.xml (1)
1-25: LGTM!Well-formed vector drawable with proper license header. The smaller 10x10dp size and solid white fill (vs. 12x12dp stroke-based icons elsewhere) is appropriate for a video thumbnail overlay indicator.
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_link.xml (1)
1-32: LGTM!Valid vector drawable with consistent styling (12x12dp, stroke color
#384047, stroke width 1.2) matching the other icons in this PR. The clip-path and path structure correctly form the link icon.stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_map_pin.xml (1)
1-34: LGTM!Well-structured vector drawable with two paths forming the map pin icon. Consistent styling with other icons in the set.
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_file.xml (1)
1-28: LGTM!Clean vector drawable implementation with consistent styling. The path correctly renders a file icon with the characteristic folded corner.
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_video_outline.xml (1)
1-34: LGTM!Valid vector drawable with two paths forming the video camera outline. Maintains consistent styling with the other icons in this asset set.
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_microphone.xml (1)
1-29: LGTM!The vector drawable follows Android conventions with proper license header, matching dimensions/viewport, and appropriate stroke styling for the microphone icon.
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_chart.xml (1)
1-29: LGTM!The vector drawable follows Android conventions with proper license header and appropriate stroke styling for the chart icon. The square line caps are appropriate for the bar chart aesthetic.
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageComposer.kt (2)
81-84: LGTM!The documentation snippet correctly demonstrates the new
onCancelActionhandler, properly dismissing message actions from both the list and composer view models to ensure consistent UI state.
205-205: LGTM!The customization snippet correctly wires
onCancelActionto theMessageInputcomponent, consistent with the new API surface.stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt (1)
394-397: LGTM!The
onCancelActioncallback correctly dismisses message actions from both view models, ensuring the UI state is properly cleared when the user cancels a reply or edit action.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/composer/MessageInput.kt (1)
105-111: LGTM on the wiring ofonCancelAction.The cancel action is correctly passed through to the
MessageComposerQuotedMessagecomponent, enabling users to dismiss the reply action from the quoted message UI.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt (1)
128-224: Defaults + new primitives look coherent; please verify contrast/spec for dark mode tokens.The mapping of incoming/outgoing + reply indicator tokens to the new
StreamPrimitiveColorsreads consistent with the design-system intent, and keepingchatTextMessagedefaulted fromtextPrimaryis a nice simplification. I’d just sanity-check (visually) contrast forchatReplyIndicatorOutgoing = blue300onchatBgOutgoing = blue800.Also applies to: 228-246
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt (1)
47-52: Unusual member imports fromChatTheme: ensure these are intentional and don’t trip unused-import rules.If these are only for KDoc symbol resolution, consider using fully-qualified references in KDoc instead of imports (depending on your lint setup).
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/composer/MessageComposer.kt (1)
172-183:onCancelActionpropagation looks correct end-to-end.Both composer entry points now thread
onCancelActionintoMessageInput(Line 180 / Line 327, then Line 602), which aligns with the new quoted-message cancel UX.Also applies to: 321-331, 579-605
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
...pose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt
Show resolved
Hide resolved
...pose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt
Show resolved
Hide resolved
...in/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt
Outdated
Show resolved
Hide resolved
stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xml
Show resolved
Hide resolved
4e183e5 to
f3c1b5f
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
1 similar comment
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.kt (1)
294-341: Remove dead code:quotedDateAttachmentFactoryandQuotedDateAttachmentContentare unused.The Compose
ChatThemedoes not support aquotedAttachmentFactoriesparameter, so thequotedDateAttachmentFactory(lines 294-302) andQuotedDateAttachmentContent(lines 304-341) cannot be wired into the theme and have no effect. This pattern appears to be from the UI version, which has different customization APIs.Remove this code snippet or update the documentation to explain how quoted message customization works in Compose (if supported).
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
3585-3680:StreamColorshas breaking changes requiring migration — comprehensive guidance is available in DEPRECATIONS.md.The shape change is confirmed: Several deprecated properties (
ownMessagesBackground,otherMessagesBackground,deletedMessagesBackground,ownMessageText,otherMessageText) are marked with@Deprecated(DeprecationLevel.ERROR)and replaced byMessageThemeproperties. New design system semantic colors have been added (chatReplyIndicatorIncoming/Outgoing,chatBgAttachmentIncoming/Outgoing,textPrimary,borderCoreImage,controlRemoveBg, etc.).Migration guidance already exists: See DEPRECATIONS.md for exact replacements and timelines, source code annotations for specific replacements, and factory methods
defaultColors()/defaultDarkColors()for the complete new structure.
♻️ Duplicate comments (2)
stream-chat-android-compose/api/stream-chat-android-compose.api (2)
1644-1645:MessageInput(...)public signature change needs an explicit migration story (defaults/overload/docs).
Line 1644 shows the updated public API surface; ifonCancelAction(or any new param) is now required or reordered, it’s a breaking change for downstream callers.
1812-1813:QuotedMessage(...)has twoMessageparams — ensure Kotlin parameter names/order are unambiguous.
Line 1812 exposes twoLio/getstream/chat/android/models/Message;parameters; this is easy to misuse unless the Kotlin declaration uses clearly distinct names and a stable order (and ideally KDoc).
🧹 Nitpick comments (2)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (1)
262-276: Consider using a theme color for the play indicator background.
VideoPlayIndicatoruses a hardcodedStreamPrimitiveColors.baseBlackinstead of a theme-aware color. While a dark overlay is often intentional for video play buttons (for contrast), using a theme color would provide consistency if the design system evolves.stream-chat-android-compose/api/stream-chat-android-compose.api (1)
3184-3186:ChatTheme(...)mega-signature churn: prefer “append-only with defaults” to reduce consumer breakage.
Line 3184 indicates a large surface-area signature; if parameters were reordered (not just added), expect significant downstream churn. If feasible in the Kotlin API, adding new params at the end with defaults (or providing overloads) is much easier to migrate.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (2)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_file_attachment_quoted_content.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_media_attachment_quoted_content.pngis excluded by!**/*.png
📒 Files selected for processing (14)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/StreamAttachmentFactories.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/AudioRecordAttachmentQuotedContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/FileAttachmentQuotedContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/MediaAttachmentQuotedContent.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/QuotedAttachmentFactory.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/attachments/content/AttachmentsContentTest.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/general/CustomAttachments.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customattachments/MessagesActivity.kt
💤 Files with no reviewable changes (8)
- stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/general/CustomAttachments.kt
- stream-chat-android-ui-guides/src/main/java/io/getstream/chat/android/guides/catalog/compose/customattachments/MessagesActivity.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/AudioRecordAttachmentQuotedContent.kt
- stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/attachments/content/AttachmentsContentTest.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/QuotedAttachmentFactory.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/FileAttachmentQuotedContent.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/MediaAttachmentQuotedContent.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/StreamAttachmentFactories.kt
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{kt,kts}
📄 CodeRabbit inference engine (AGENTS.md)
Format and apply Kotlin style with Spotless (4 spaces, no wildcard imports, licence headers)
Files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt
**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
**/*.kt: Use@OptInannotations explicitly; avoid suppressions unless documented
Document public APIs with KDoc, including thread expectations and state notes
Files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt
**/stream-chat-android-compose/**/*.kt
📄 CodeRabbit inference engine (AGENTS.md)
**/stream-chat-android-compose/**/*.kt: Compose components should follow noun-based naming (e.g.,MessageList,ChannelListHeader)
Compose previews should use@StreamPreviewhelpers
Files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt
🧠 Learnings (5)
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*.kt : Compose previews should use `StreamPreview` helpers
Applied to files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*.kt : Compose components should follow noun-based naming (e.g., `MessageList`, `ChannelListHeader`)
Applied to files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-compose/**/*Test.kt : Add Paparazzi snapshots for Compose UI regressions and run `verifyPaparazziDebug`
Applied to files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2025-12-17T15:00:07.506Z
Learnt from: CR
Repo: GetStream/stream-chat-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-17T15:00:07.506Z
Learning: Applies to **/stream-chat-android-ui-components/**/*Test.kt : Record Shot baselines when behaviour changes in XML kit UI tests
Applied to files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/api/stream-chat-android-compose.api
📚 Learning: 2026-01-15T13:09:56.922Z
Learnt from: gpunto
Repo: GetStream/stream-chat-android PR: 6084
File: stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_camera.xml:27-28
Timestamp: 2026-01-15T13:09:56.922Z
Learning: In stream-chat-android-compose, drawable XML icon files (e.g., stream_compose_ic_*.xml) use hardcoded placeholder colors because tint is applied programmatically when the icons are used in composables, ensuring theme-aware coloring at runtime.
Applied to files:
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.ktstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.ktstream-chat-android-compose/api/stream-chat-android-compose.api
🧬 Code graph analysis (2)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (3)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt (1)
rememberBodyBuilder(255-270)stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/ComposerCancelIcon.kt (1)
ComposerCancelIcon(41-59)stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/ImageUtils.kt (4)
StreamAsyncImage(113-128)StreamAsyncImage(142-168)StreamAsyncImage(182-197)StreamAsyncImage(211-247)
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/guides/AddingCustomAttachments.kt (1)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt (1)
ChatTheme(315-479)
🔇 Additional comments (10)
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt (1)
314-412: LGTM! Clean removal of quoted-message theming parameters.The removal of
quotedAttachmentFactoriesandquotedMessageTextFormatterparameters fromChatThemealigns with the PR objective to consolidate quoted-message rendering logic into the newQuotedMessageBodyBuilder. The function signature is cleaner, and all composition locals are properly maintained.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt (2)
131-132: LGTM! Properly keyedrememberfor body builder.The
remembercall now correctly includesbodyBuilderin its keys, ensuring the body is recomputed when theme settings change. This addresses the previous review feedback.
156-170: LGTM! Modifier is now properly applied.The
modifierparameter is now correctly passed toBox(modifier), allowing callers to style and tag the component. This addresses the previous review feedback.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessageBodyBuilder.kt (2)
255-270: LGTM! All dependencies properly included inrememberkeys.The
rememberBodyBuilder()composable now correctly includes all four dependencies (resources,autoTranslationEnabled,durationFormatter,streamCdnImageResizing) in therememberkeys, ensuring the builder is recreated when any configuration changes. This addresses the previous review feedback.
42-90: Well-structured builder with clear precedence logic.The
build()method has a clean precedence order: deleted messages → polls → shared locations → attachments → plain text. The translation handling is correctly applied early in the flow. Good separation of concerns.stream-chat-android-compose/src/main/res/values/strings.xml (2)
102-109: LGTM! Consistent singular forms for images and videos.The plurals for
stream_compose_quoted_message_imagesandstream_compose_quoted_message_videosnow use consistent patterns:
- Singular: "Photo" / "Video" (no count)
- Plural: "%d photos" / "%d videos"
This addresses the previous review feedback about inconsistent singular forms.
92-96: New quoted message strings look good.The new strings for audio recording, media count, reply-to formatting, and "You" label are clear and well-structured for the updated quoted message design.
stream-chat-android-compose/api/stream-chat-android-compose.api (3)
2852-2863: KeepChatComponentFactory.MessageComposerInput/MessageComposerQuotedMessageparameter ordering aligned withMessageInputto avoid wiring bugs.
Lines 2852-2853 and 2862-2863 suggest new/shifted callbacks; please double-check the Kotlin implementations/wrappers pass the correct lambda to the correct slot (especially around “cancel” vs other composer actions).
3034-3045: ConfirmChatComponentFactory$DefaultImplsmatches the interface after the signature change.
Lines 3034-3035 and 3044-3045 are the generated defaults for the updated interface methods; worth verifying there’s no accidental mismatch that could surface as confusing binary/API behavior for implementers.
3504-3538: Verify the specific parameter order changes and binary compatibility implications.MessageTheme.kt was modified in the current commit. However, the breaking change claim requires clarification: confirm whether parameters were reordered (breaking Kotlin destructuring) or merely appended with defaults (backward-compatible). The CHANGELOG documents incremental property additions, and DEPRECATIONS.md properly handles
StreamColors.linkBackground. Release notes should document any actual breaking changes versus API expansions.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
f3c1b5f to
5a25f73
Compare
9177b1e to
5bf1429
Compare
|
| modifier = Modifier.weight(1f, fill = false), | ||
| currentUser = currentUser, | ||
| ) | ||
| private fun QuotedMessageAttachmentPreview(body: QuotedMessageBody) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that we were leaving this preview out for now based on the thread, but maybe I misunderstood 🤔 Should I just add the placeholder image?
...pose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/QuotedMessage.kt
Show resolved
Hide resolved
| val customFactories = listOf(dateAttachmentFactory) | ||
| val defaultFactories = StreamAttachmentFactories.defaults() | ||
|
|
||
| val customQuotedFactories = listOf(quotedDateAttachmentFactory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can customers handle custom attachments?
Maybe you could show an example in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. At the moment they would need to replace the QuotedMessage/ComposerQuotedMessage in the factory. I'll check what iOS/Flutter provide, see if we need to change anything and then add an example!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it seems that iOS follows the generic pattern of using the view factory for that. So we could adapt and do the same on our side. It makes sense to me, not only to align with iOS, but also to align internally: custom rendering for other components goes through the factory, so I don't think there's a compelling reason to handle attachments in a different way. The downside is that it of course increases the number of breaking changes.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's the current iOS way to customize attachments.
Is that how the SDKs should proceed? Or are we agreeing on replacing QuotedMessage/ComposerQuotedMessage components?
andremion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location placeholder and custom factories to be addressed in another PR 👍🏻



🎯 Goal
AND-997: Update reply design
Update design of quoted message, which is the same component in both the composer and messages.
🛠 Implementation details
QuotedMessageStyleas we agreed not to have intermediate stylesQuotedMessageBodyBuilderto encapsulate the logic to calculate what we should show (text, icon, preview)QuotedMessageTextFormatterin favor of the builderQuotedAttachmentFactoryas it doesn't fit the use case anymore🎨 UI Changes
Figma spec
🧪 Testing
You can test this in the sample app by just replying to messages and verifying that we render what's expected.
☑️Contributor Checklist
General
Code & documentation
☑️Reviewer Checklist
🎉 GIF
Please provide a suitable gif that describes your work on this pull request
Summary by CodeRabbit
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.