Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AND-201] Migrate material to material3 components. #5537

Merged
merged 11 commits into from
Jan 7, 2025

Conversation

VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Dec 26, 2024

🎯 Goal

Linear: https://linear.app/stream/issue/AND-201/analyse-and-migrate-material-to-material3-compose

Migrates the material dependencies to material3.

🛠 Implementation details

  • Replace all androidx.compose.material with their corresponding androidx.compose.material3 imports
  • Replace elevation argument with shadowElevation on Surface components
  • Replace elevation with CardElevation and backgroundColor with CardColors on Card components
  • Rework SnackBar implementation when it was used with Scaffold
  • Rework LinearProgressIndicator implementation in Polls to match the old material component
  • Additional change: Add night mode support for the poll-related dialogs.

🎨 UI Changes

There are couple of 'significant' UI differences between material and material3:

  • Different dialog appearance
  • Different IconButton ripple -> the ripple is now bound to the IconButton size, so using a smaller IconButton size, results in smaller ripple then previously
Material Material3
SimpleDialog before-simple-dialog after-simple-dialog
Poll Option DIalog before-poll-option-dialog after-poll-option-dialog
Poll Coment Dialog before-poll-comment-dialog after-poll-comment-dialog
IconButton (general) before-icon-button-ripple after-icon-button-ripple
Attachments icon (small IconButton) before-composer-icon-attr-ripple after-composer-icon-att-ripple
Commands icon (small IconButton) before-composer-icon-cmd-ripple after-composer-icon-cmd-ripple

🧪 Testing

  1. Open compose app sample
  2. Open any of the dialogs
  3. Tap on any IconButton (toolbar back, composer actions...)

@VelikovPetar VelikovPetar marked this pull request as ready for review December 26, 2024 09:58
@VelikovPetar VelikovPetar requested a review from a team as a code owner December 26, 2024 09:58
PetarVelikov added 2 commits January 2, 2025 09:23
# Conflicts:
#	buildSrc/src/main/kotlin/io/getstream/chat/android/Dependencies.kt
#	stream-chat-android-compose-sample/build.gradle
#	stream-chat-android-compose/build.gradle
#	stream-chat-android-docs/build.gradle
#	stream-chat-android-ui-guides/build.gradle
#	stream-chat-android-ui-uitests/build.gradle
Copy link
Member

@skydoves skydoves left a comment

Choose a reason for hiding this comment

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

overall looks very good to me! 👍

@JcMinarro JcMinarro enabled auto-merge (squash) January 7, 2025 09:42
Copy link
Contributor

github-actions bot commented Jan 7, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 3.04 MB 3.04 MB 0.00 MB 🟢
stream-chat-android-offline 3.25 MB 3.25 MB 0.00 MB 🟢
stream-chat-android-ui-components 7.91 MB 7.91 MB 0.00 MB 🟢
stream-chat-android-compose 9.04 MB 9.03 MB -0.01 MB 🚀

@JcMinarro JcMinarro merged commit 44fad1a into develop Jan 7, 2025
10 checks passed
@JcMinarro JcMinarro deleted the feature/migrate-material-to-material3 branch January 7, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants