Skip to content

Make ChatChannelInfoView subviews public for composing own info views #892

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

Merged
merged 5 commits into from
Jul 25, 2025

Conversation

laevandus
Copy link
Contributor

🔗 Issue Links

https://linear.app/stream/issue/IOS-1028

🎯 Goal

Make it easy to recreate channel info view by composing it using existing views

📝 Summary

  • Make additional views public used by ChatChannelInfoView
  • Move show more button title to the view model

🛠 Implementation

  • ChannelTitleView
  • ChannelInfoDivider
  • ChatInfoDirectChannelView
  • ChatInfoParticipantsView

🧪 Manual Testing Notes

N/A

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner July 22, 2025 12:12
@laevandus laevandus force-pushed the add/channel-info-view-subviews branch from cbc7cc5 to 93688a4 Compare July 22, 2025 12:15
@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Jul 22, 2025

SDK Size

title develop branch diff status
StreamChatSwiftUI 9.22 MB 9.22 MB +1 KB 🟢

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

@laevandus laevandus enabled auto-merge (squash) July 24, 2025 07:33
Copy link

Public Interface

+ public struct ChatInfoDirectChannelView: View  
+ 
+   public var body: some View
+   
+ 
+   public init(factory: Factory = DefaultViewFactory.shared,participant: ParticipantInfo?)

+ public struct ChannelInfoDivider: View  
+ 
+   public var body: some View
+   
+ 
+   public init()

+ public struct ChatInfoParticipantsView: View  
+ 
+   public var body: some View
+   
+ 
+   public init(factory: Factory = DefaultViewFactory.shared,participants: [ParticipantInfo],onItemAppear: @escaping (ParticipantInfo) -> Void)

+ public struct ChannelTitleView: View  
+ 
+   public var body: some View
+   
+ 
+   public init(channel: ChatChannel,shouldShowTypingIndicator: Bool)



 public class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDelegate  
-   public var notDisplayedParticipantsCount: Int
+   public var showMoreUsersButtonTitle: String
-   public var mutedText: String
+   public var notDisplayedParticipantsCount: Int
-   public var showMoreUsersButton: Bool
+   public var mutedText: String
-   
+   public var showMoreUsersButton: Bool
- 
+   
-   public init(channel: ChatChannel)
+ 
-   
+   public init(channel: ChatChannel)
- 
+   
-   public func onlineInfo(for user: ChatUser)-> String
+ 
-   public func onParticipantAppear(_ participantInfo: ParticipantInfo)
+   public func onlineInfo(for user: ChatUser)-> String
-   public func leaveConversationTapped(completion: @escaping () -> Void)
+   public func onParticipantAppear(_ participantInfo: ParticipantInfo)
-   public func cancelGroupRenaming()
+   public func leaveConversationTapped(completion: @escaping () -> Void)
-   public func confirmGroupRenaming()
+   public func cancelGroupRenaming()
-   public func channelController(_ channelController: ChatChannelController,didUpdateChannel channel: EntityChange<ChatChannel>)
+   public func confirmGroupRenaming()
-   public func addUserTapped(_ user: ChatUser)
+   public func channelController(_ channelController: ChatChannelController,didUpdateChannel channel: EntityChange<ChatChannel>)
+   public func addUserTapped(_ user: ChatUser)

Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@laevandus laevandus merged commit 56dce53 into develop Jul 25, 2025
10 of 11 checks passed
@laevandus laevandus deleted the add/channel-info-view-subviews branch July 25, 2025 07:01
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Jul 29, 2025
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.

4 participants