Skip to content

Align typography and ripple with Figma design tokens#6347

Merged
andremion merged 2 commits intov7from
redesign/apply-figma-updates
Apr 9, 2026
Merged

Align typography and ripple with Figma design tokens#6347
andremion merged 2 commits intov7from
redesign/apply-figma-updates

Conversation

@andremion
Copy link
Copy Markdown
Contributor

@andremion andremion commented Apr 9, 2026

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):

  • Fix captionDefault and captionEmphasis line height: tight (16sp) to normal (20sp).
  • Fix headingExtraSmall font weight: Medium to SemiBold.
  • Fix numeric styles (numericMedium, numericLarge, numericExtraLarge) line height to 100% of font size, instead of tight (16sp).
  • Add numericSmall style (8sp / 100% / Bold) from the Figma type scale.
  • Add fontSizeMicro (8sp) token to StreamTokens.
  • Remove lineHeightTightest (10sp) and lineHeightTighter (14sp) from StreamTokens — not part of the Figma primitive scale.

Ripple (StreamRippleConfiguration -> streamRippleConfiguration):

  • Replace the public StreamRippleConfiguration wrapper class with an internal streamRippleConfiguration() function. The wrapper was a 1:1 mapping of M3's RippleConfiguration that added public API surface without value.
  • Remove the rippleConfiguration parameter from ChatTheme — the ripple is now derived internally from Colors and isInDarkMode.
  • Update ripple color and alpha values to match the Figma background.utility.hover / background.utility.pressed semantic tokens (light: chrome.s900 at 10%/15%, dark: chrome.s1000 at 15%/20%).

Testing

  1. Open any screen with interactive elements (channel list, message list, thread list).
  2. Tap on items and verify the ripple effect is visible and looks correct in both light and dark mode.
  3. Check that text sizes and line heights look correct for: message body, captions, headings, metadata, timestamps, badge counts.
  4. Compare the thread list "empty" state against the updated snapshot.

Summary by CodeRabbit

  • API Changes

    • Simplified ChatTheme initialization by removing a configuration parameter
  • New Features

    • Added numeric small typography style for additional text hierarchy options
  • Style

    • Adjusted line heights for caption and heading typography
    • Updated numeric typography line height calculations
    • Refined ripple effect configuration for improved visual consistency across light and dark themes

@andremion andremion added the pr:ignore-for-release Exclude from release notes label Apr 9, 2026
@andremion andremion requested a review from a team as a code owner April 9, 2026 09:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.82 MB 0.57 MB 🔴
stream-chat-android-ui-components 10.60 MB 10.95 MB 0.36 MB 🟡
stream-chat-android-compose 12.81 MB 12.25 MB -0.56 MB 🚀

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Walkthrough

The pull request refactors the theme API by removing the public StreamRippleConfiguration class and its parameter from ChatTheme, replacing it with an internal function that derives ripple configuration directly from theme colors. Additionally, typography is extended with a new numericSmall style, design tokens are updated (new fontSizeMicro, removed lineHeightTightest and lineHeightTighter), and several typography values are adjusted for consistency.

Changes

Cohort / File(s) Summary
Public API Signatures
stream-chat-android-compose/api/stream-chat-android-compose.api
Removed StreamRippleConfiguration public class and companion method; removed rippleConfiguration parameter from ChatTheme(...); extended StreamDesign.Typography with new component14() method and getNumericSmall() accessor; updated copy(...) signatures to reflect 14 TextStyle parameters instead of 13.
ChatTheme Function
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt
Removed rippleConfiguration parameter and its usage; replaced rippleConfiguration.toRippleConfiguration() with direct call to streamRippleConfiguration(colors, lightTheme = !isInDarkMode); removed LocalContentColor.current dependency.
Typography Configuration
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamDesign.kt
Added public numericSmall: TextStyle property; adjusted captionDefault and captionEmphasis line heights from lineHeightTight to lineHeightNormal; changed headingExtraSmall font weight from medium to semibold; updated numericMedium, numericExtraLarge, and numericLarge line heights to match corresponding font sizes.
Ripple Configuration
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamRippleConfiguration.kt
Removed public StreamRippleConfiguration class and defaultRippleConfiguration() composable; replaced with internal streamRippleConfiguration(colors: StreamDesign.Colors, lightTheme: Boolean): RippleConfiguration function that derives ripple color from theme chrome tokens and selects alpha based on lightTheme boolean instead of luminance-based logic.
Design Tokens
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamTokens.kt
Added fontSizeMicro = 8.sp token; removed lineHeightTightest and lineHeightTighter tokens.
Generated Composable Singletons
stream-chat-android-compose/.../ComposableSingletons\*Kt
Updated generated method identifiers (getLambda\$<number>\$stream_chat_android_compose_release()) across multiple files; no functional changes to exposed signatures or behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 The ripples fade from public view,
Typography is fresh and new,
With numericSmall in the fold,
Design tokens, simpler, bold! ✨🎨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: aligning typography and ripple configuration with Figma design tokens, which is the primary focus of all modifications.
Description check ✅ Passed The PR description covers all required template sections with concrete details: clear Goal, thorough Implementation with specific changes to typography and ripple, and appropriate Testing steps. Most checklist items are addressed appropriately.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch redesign/apply-figma-updates

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 77a4a20 and 6ebeddc.

⛔ 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.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollMoreOptionsDialogTest_light_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollViewResultDialogTest_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.poll_PollViewResultDialogTest_light_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.threads_ThreadListTest_empty_threads.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • stream-chat-android-compose/api/stream-chat-android-compose.api
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatTheme.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamDesign.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamRippleConfiguration.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamTokens.kt

Comment thread stream-chat-android-compose/api/stream-chat-android-compose.api
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 9, 2026

@andremion andremion merged commit 1e20c6f into v7 Apr 9, 2026
16 of 17 checks passed
@andremion andremion deleted the redesign/apply-figma-updates branch April 9, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:ignore-for-release Exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants