Skip to content

Conversation

@nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Oct 21, 2025

🔗 Issue Links

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

🎯 Goal

Allow dismissing commands overlay and attachments picker on message list tap.

📝 Summary

  • Allows dismissing the commands overlay when tapping the message list
  • Allows dismissing the keyboard attachments picker when tapping the message list

Both are enabled by default since it is what most customers will want. A feature flag has been added for customers who want to disable this.

🛠 Implementation

In order not to cause a breaking change, I used NSNotifications to notify the composer view that it needs to hide the commands overlay or the attachments picker from the channel view.

Note

At the moment, the commands overlay is coupled with the command in the composer. So if there is a command selected already, hiding the overlay will remove the command from the composer. Changing this is out of scope since it would probably cause breaking changes, but in the future, it would be nice if these were decoupled like in UIKit.

🧪 Manual Testing Notes

Commands Overlay

  1. Open a channel
  2. Tap on the input composer to show the keyboard
  3. Type "/..."
  4. Tap on the message list
  5. The commands overlay should be hidden

Attachments Picker

  1. Open a channel
  2. Tap on the input composer to show the keyboard
  3. Type on the attachments icon
  4. Tap on the message list
  5. The attachments picker should be hidden

☑️ 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

@nuno-vieira nuno-vieira requested a review from a team as a code owner October 21, 2025 09:52
@github-actions
Copy link

Public Interface

 public struct MessageListConfig  
-   public let bouncedMessagesAlertActionsEnabled: Bool
+   public let hidesCommandsOverlayOnMessageListTap: Bool
-   public let skipEditedMessageLabel: (ChatMessage) -> Bool
+   public let hidesAttachmentsPickersOnMessageListTap: Bool
-   public let draftMessagesEnabled: Bool
+   public let bouncedMessagesAlertActionsEnabled: Bool
-   public let downloadFileAttachmentsEnabled: Bool
+   public let skipEditedMessageLabel: (ChatMessage) -> Bool
-   
+   public let draftMessagesEnabled: Bool
- 
+   public let downloadFileAttachmentsEnabled: Bool
-   public init(messageListType: MessageListType = .messaging,typingIndicatorPlacement: TypingIndicatorPlacement = .bottomOverlay,groupMessages: Bool = true,messageDisplayOptions: MessageDisplayOptions = MessageDisplayOptions(),messagePaddings: MessagePaddings = MessagePaddings(),dateIndicatorPlacement: DateIndicatorPlacement = .overlay,pageSize: Int = 25,messagePopoverEnabled: Bool = true,doubleTapOverlayEnabled: Bool = false,becomesFirstResponderOnOpen: Bool = false,resignsFirstResponderOnScrollDown: Bool = true,updateChannelsFromMessageList: Bool = false,maxTimeIntervalBetweenMessagesInGroup: TimeInterval = 60,cacheSizeOnChatDismiss: Int = 1024 * 1024 * 100,iPadSplitViewEnabled: Bool = true,scrollingAnchor: UnitPoint = .center,showNewMessagesSeparator: Bool = true,handleTabBarVisibility: Bool = true,messageListAlignment: MessageListAlignment = .standard,uniqueReactionsEnabled: Bool = false,localLinkDetectionEnabled: Bool = true,isMessageEditedLabelEnabled: Bool = true,markdownSupportEnabled: Bool = true,userBlockingEnabled: Bool = false,bouncedMessagesAlertActionsEnabled: Bool = true,skipEditedMessageLabel: @escaping (ChatMessage) -> Bool = { _ in false },draftMessagesEnabled: Bool = false,downloadFileAttachmentsEnabled: Bool = false)
+   
+ 
+   public init(messageListType: MessageListType = .messaging,typingIndicatorPlacement: TypingIndicatorPlacement = .bottomOverlay,groupMessages: Bool = true,messageDisplayOptions: MessageDisplayOptions = MessageDisplayOptions(),messagePaddings: MessagePaddings = MessagePaddings(),dateIndicatorPlacement: DateIndicatorPlacement = .overlay,pageSize: Int = 25,messagePopoverEnabled: Bool = true,doubleTapOverlayEnabled: Bool = false,becomesFirstResponderOnOpen: Bool = false,resignsFirstResponderOnScrollDown: Bool = true,updateChannelsFromMessageList: Bool = false,maxTimeIntervalBetweenMessagesInGroup: TimeInterval = 60,cacheSizeOnChatDismiss: Int = 1024 * 1024 * 100,iPadSplitViewEnabled: Bool = true,scrollingAnchor: UnitPoint = .center,showNewMessagesSeparator: Bool = true,handleTabBarVisibility: Bool = true,messageListAlignment: MessageListAlignment = .standard,uniqueReactionsEnabled: Bool = false,localLinkDetectionEnabled: Bool = true,isMessageEditedLabelEnabled: Bool = true,markdownSupportEnabled: Bool = true,userBlockingEnabled: Bool = false,bouncedMessagesAlertActionsEnabled: Bool = true,skipEditedMessageLabel: @escaping (ChatMessage) -> Bool = { _ in false },draftMessagesEnabled: Bool = false,downloadFileAttachmentsEnabled: Bool = false,hidesCommandsOverlayOnMessageListTap: Bool = true,hidesAttachmentsPickersOnMessageListTap: Bool = true)

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

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

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MessageComposerView.o +2159
ChatChannelView.o +1052
MessageListView.o -268
MessageListConfig.o +256

@nuno-vieira nuno-vieira merged commit 07d4e0e into develop Oct 21, 2025
10 of 11 checks passed
@nuno-vieira nuno-vieira deleted the add/dismiss-commands-and-attachments-on-message-list-tap branch October 21, 2025 15:19
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Oct 22, 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