Feat: Added Scroll-to-Message Functionality#667
Feat: Added Scroll-to-Message Functionality#667Spiral-Memory merged 10 commits intoRocketChat:developfrom
Conversation
|
Hey @Spiral-Memory , |
|
Yep, looks fine but for every message, you are maintaining a ref, not sure about it's performance impact when thousands of messages are present in the channel.. will have to discuss with other collaborators to integrate this. |
I have changed my approach and updated my PR description. In this approach we don't need to maintain ref , instead we find the element directly by its id as implemented in RC |
|
@Spiral-Memory will this new approach be better ? |
|
Yes, it do look like a good and feasible solution, have to test it once and I'll let you know Thanks for the PR @abirc8010 |
Spiral-Memory
left a comment
There was a problem hiding this comment.
Testing deployment
|
Hey @Spiral-Memory, |
|
Awesome work @abirc8010 |
Brief Title
This pull request introduces a feature that allows users to scroll to a specific message in the message list when clicked on a message in the sidebar (in Threads , Mentions, Starred Messages, Pinned Messages and Search Messages ).
Acceptance Criteria fulfillment
Introduced a
setJumpToMessagefunction inside the MessageAggregator componentAdded an onClick event handler to the arrow-back icon that calls
setJumpToMessage(msg._id)when the icon is clicked.the function
setJumpToMessagesearches for the message element using its ID (ec-message-body-${msgId}) and uses scrollIntoView() to smoothly scroll to the message.Video/Screenshots
jump_to_message.webm
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-667 after approval. Contributors are requested to replace
<pr_number>with the actual PR number.