Skip to content

Conversation

@testableapple
Copy link
Contributor

@testableapple testableapple commented Oct 28, 2025

🔗 Issue Links

Resolve https://linear.app/stream/issue/IOS-571

🎯 Goal

Add message highlighting on jumping to a quoted message

🧪 Manual Testing Notes

  • Open channel and scroll to some older page
  • Quote-reply to any message
  • Tap on quote
  • You should be scrolled up to that message and it should be highlighted
  • Send a message in channel
  • Open thread in this message
  • The message should not be highlighted
  • Open thread
  • Quote-reply to any message
  • Tap on quote
  • You should be scrolled up to that message and it should be highlighted
  • Open thread
  • Quote-reply to any message also in the channel
  • Go back to channel
  • Tap on quote
  • You should be moved to the thread to that message and it should be highlighted
  • Open thread
  • Send a message also in the channel
  • Go back to channel
  • Tap on "Thread reply" label
  • You should be moved to the thread to that message and it should be highlighted

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

@testableapple testableapple requested a review from a team as a code owner October 28, 2025 17:15
@testableapple testableapple added the ✅ Feature An issue or PR related to a feature label Oct 28, 2025
@testableapple testableapple marked this pull request as draft October 28, 2025 17:16
@testableapple testableapple marked this pull request as ready for review October 29, 2025 17:13
showsAllInfo: Bool,
isInThread: Bool,
scrolledId: Binding<String?>,
highlightedMessageId: Binding<String?>,
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change, we can't do this :/ Is there any alternative?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the PR, now using Environment instead of factory param 👍

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChatSwiftUI 9.58 MB 9.63 MB +51 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MessageRepliesView.o +30004
ChatChannelViewModel.o +6669
MessageContainerView.o +2131
ChatChannelView.o +714
ColorPalette.o +580
Show 17 more objects
Object Diff (bytes)
DefaultViewFactory.o +580
PollAllOptionsView.o +425
AudioSessionFeedbackGenerator.o +282
ReactionsOverlayView.o +148
AlertBannerViewModifier.o +124
MessageComposerView.o +124
BottomReactionsView.o -104
ChatChannelList.o -104
FileAttachmentsView.o +104
MessageListView.o -92
SlowModeView.o -76
RecordingTipView.o +72
ChatChannelListItem.o -72
MessageListHelperViews.o -60
Utils.o +48
Images.o -48
ChannelHeaderLoader.o -44

@github-actions
Copy link

Public Interface

 public struct ColorPalette  
-   public var shadow: UIColor
+   public var messageCellHighlightBackground: UIColor
-   public var lightBorder: UIColor
+   public var shadow: UIColor
-   public var innerBorder: UIColor
+   public var lightBorder: UIColor
-   public var border: UIColor
+   public var innerBorder: UIColor
-   public var border2: UIColor
+   public var border: UIColor
-   public var border3: UIColor
+   public var border2: UIColor
-   public var alert: UIColor
+   public var border3: UIColor
-   public var alternativeActiveTint: UIColor
+   public var alert: UIColor
-   public var inactiveTint: UIColor
+   public var alternativeActiveTint: UIColor
-   public var alternativeInactiveTint: UIColor
+   public var inactiveTint: UIColor
-   public lazy var messageCurrentUserBackground: [UIColor]
+   public var alternativeInactiveTint: UIColor
-   public lazy var messageCurrentUserEmphemeralBackground: [UIColor]
+   public lazy var messageCurrentUserBackground: [UIColor]
-   public lazy var messageOtherUserBackground: [UIColor]
+   public lazy var messageCurrentUserEmphemeralBackground: [UIColor]
-   public lazy var messageCurrentUserTextColor: UIColor
+   public lazy var messageOtherUserBackground: [UIColor]
-   public lazy var messageOtherUserTextColor: UIColor
+   public lazy var messageCurrentUserTextColor: UIColor
-   public lazy var quotedMessageBackgroundCurrentUser: UIColor
+   public lazy var messageOtherUserTextColor: UIColor
-   public lazy var quotedMessageBackgroundOtherUser: UIColor
+   public lazy var quotedMessageBackgroundCurrentUser: UIColor
-   public lazy var reactionCurrentUserColor: UIColor?
+   public lazy var quotedMessageBackgroundOtherUser: UIColor
-   public lazy var reactionOtherUserColor: UIColor?
+   public lazy var reactionCurrentUserColor: UIColor?
-   public lazy var selectedReactionBackgroundColor: UIColor?
+   public lazy var reactionOtherUserColor: UIColor?
-   public var voiceMessageControlBackground: UIColor
+   public lazy var selectedReactionBackgroundColor: UIColor?
-   public var messageLinkAttachmentAuthorColor: Color
+   public var voiceMessageControlBackground: UIColor
-   public var messageLinkAttachmentTitleColor: Color
+   public var messageLinkAttachmentAuthorColor: Color
-   public var messageLinkAttachmentTextColor: Color
+   public var messageLinkAttachmentTitleColor: Color
-   public lazy var composerPlaceholderColor: UIColor
+   public var messageLinkAttachmentTextColor: Color
-   public lazy var composerInputBackground: UIColor
+   public lazy var composerPlaceholderColor: UIColor
-   public lazy var composerInputHighlightedBorder: UIColor
+   public lazy var composerInputBackground: UIColor
-   public var navigationBarGlyph: UIColor
+   public lazy var composerInputHighlightedBorder: UIColor
-   public var navigationBarTitle: UIColor
+   public var navigationBarGlyph: UIColor
-   public var navigationBarSubtitle: UIColor
+   public var navigationBarTitle: UIColor
-   public var navigationBarTintColor: Color
+   public var navigationBarSubtitle: UIColor
-   public var navigationBarBackground: UIColor?
+   public var navigationBarTintColor: Color
-   public var bannerBackgroundColor: UIColor
+   public var navigationBarBackground: UIColor?
-   
+   public var bannerBackgroundColor: UIColor
- 
+   
-   public init()
+ 
+   public init()

 public struct MessageRepliesView: View  
