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-217: Introduce ChatsScreen composable #5556

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

andremion
Copy link
Collaborator

@andremion andremion commented Jan 14, 2025

🎯 Goal

Make our chat screens compatible with large screens such as tablets.

🛠 Implementation details

A new ChatsActivity is introduced to the compose sample app to host the ChatsScreen and handle navigation between Chats and Threads

When the sample runs on a phone device, it should behave as is, rendering a single-pane screen.

When it runs on a larger device, e.g. a tablet, it should render two panels, one for channels and another one for messages of the selected channel.

⚠️ There are a few flows that need to be revisited. For now, ChatsScreen is marked as experimental.

🎨 UI Changes

Tablet

Before After
before_chats_on_tablet.webm
chats_on_tablet.webm

Phone

Before After
before_chats_on_phone.webm
chats_on_phone.webm

🧪 Testing

The sample is not yet ready to allow two configurations for channels/messages.
For now, you need to replace ChannelsActivity with ChatsActivity where you want to see the ChatsScreen in action.
For example:

StartupActivity

// Logged in, navigate to the channels screen
startActivity(ChatsActivity.createIntent(applicationContext))

UserLoginActivity

private fun openChannels() {
    startActivity(ChatsActivity.createIntent(applicationContext))
    finish()
}

🎉 GIF

gif

Copy link
Contributor

github-actions bot commented Jan 14, 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.14 MB 0.10 MB 🟢

@andremion andremion force-pushed the AND-217-large-device-support-for-chats branch from 2107f40 to 8a75047 Compare January 14, 2025 14:53
@andremion andremion force-pushed the AND-217-large-device-support-for-chats branch from 8a75047 to a27c256 Compare January 14, 2025 15:02
@andremion andremion marked this pull request as ready for review January 14, 2025 15:11
@andremion andremion requested a review from a team as a code owner January 14, 2025 15:11
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, this looks great! Implementing the all-in-one feature for the channel-messages screen was definitely much needed.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@andremion andremion merged commit c0101b6 into develop Jan 15, 2025
11 of 12 checks passed
@andremion andremion deleted the AND-217-large-device-support-for-chats branch January 15, 2025 10:30
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.

2 participants