[React Native UIKit] Allow customization of GroupChannelPreview display properties memberCount

Platform:

React Native UIKit (v3.11.2)


Description:

Problem:
Currently, GroupChannelPreviewContainer hardcodes the display logic
for certain UI elements like memberCount. This makes it impossible
to customize or hide these elements without patching the library.

Current Implementation:
// In GroupChannelPreviewContainer.tsx (line 106)
2 ? channel.memberCount :
undefined}
// … other props
/>

Limitation:

  • No way to hide member count even when it doesn’t fit the app’s
    design
  • Forces apps to either:
    a. Patch the library (maintenance burden on upgrades)
    b. Completely rewrite renderGroupChannelPreview (lose all default
    features)

Proposed Solution:

Add customization props to GroupChannelListProps similar to existing
boolean flags like isTypingIndicatorEnabled:

Option A - Boolean flags (simpler):
<GroupChannelList
showMemberCount={false}
showFrozenIndicator={true}
showBroadcastIndicator={true}
// … other customization flags
/>

Option B - Render props (more flexible):
<GroupChannelList
renderMemberCount={(channel) => {
// Custom logic or return null to hide
return channel.memberCount > 5 ? channel.memberCount : null;
}}
/>

Option C - Config object (most flexible):
<GroupChannelList
previewConfig={{
showMemberCount: false,
memberCountThreshold: 2, // Show only if > this number
showFrozenIndicator: true,
showBroadcastIndicator: true,
}}
/>


Use Case:

Our app design doesn’t include member counts in the channel list for
these reasons:

  1. Visual clutter - We prefer a cleaner, minimalist design
  2. Context - Most of our channels are 1:1 user to user groupChats, with a member of our support staff in the chat, so the number of users is technically 3, so all chats show 3 users which we don’t like

Currently, we’re forced to maintain a patch file that could break on every UIKit upgrade.

diff --git a/src/containers/GroupChannelPreviewContainer.tsx b/src/containers/GroupChannelPreviewContainer.tsx
index 9d618255a9ca9fdeb6dfd9aa6985f5e6dfa83f41..8c4a3861fb1f6bbabf4c46c805030126fbad2386 100644
--- a/src/containers/GroupChannelPreviewContainer.tsx
+++ b/src/containers/GroupChannelPreviewContainer.tsx
@@ -103,7 +103,7 @@ const GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props)
         badgeCount={unreadMessageCount}
         mentioned={channel.unreadMentionCount > 0}
         mentionTrigger={mentionManager.config.trigger}
-        memberCount={channel.memberCount > 2 ? channel.memberCount : undefined}
+        memberCount={undefined}
         frozen={channel.isFrozen}
         broadcast={channel.isBroadcast}
         notificationOff={channel.myPushTriggerOption === 'off'}