-   public init(factory: Factory,channel: ChatChannel,message: ChatMessage,replyCount: Int,showReplyCount: Bool = true,isRightAligned: Bool? = nil)
+   public init(factory: Factory,channel: ChatChannel,message: ChatMessage,replyCount: Int,showReplyCount: Bool = true,isRightAligned: Bool? = nil,threadReplyMessage: ChatMessage? = nil)

 open class ChatChannelViewModel: ObservableObject, MessagesDataSource  
-   @Published public var listId
+   @Published public var highlightedMessageId: String?
-   @Published public var showScrollToLatestButton
+   @Published public var listId
-   @Published public var currentDateString: String?
+   @Published public var showScrollToLatestButton
-   @Published public var messages
+   @Published public var currentDateString: String?
-   @Published public var messagesGroupingInfo
+   @Published public var messages
-   @Published public var currentSnapshot: UIImage?
+   @Published public var messagesGroupingInfo
-   @Published public var reactionsShown
+   @Published public var currentSnapshot: UIImage?
-   @Published public var bouncedMessage: ChatMessage?
+   @Published public var reactionsShown
-   @Published public var bouncedActionsViewShown
+   @Published public var bouncedMessage: ChatMessage?
-   @Published public var quotedMessage: ChatMessage?
+   @Published public var bouncedActionsViewShown
-   @Published public var editedMessage: ChatMessage?
+   @Published public var quotedMessage: ChatMessage?
-   @Published public var channelHeaderType: ChannelHeaderType
+   @Published public var editedMessage: ChatMessage?
-   @Published public var threadMessage: ChatMessage?
+   @Published public var channelHeaderType: ChannelHeaderType
-   @Published public var threadMessageShown
+   @Published public var threadMessage: ChatMessage?
-   @Published public var shouldShowTypingIndicator
+   @Published public var threadMessageShown
-   @Published public var scrollPosition: String?
+   @Published public var shouldShowTypingIndicator
-   @Published public private var loadingNextMessages: Bool
+   @Published public var scrollPosition: String?
-   @Published public var firstUnreadMessageId: String?
+   @Published public private var loadingNextMessages: Bool
-   public var currentUserMarkedMessageUnread: Bool
+   @Published public var firstUnreadMessageId: String?
-   @Published public private var channel: ChatChannel?
+   public var currentUserMarkedMessageUnread: Bool
-   public var isMessageThread: Bool
+   @Published public private var channel: ChatChannel?
-   
+   public var isMessageThread: Bool
- 
+   
-   public init(channelController: ChatChannelController,messageController: ChatMessageController? = nil,scrollToMessage: ChatMessage? = nil)
+ 
-   
+   public init(channelController: ChatChannelController,messageController: ChatMessageController? = nil,scrollToMessage: ChatMessage? = nil)
- 
+   
-   public func scrollToLastMessage()
+ 
-   public func messageSentTapped()
+   public func scrollToLastMessage()
-   public func jumpToMessage(messageId: String)-> Bool
+   public func messageSentTapped()
-   open func handleMessageAppear(index: Int,scrollDirection: ScrollDirection)
+   public func jumpToMessage(messageId: String)-> Bool
-   open func groupMessages()
+   open func handleMessageAppear(index: Int,scrollDirection: ScrollDirection)
-   public func showReactionOverlay(for view: AnyView)
+   open func groupMessages()
-   public func showBouncedActionsView(for message: ChatMessage)
+   public func showReactionOverlay(for view: AnyView)
-   public func deleteMessage(_ message: ChatMessage)
+   public func showBouncedActionsView(for message: ChatMessage)
-   public func resendMessage(_ message: ChatMessage)
+   public func deleteMessage(_ message: ChatMessage)
-   public func editMessage(_ message: ChatMessage)
+   public func resendMessage(_ message: ChatMessage)
-   open func messageActionExecuted(_ messageActionInfo: MessageActionInfo)
+   public func editMessage(_ message: ChatMessage)
-   @objc public func onViewAppear()
+   open func messageActionExecuted(_ messageActionInfo: MessageActionInfo)
-   @objc public func onViewDissappear()
+   @objc public func onViewAppear()
-   public func setActive()
+   @objc public func onViewDissappear()
+   public func setActive()

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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! ✅

@testableapple testableapple merged commit 9eae155 into develop Oct 31, 2025
10 of 11 checks passed
@testableapple testableapple deleted the feature/highlight branch October 31, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ Feature An issue or PR related to a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants