Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
WalkthroughThis change renames the message composer's "center bottom content" API to "bottom content" across the SDK, adjusts the checkbox component size from 24.dp to 20.dp, restructures the message input layout to reorganize leading and center content into a shared row, and adds new thread-mode specific test composables for active command states. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes 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: 1
🧹 Nitpick comments (1)
stream-chat-android-compose/api/stream-chat-android-compose.api (1)
3407-3407: Consider documenting the migration path for this public API rename.Lines 3407, 3595, and 4478-4486 introduce a breaking rename (
MessageComposerInputCenterBottomContent→MessageComposerInputBottomContentand corresponding params type). This is acceptable on the v7 branch, but migration documentation does not currently exist in the repository. For downstream SDK consumers who overrideChatComponentFactoryor reference these symbols directly, consider adding a migration guide or changelog entry that maps the old names to the new ones.🤖 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` at line 3407, Add a migration guide/changelog entry documenting the breaking rename of MessageComposerInputCenterBottomContent → MessageComposerInputBottomContent and the params type rename (the new ctor signature shown as MessageComposerInputBottomContent(Lio/getstream/chat/android/compose/ui/theme/MessageComposerInputBottomContentParams;Landroidx/compose/runtime/Composer;I)V); update any public API docs and the ChatComponentFactory documentation to show the old symbol names and the new equivalents, include a brief code snippet or mapping showing how to update overrides/references (e.g., replace MessageComposerInputCenterBottomContent with MessageComposerInputBottomContent and the corresponding params class), and add a note in the v7 changelog stating this breaking change and suggested migration steps for downstream SDK consumers.
🤖 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/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt`:
- Around line 1476-1483: The default factory MessageComposerInputBottomContent
drops params.modifier when delegating to the internal composable; update the
call inside MessageComposerInputBottomContent to forward params.modifier to
io.getstream.chat.android.compose.ui.messages.composer.internal.MessageComposerInputBottomContent
so caller-supplied modifiers are applied (keep existing parameters like
alsoSendToChannel and onAlsoSendToChannelChange and add modifier =
params.modifier).
---
Nitpick comments:
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Line 3407: Add a migration guide/changelog entry documenting the breaking
rename of MessageComposerInputCenterBottomContent →
MessageComposerInputBottomContent and the params type rename (the new ctor
signature shown as
MessageComposerInputBottomContent(Lio/getstream/chat/android/compose/ui/theme/MessageComposerInputBottomContentParams;Landroidx/compose/runtime/Composer;I)V);
update any public API docs and the ChatComponentFactory documentation to show
the old symbol names and the new equivalents, include a brief code snippet or
mapping showing how to update overrides/references (e.g., replace
MessageComposerInputCenterBottomContent with MessageComposerInputBottomContent
and the corresponding params class), and add a note in the v7 changelog stating
this breaking change and suggested migration steps for downstream SDK consumers.
🪄 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: 5c2fe246-3edb-40cd-b211-0485bca8af8f
⛔ Files ignored due to path filters (5)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.common_CheckboxTest_checkbox_states.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageComposerInputTest_active_command_filled_in_thread_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageComposerInputTest_active_command_placeholder_in_thread_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageComposerInputTest_thread_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageComposerInputTest_thread_mode_also_send_to_channel.pngis excluded by!**/*.png
📒 Files selected for processing (8)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/common/Checkbox.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/internal/MessageComposerInputBottomContent.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/test/kotlin/io/getstream/chat/android/compose/ui/components/common/CheckboxTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageComposerInputTest.kt
...oid-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
Show resolved
Hide resolved
91c5b12 to
795a8a3
Compare
…nds in thread mode.
795a8a3 to
d14bb26
Compare
|



Goal
Update the layout in the thread mode message composer when a command is active:
Implementation
Layout restructure (
MessageInput.kt):LeadingContent(command chip) andCenterContent(text field) into an innerRowinside the existing weightedColumn. This ensures the chip aligns with the text field, not with the bottom content.BottomContent(checkbox) stays below that inner Row, andTrailingContent(send button) stays in the outer Row aligned to the bottom — matching the Figma design.Rename
CenterBottomContent→BottomContent(breaking API change):MessageComposerInputCenterBottomContent→MessageComposerInputBottomContentMessageComposerInputCenterBottomContentParams→MessageComposerInputBottomContentParamsBottom padding adjustment (
MessageComposerInputBottomContent.kt):bottompadding fromspacingMdtospacingSmso the checkbox row sits closer to the send button vertically.Checkbox improvements:
CheckboxStates()internal composable for preview/test reuse.CheckboxTestPaparazzi snapshot test.Preview improvements (
MessageInput.kt):parentMessageparameter in thread mode previews.🎨 UI Changes
Please check the snapshot files
Testing
/giphyto activate the GIPHY command — verify the chip aligns with the text input field, not below it../gradlew :stream-chat-android-compose:test— all Paparazzi snapshot tests pass.Summary by CodeRabbit
UI Updates
Tests