Rename MessageMenu components to MessageActions#6356
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughA comprehensive refactoring renames message menu components and configuration from "SelectedMessageMenu"/"MessageMenu" naming to "MessageActions" across the codebase, moves files from the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
🚥 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.
🧹 Nitpick comments (2)
stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt (1)
27-28: Consider aligning doc link slugs with “MessageActions” naming.The snippet was renamed to MessageActions, but the three KDoc links still point to
selected-message-menupaths. If the docs URL has been renamed too, update these links for consistency.Suggested link update
- * [Usage](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#usage) + * [Usage](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#usage) - * [Handling Actions](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#handling-actions) + * [Handling Actions](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#handling-actions) - * [Customization](https://getstream.io/chat/docs/sdk/android/compose/message-components/selected-message-menu/#customization) + * [Customization](https://getstream.io/chat/docs/sdk/android/compose/message-components/message-actions/#customization)Also applies to: 87-88, 148-149
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt` around lines 27 - 28, The KDoc links in the MessageActions documentation still reference the old "selected-message-menu" slug; update all occurrences in MessageActions (KDoc block at top and other KDoc references inside the MessageActions.kt file, e.g., near the usages around the MessageActions component) to use the new "message-actions" (or the correct current slug) so the doc URLs match the renamed snippet and are consistent across the file.stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt (1)
211-220: Add explicit thread/state contract to new public config KDoc.
MessageActionsConfigis public and documented, but the KDoc doesn’t explicitly state threading/state expectations (e.g., immutable value object consumed from UI/main context).As per coding guidelines
**/*.kt: Document public APIs with KDoc, including thread expectations and state notes.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt` around lines 211 - 220, Update the KDoc for the public data class MessageActionsConfig to include explicit thread/state contract: state that MessageActionsConfig is an immutable value object (data class) intended to be created/observed on the UI/main thread and safe to read from Compose/state holders, and mention that callers should not mutate it after construction and should provide new instances for updates; reference MessageActionsConfig and its optionVisibility: MessageActionsOptionsVisibility property in the doc to make the contract clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatUiConfig.kt`:
- Around line 211-220: Update the KDoc for the public data class
MessageActionsConfig to include explicit thread/state contract: state that
MessageActionsConfig is an immutable value object (data class) intended to be
created/observed on the UI/main thread and safe to read from Compose/state
holders, and mention that callers should not mutate it after construction and
should provide new instances for updates; reference MessageActionsConfig and its
optionVisibility: MessageActionsOptionsVisibility property in the doc to make
the contract clear.
In
`@stream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.kt`:
- Around line 27-28: The KDoc links in the MessageActions documentation still
reference the old "selected-message-menu" slug; update all occurrences in
MessageActions (KDoc block at top and other KDoc references inside the
MessageActions.kt file, e.g., near the usages around the MessageActions
component) to use the new "message-actions" (or the correct current slug) so the
doc URLs match the renamed snippet and are consistent across the file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5c426ecf-5169-4694-9ad0-e8a9b5f2b2fd
⛔ Files ignored due to path filters (6)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_failed_message.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_failed_message_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_my_message.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_my_message_in_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_their_message.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageActionsTest_their_message_in_dark_mode.pngis excluded by!**/*.png
📒 Files selected for processing (22)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-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/messageactions/MessageActionsHeader.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/ReactionCountRow.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/ReactionsMenu.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageactions/UserReactionRow.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageoptions/MessageActionsOptionsVisibility.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messageoptions/MessageOptions.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/list/MessageContainer.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/ChatTheme.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/theme/MessageOptionsTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ReactionOptionsTheme.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/util/extensions/MessageActionsOptionsVisibility.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageActionsTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/ReactionsMenuContentTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/util/extensions/MessageActionsOptionsVisibilityTest.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/MessageActions.ktstream-chat-android-docs/src/main/kotlin/io/getstream/chat/docs/kotlin/compose/messages/SelectedReactionsMenu.kt
💤 Files with no reviewable changes (3)
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ReactionOptionsTheme.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/MessageOptionsTheme.kt
- stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt
44c697f to
5d4ab49
Compare
|


Goal
Rename "MessageMenu" components to "MessageActions" to align naming across platforms.
Implementation
SelectedMessageMenucomposable toMessageActionsand move it fromselectedmessagetomessageactionspackageMessageMenuHeadertoMessageActionsHeaderMessageOptionItemVisibilitytoMessageActionsOptionsVisibilityChatComponentFactorymethods and corresponding params classesMessageOptionsThemeandReactionOptionsTheme, consolidating their settings into a newMessageActionsConfiginsideChatUiConfigTesting
Summary by CodeRabbit
ChatUiConfigstructure, replacing legacy theming APIs.