Skip to content

feat: channel info screens#3590

Draft
szuperaz wants to merge 114 commits into
developfrom
channel-info-screens
Draft

feat: channel info screens#3590
szuperaz wants to merge 114 commits into
developfrom
channel-info-screens

Conversation

@szuperaz
Copy link
Copy Markdown
Contributor

@szuperaz szuperaz commented May 12, 2026

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:

  • Move channel actions override to channel preview (and deprecate channel list override?)
  • Add capability checks to channel actions
  • Search controller
  • Add an alert to all destructive actions
  • Add search to members screen
  • Fix useChannelMemberOnlineCount

Overview of implemented screens:
Screenshot 2026-06-03 at 12 25 02

Some screenshots, mixed from iOS and Android, dark and light theme:

IMG_1242 Screenshot_20260602_204533_Chat Sample React Native IMG_1247 Screenshot_20260602_204600_Chat Sample React Native Screenshot_20260602_204615_Chat Sample React Native IMG_1246 Screenshot_20260602_204633_Chat Sample React Native

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:

  • Overlay infrastructure: AppOverlayContext, AppOverlayProvider, ChannelInfoOverlayContext, UserInfoOverlayContext, OverlayBackdrop, ChannelInfoOverlay, UserInfoOverlay, ContactDetailBottomSheet
  • Old member UI: AddMembersBottomSheet, AllMembersBottomSheet, MemberListItem, ChannelDetailProfileSection, and hooks useChannelInfoOverlayActions / useUserInfoOverlayActions
  • Old screens: GroupChannelDetailsScreen, OneOnOneChannelDetailScreen, SharedGroupsScreen

Added / updated:

  • New thin ChannelDetailsScreen that consumes the SDK component, plus a ChannelDetailsNavigationSection override example
  • New SendDirectMessage icon (removed Archive, UserMinus)
  • Updated ChannelListScreen, ChannelScreen, NewDirectMessagingScreen, App.tsx, types.ts, and SampleAppComponentOverrides to wire up the new screen

SDK → new

ChannelDetailsScreen component suite (new export from components/index.ts):

  • Core: ChannelDetailsScreen, ChannelDetailsProfile, ChannelDetailsActionsSection, ChannelDetailsActionItem, ChannelDetailsMemberSection, ChannelDetailsNavigationSection, ChannelDetailsScreenHeader
  • Edit flow: ChannelEditDetails, ChannelEditDetailsModal, ChannelEditName, ChannelEditImageSheet
  • Members: ChannelMemberList, ChannelMemberItem, ChannelMemberActionsSheet, ChannelAddMembers (+modal), ChannelAllMembersModal, AddMemberSearchResultItem, and loading skeletons
  • Generic Modal / ModalHeader building blocks

New hookspackage/src/hooks/actions/ namespace (useChannelActions, useChannelActionItems, useChannelMemberActionItems, useUserActions, shared types), feature hooks (useChannelDetailsActionItems, useChannelDetailsMembersPreview, useChannelDetailsMemberStatusText, useEditChannelImage, useUserActivityStatus, useChannelAddMembers, useChannelAllMembers, useMemberRoleLabel), and reusable channel hooks now exported publicly: useChannelName, useChannelImage, useChannelMemberCount, useChannelOwnCapabilities, useChannelMuteActive, useIsDirectChat, plus useSyncClientEvents (reactive channel name/image/member-count updates)

New reusable UI / contexts / icons:

  • UI components: SearchInput, SelectionCircle, EmptySearchResult
  • Contexts: channelDetailsContext and BottomSheetContext
  • Icons: chevron-right, x-circle
  • ~196 lines of new theme tokens for the new components
  • ~50 new translation keys across all 14 locales (member roles, add-members, edit-channel, a11y labels)

SDK → updates to existing

  • BottomSheetModal — reworked (~100 lines); fixes the iOS close-callback-fires-too-early bug and now exposes context via the new BottomSheetContext
  • ChannelAvatar — extended to show a live preview of pending channel-image changes
  • Hook relocationsuseChannelActions / useChannelActionItems / useIsDirectChat / useChannelMuteActive moved out of ChannelList/hooks into the shared src/hooks tree (and useChannelActions significantly extended: onFailure/onSuccess handlers, member/image/name updates, separate dismiss API)
  • componentsContext — registered the new components as defaults (~31 lines); OwnCapabilitiesContext gained a capability
  • ChannelPreviewChannelDetailsBottomSheet and ChannelSwipableWrapper updated; useChannelPreviewDisplayName / useUserMuteActive tweaked
  • camera icon redesign — drove snapshot updates for AttachButton, SendButton, Thread
  • notificationTarget — minor update for channel-delete/edit notifications
  • Repo housekeeping: CLAUDE.md typecheck note, accessibility skill tweak, new RTL skill

Scale: ~80 commits, +12,961 / −3,635 across 166 files, with a large accompanying test suite (~40 new __tests__ file

@szuperaz szuperaz force-pushed the channel-info-screens branch from a53d4c2 to 4029214 Compare May 12, 2026 19:01
@szuperaz szuperaz changed the title feat: channel info screen - first iteration feat: channel info screens May 12, 2026
@szuperaz szuperaz force-pushed the channel-info-screens branch from 5966c58 to e1523f5 Compare May 13, 2026 18:07
@Stream-SDK-Bot
Copy link
Copy Markdown
Contributor

Stream-SDK-Bot commented May 18, 2026

SDK Size

title develop branch diff status
js_bundle_size 1725 KB 1852 KB +129456 B 🔴

initialUserIdRef.current = initialUser.id;
reset();
toggleUser(initialUser);
}, [route.params?.initialUser, reset, toggleUser]);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"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';
Copy link
Copy Markdown
Contributor Author

@szuperaz szuperaz Jun 3, 2026

Choose a reason for hiding this comment

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

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';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 });
Copy link
Copy Markdown
Contributor Author

@szuperaz szuperaz Jun 3, 2026

Choose a reason for hiding this comment

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

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);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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({
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This component no longer needs to define a separate mute action because useChannelActions was streamlined:

  • mute always means channel mute
  • muteUser is added as a new action only available in DM channels

minX={0}
minY={0}
stroke="#1a1b25"
strokeLinejoin="round"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Design change: block user is marked as destructive

options: { severity: 'success', type: 'api:channel:pin:success' },
origin: { context: { channel }, emitter: 'ChannelActions' },
});
options?.onSuccess?.();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added onSucess and onFailure callbacks to all channel actions so action callers can react to these events

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