-
Notifications
You must be signed in to change notification settings - Fork 262
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
Feat: Added Scroll-to-Message Functionality #667
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
setJumpToMessage
function 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
setJumpToMessage
searches 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.