feat: channel info screens#3590
Conversation
a53d4c2 to
4029214
Compare
5966c58 to
e1523f5
Compare
SDK Size
|
| initialUserIdRef.current = initialUser.id; | ||
| reset(); | ||
| toggleUser(initialUser); | ||
| }, [route.params?.initialUser, reset, toggleUser]); |
There was a problem hiding this comment.
"Send Direct Message" action navigates to this screen to set up the DM chat because this screen already knows how to display uninitalized chats
| @@ -1,123 +0,0 @@ | |||
| import React, { PropsWithChildren } from 'react'; | |||
There was a problem hiding this comment.
This one is just moved, I'm not sure why git picks it up as removed
| @@ -1,18 +0,0 @@ | |||
| import { Channel } from 'stream-chat'; | |||
|
|
|||
| import { getOtherUserInDirectChannel } from './useChannelActions'; | |||
There was a problem hiding this comment.
This one is just moved, I'm not sure why git picks it up as removed
| export function useMutedUsers(_channel?: Channel): Array<Mute> { | ||
| const { client } = useChatContext(); | ||
| return useSyncClientEventsToChannel({ channel, client, selector, stateChangeEventKeys: keys }); | ||
| return useSyncClientEvents({ client, selector, stateChangeEventKeys: keys }); |
There was a problem hiding this comment.
useSyncClientEventsToChannel only works when a channel is provided, but we don't need that for user mutes. useSyncClientEvents hook is created for purely client events
| const { muted: channelMuted } = useIsChannelMuted(channel); | ||
| const directChatUserMuted = useChannelMuteActive(channel); | ||
| const muted = isDirectChat ? directChatUserMuted : channelMuted; | ||
| const muted = useChannelMuteActive(channel); |
There was a problem hiding this comment.
This is a simplification that was introduced after Jurgen streamlined "muted" icon's behavior: https://getstream.slack.com/archives/C0A3JU6C6G3/p1779271576780029?thread_ts=1778622787.429949&cid=C0A3JU6C6G3
| }, | ||
| ]; | ||
|
|
||
| items.push({ |
There was a problem hiding this comment.
This component no longer needs to define a separate mute action because useChannelActions was streamlined:
mutealways means channel mutemuteUseris added as a new action only available in DM channels
| minX={0} | ||
| minY={0} | ||
| stroke="#1a1b25" | ||
| strokeLinejoin="round" |
There was a problem hiding this comment.
camera icon was updated, that propmted some snapshot updates
| label: isBlocked ? t('Unblock User') : t('Block User'), | ||
| placement: 'sheet', | ||
| type: 'standard', | ||
| type: isBlocked ? 'standard' : 'destructive', |
There was a problem hiding this comment.
Design change: block user is marked as destructive
| options: { severity: 'success', type: 'api:channel:pin:success' }, | ||
| origin: { context: { channel }, emitter: 'ChannelActions' }, | ||
| }); | ||
| options?.onSuccess?.(); |
There was a problem hiding this comment.
Added onSucess and onFailure callbacks to all channel actions so action callers can react to these events
1/2 PR for channel details | Figma
This PR implements the 20/25 channel details related Figma screens. The rest will come in a separate PR. The missing screens are implemented in SampleApp (as channel details screens are currently implemented there). All new components/hooks/contexts are marked as experimental by the SDK, the flag will be removed once channel details are fully implemented.
Some follow-up tasks we discovered with Ivan that are not related to channel details, I'll implement it in separate follow-up PRs:
Overview of implemented screens:

Some screenshots, mixed from iOS and Android, dark and light theme:
Claude's recap:
The headline of this branch is a brand-new Channel Details screen shipped as a reusable SDK component, with the SampleApp migrated off its old custom overlay implementation.
SampleApp
Removed the entire legacy overlay-based channel info system:
AppOverlayContext,AppOverlayProvider,ChannelInfoOverlayContext,UserInfoOverlayContext,OverlayBackdrop,ChannelInfoOverlay,UserInfoOverlay,ContactDetailBottomSheetAddMembersBottomSheet,AllMembersBottomSheet,MemberListItem,ChannelDetailProfileSection, and hooksuseChannelInfoOverlayActions/useUserInfoOverlayActionsGroupChannelDetailsScreen,OneOnOneChannelDetailScreen,SharedGroupsScreenAdded / updated:
ChannelDetailsScreenthat consumes the SDK component, plus aChannelDetailsNavigationSectionoverride exampleSendDirectMessageicon (removedArchive,UserMinus)ChannelListScreen,ChannelScreen,NewDirectMessagingScreen,App.tsx,types.ts, andSampleAppComponentOverridesto wire up the new screenSDK → new
ChannelDetailsScreencomponent suite (new export fromcomponents/index.ts):ChannelDetailsScreen,ChannelDetailsProfile,ChannelDetailsActionsSection,ChannelDetailsActionItem,ChannelDetailsMemberSection,ChannelDetailsNavigationSection,ChannelDetailsScreenHeaderChannelEditDetails,ChannelEditDetailsModal,ChannelEditName,ChannelEditImageSheetChannelMemberList,ChannelMemberItem,ChannelMemberActionsSheet,ChannelAddMembers(+modal),ChannelAllMembersModal,AddMemberSearchResultItem, and loading skeletonsModal/ModalHeaderbuilding blocksNew hooks —
package/src/hooks/actions/namespace (useChannelActions,useChannelActionItems,useChannelMemberActionItems,useUserActions, sharedtypes), feature hooks (useChannelDetailsActionItems,useChannelDetailsMembersPreview,useChannelDetailsMemberStatusText,useEditChannelImage,useUserActivityStatus,useChannelAddMembers,useChannelAllMembers,useMemberRoleLabel), and reusable channel hooks now exported publicly:useChannelName,useChannelImage,useChannelMemberCount,useChannelOwnCapabilities,useChannelMuteActive,useIsDirectChat, plususeSyncClientEvents(reactive channel name/image/member-count updates)New reusable UI / contexts / icons:
SearchInput,SelectionCircle,EmptySearchResultchannelDetailsContextandBottomSheetContextchevron-right,x-circleSDK → updates to existing
BottomSheetContextuseChannelActions/useChannelActionItems/useIsDirectChat/useChannelMuteActivemoved out ofChannelList/hooksinto the sharedsrc/hookstree (anduseChannelActionssignificantly extended:onFailure/onSuccesshandlers, member/image/name updates, separate dismiss API)OwnCapabilitiesContextgained a capabilityChannelDetailsBottomSheetandChannelSwipableWrapperupdated;useChannelPreviewDisplayName/useUserMuteActivetweakedAttachButton,SendButton,ThreadCLAUDE.mdtypecheck note, accessibility skill tweak, new RTL skillScale: ~80 commits, +12,961 / −3,635 across 166 files, with a large accompanying test suite (~40 new
__tests__file