Restyle unread divider and extract shared MessagesStripDivider#6417
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
WalkthroughThis PR refactors message list separators by introducing two new reusable UI components— ChangesMessage List Separator Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
🚥 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📝 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
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@stream-chat-android-compose/src/main/res/values-it/strings.xml`:
- Around line 192-193: Reorder the two Italian string entries so they match the
canonical alphabetical ordering used in other locales: move the element with
name="stream_compose_message_list_unread_separator" to appear before the element
with name="stream_compose_message_list_unsupported_attachment"; update the XML
so the two keys are in the same order as in
values-fr/values-es/values-in/values-ja/values-ko and values-hi to satisfy
Spotless ordering rules.
🪄 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: 73431f0a-c380-411e-8bd8-8212933d595c
⛔ Files ignored due to path filters (6)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.list_MessagesDateDividerTest_messages_date_divider_absolute_date.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.list_MessagesDateDividerTest_messages_date_divider_today.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.list_MessagesStripDividerTest_messages_strip_divider_replies.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.list_MessagesStripDividerTest_messages_strip_divider_unread.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageListTest_thread_separator.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages_MessageListTest_unread_separator_visible.pngis excluded by!**/*.png
📒 Files selected for processing (15)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-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/MessagesDateDivider.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessagesStripDivider.ktstream-chat-android-compose/src/main/res/values-es/strings.xmlstream-chat-android-compose/src/main/res/values-fr/strings.xmlstream-chat-android-compose/src/main/res/values-hi/strings.xmlstream-chat-android-compose/src/main/res/values-in/strings.xmlstream-chat-android-compose/src/main/res/values-it/strings.xmlstream-chat-android-compose/src/main/res/values-ja/strings.xmlstream-chat-android-compose/src/main/res/values-ko/strings.xmlstream-chat-android-compose/src/main/res/values/strings.xmlstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/MessageListTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/list/MessagesDateDividerTest.ktstream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/messages/list/MessagesStripDividerTest.kt
Adopt the new strip design for the unread separator: full-width banner with backgroundCoreSurfaceSubtle fill, top/bottom borderCoreSubtle, metadataEmphasis text, and an inline %d count. Pull the shared strip layout into MessagesStripDivider, used by both the unread and the thread-replies separators. Rename the existing MessageDivider (pill) to MessagesDateDivider so the codebase tracks the Figma vocabulary. Normalize the thread separator's testTag to mergeDescendants semantics, matching the unread and date wrappers. Add Paparazzi coverage: per-component MessagesDateDividerTest and MessagesStripDividerTest, plus list-level cases for the unread separator on screen and a thread-mode separator (previously zero coverage).
899259e to
f24c5f7
Compare
|
|
🚀 Available in v7.2.0 |



Goal
Address Issue #9 — Unread Messages divider design update from the SDK Testing Feedback Notion board: the unread separator inside the message list needs to follow the new Figma "MessagesDivider" strip design and surface the unread count inline.
The same Figma strip is used by the thread-replies "RepliesDivider", which the codebase already rendered with an identical inline layout. Pulling that layout into a shared internal primitive avoids the two screens drifting apart.
Implementation
DefaultMessageUnreadSeparatorContentswitches from the pillMessageDividerto the new full-width banner (background-subtle fill, top/bottom subtle borders,metadataEmphasistext).MessagesStripDividerholds the shared layout; both unread and thread-replies separators delegate to it. The pre-existing inline strip code inDefaultMessageThreadSeparatorContentis removed.MessageDivider→MessagesDateDivider. Visual unchanged.MessagesDateDividerTestandMessagesStripDividerTest, plus list-levelunread separator visibleandthread separatorcases. The thread separator previously had zero snapshot coverage.Important
Decision — count via
%din the existing string keystream_compose_message_list_unread_separatoris updated from"Unread Messages"to"%d unread messages"and all 7 localised resources mirror the same%dpattern.Considered a
<plurals>resource (consistent with how the thread-replies separator is structured) but rejected: changing the resource type would silently break customers who already override the string. With the current change:%dget their original copy back, count silently dropped — same observable behaviour as before this PR.%dget the count interpolated.No public API or resource-type change. Existing overrides stay valid.
🎨 UI Changes
Testing
Summary by CodeRabbit