Align typography and ripple with Figma design tokens#6347
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
WalkthroughThe pull request refactors the theme API by removing the public Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 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
🤖 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/api/stream-chat-android-compose.api`:
- Line 3696: Document the breaking changes to the public theme API by adding
migration notes to the project CHANGELOG or a dedicated migration guide that
explain the updated ChatTheme(...) signature (mention removal of ripple
configuration parameters and show new parameter order) and the addition of
numericSmall to StreamDesign.Typography (note new constructor/copy/component
signatures and parameter order changes); include examples of the old vs new
ChatTheme(...) and Typography usage, and explicit upgrade steps for callers that
relied on ripple params or the previous Typography constructor.
🪄 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: bf53dedd-2b95-4f2d-a392-40e104685d13
⛔ Files ignored due to path filters (5)
stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollMoreOptionsDialogTest_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollMoreOptionsDialogTest_light_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollViewResultDialogTest_dark_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollViewResultDialogTest_light_mode.pngis excluded by!**/*.pngstream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.threads_ThreadListTest_empty_threads.pngis excluded by!**/*.png
📒 Files selected for processing (5)
stream-chat-android-compose/api/stream-chat-android-compose.apistream-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/StreamDesign.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamRippleConfiguration.ktstream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamTokens.kt
|



Goal
Align the Compose typography system and ripple configuration with the latest Figma design token specs for the Android platform.
Implementation
Typography (
StreamDesign.Typography/StreamTokens):captionDefaultandcaptionEmphasisline height:tight(16sp) tonormal(20sp).headingExtraSmallfont weight:MediumtoSemiBold.numericMedium,numericLarge,numericExtraLarge) line height to 100% of font size, instead oftight(16sp).numericSmallstyle (8sp / 100% / Bold) from the Figma type scale.fontSizeMicro(8sp) token toStreamTokens.lineHeightTightest(10sp) andlineHeightTighter(14sp) fromStreamTokens— not part of the Figma primitive scale.Ripple (
StreamRippleConfiguration->streamRippleConfiguration):StreamRippleConfigurationwrapper class with an internalstreamRippleConfiguration()function. The wrapper was a 1:1 mapping of M3'sRippleConfigurationthat added public API surface without value.rippleConfigurationparameter fromChatTheme— the ripple is now derived internally fromColorsandisInDarkMode.background.utility.hover/background.utility.pressedsemantic tokens (light:chrome.s900at 10%/15%, dark:chrome.s1000at 15%/20%).Testing
Summary by CodeRabbit
API Changes
New Features
Style