Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3e34dcf
feat(compose): add swipe-to-reveal actions on channel list items
aleksandar-apostolov Feb 24, 2026
a0eeacd
refactor(compose): rework swipe actions to match Figma spec
aleksandar-apostolov Feb 24, 2026
7d54d2d
fix(compose): fix swipe-to-reveal not responding to gestures
aleksandar-apostolov Feb 24, 2026
95bfb0d
fix(compose): wire swipe actions in sample's custom factory
aleksandar-apostolov Feb 24, 2026
ff1ec5e
fix(compose): guard against NaN offset before anchors are set
aleksandar-apostolov Feb 24, 2026
b52729b
fix(compose): hide swipe actions behind opaque foreground
aleksandar-apostolov Feb 24, 2026
938c9c4
fix(compose): correct modifier order so background slides with content
aleksandar-apostolov Feb 24, 2026
ac1fa4d
fix(compose): swap swipe action order — More left, primary right
aleksandar-apostolov Feb 24, 2026
7e2dd87
refactor(actions): unify ChannelAction into self-describing interface
aleksandar-apostolov Feb 25, 2026
06537ca
fix(compose): remove unused isOneToOne and re-record snapshots
aleksandar-apostolov Feb 25, 2026
6359d79
Merge branch 'redesign/channel-list' into redesign/channel-list-swipe…
aleksandar-apostolov Feb 25, 2026
4a52dcd
merge(channel-list): merge redesign/channel-list into swipe-actions
aleksandar-apostolov Feb 25, 2026
fff42ed
Merge branch 'redesign/channel-list-swipe-actions' of https://github.…
aleksandar-apostolov Feb 25, 2026
e7ed181
feat(icons): update channel action and list icons to Figma design system
aleksandar-apostolov Feb 25, 2026
7133df2
fix(icons): correct mute/unmute and add icon mappings
aleksandar-apostolov Feb 25, 2026
c4e96f1
fix(channels): move Leave to end as destructive action
aleksandar-apostolov Feb 25, 2026
d4500dd
feat(channels): redesign bottom sheet header with group avatar
aleksandar-apostolov Feb 25, 2026
d329a4d
fix(channels): use headingSmall for channel name, icon-only swipe act…
aleksandar-apostolov Feb 25, 2026
6ebb8a0
fix(swipe): use backgroundCoreSurface for secondary action
aleksandar-apostolov Feb 25, 2026
8982919
fix(channels): reduce bottom sheet action item size
aleksandar-apostolov Feb 25, 2026
a82053e
fix(channels): use StreamTokens for bottom sheet action dimensions
aleksandar-apostolov Feb 25, 2026
18dd86e
fix(channels): remove dividers between bottom sheet action items
aleksandar-apostolov Feb 25, 2026
6b69f27
fix(channels): align bottom sheet items with Figma List Item spec
aleksandar-apostolov Feb 25, 2026
e042ebb
fix(channels): increase bottom sheet item horizontal padding to spaci…
aleksandar-apostolov Feb 25, 2026
aec1cb4
fix(channels): add bottom padding to channel options list
aleksandar-apostolov Feb 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ import io.getstream.chat.android.compose.ui.channels.list.ChannelItem
import io.getstream.chat.android.compose.ui.channels.list.ChannelList
import io.getstream.chat.android.compose.ui.components.SearchInput
import io.getstream.chat.android.compose.ui.components.channels.ChannelOptionItemVisibility
import io.getstream.chat.android.compose.ui.components.channels.buildDefaultChannelActions
import io.getstream.chat.android.compose.ui.mentions.MentionList
import io.getstream.chat.android.compose.ui.theme.ChannelOptionsTheme
import io.getstream.chat.android.compose.ui.theme.ChatTheme
Expand Down Expand Up @@ -377,17 +378,24 @@ class ChannelsActivity : ComponentActivity() {

val selectedChannel = delegatedSelectedChannel
if (selectedChannel != null) {
val channelActions = buildDefaultChannelActions(
selectedChannel = selectedChannel,
isMuted = channelsViewModel.isChannelMuted(selectedChannel.cid),
ownCapabilities = selectedChannel.ownCapabilities,
viewModel = channelsViewModel,
onViewInfoAction = ::viewChannelInfo,
)
SelectedChannelMenu(
modifier = Modifier
.padding(16.dp)
.fillMaxWidth()
.wrapContentHeight()
.align(Alignment.Center),
shape = RoundedCornerShape(16.dp),
isMuted = channelsViewModel.isChannelMuted(selectedChannel.cid),
selectedChannel = selectedChannel,
currentUser = user,
onChannelOptionClick = { action -> channelsViewModel.performChannelAction(action) },
channelActions = channelActions,
onChannelOptionClick = { action -> channelsViewModel.executeOrConfirm(action) },
onDismiss = { channelsViewModel.dismissChannelAction() },
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.getstream.chat.android.compose.sample.ui.component

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.lazy.LazyItemScope
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand All @@ -25,6 +26,8 @@ import io.getstream.chat.android.compose.sample.ui.location.LocationComponentFac
import io.getstream.chat.android.compose.sample.vm.SharedLocationViewModelFactory
import io.getstream.chat.android.compose.state.channels.list.ItemState
import io.getstream.chat.android.compose.ui.channels.list.ChannelItem
import io.getstream.chat.android.compose.ui.channels.list.LocalSwipeRevealCoordinator
import io.getstream.chat.android.compose.ui.channels.list.SwipeableChannelItem
import io.getstream.chat.android.compose.ui.theme.ChatComponentFactory
import io.getstream.chat.android.compose.ui.theme.ChatTheme
import io.getstream.chat.android.models.Channel
Expand All @@ -42,21 +45,40 @@ class CustomChatComponentFactory(
onChannelClick: (Channel) -> Unit,
onChannelLongClick: (Channel) -> Unit,
) {
ChannelItem(
modifier = Modifier
.animateItem()
.run {
// Highlight the item background color if it is pinned
if (channelItem.channel.isPinned()) {
background(color = ChatTheme.colors.backgroundCoreHighlight)
} else {
this
}
},
channelItem = channelItem,
currentUser = currentUser,
onChannelClick = onChannelClick,
onChannelLongClick = onChannelLongClick,
)
val coordinator = LocalSwipeRevealCoordinator.current
val swipeEnabled = ChatTheme.config.channelList.swipeActionsEnabled && coordinator != null
val itemModifier = Modifier
.animateItem()
.run {
if (channelItem.channel.isPinned()) {
background(color = ChatTheme.colors.backgroundCoreHighlight)
} else {
this
}
}

if (swipeEnabled) {
SwipeableChannelItem(
channelCid = channelItem.channel.cid,
backgroundColor = ChatTheme.colors.backgroundCoreApp,
swipeActions = { Row { ChannelSwipeActions(channelItem) } },
) {
ChannelItem(
modifier = itemModifier,
channelItem = channelItem,
currentUser = currentUser,
onChannelClick = onChannelClick,
onChannelLongClick = onChannelLongClick,
)
}
} else {
ChannelItem(
modifier = itemModifier,
channelItem = channelItem,
currentUser = currentUser,
onChannelClick = onChannelClick,
onChannelLongClick = onChannelLongClick,
)
}
}
}
Loading
Loading