EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

feat: Maintain Scroll Position When Closing a Thread

Open Abbas-Askari opened this issue 11 months ago • 4 comments

Brief Title

Acceptance Criteria fulfillment

  • [x] When a thread is closed, the scroll position should remain at the ThreadMainMessage.

Fixes #972

Video/Screenshots

Screencast from 2025-02-10 01-22-36.webm

Details

setJumpToMessage also uses document.getElementById, element.scrollIntoView and a small setTimeout to delay closing the thread, to scroll to a message (in MessageAggregator.js). I have used the same procedure.

PR Test Details

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-973 after approval.

Abbas-Askari avatar Feb 09 '25 20:02 Abbas-Askari

Hi @Abbas-Askari

Thanks for the fix, can you please also maintain scroll position whenever a message is starred / pinned/reacting to emojis etc.. some do, some don't.. Can we make it consistent

Spiral-Memory avatar Feb 10 '25 04:02 Spiral-Memory

Sure! I update!

Abbas-Askari avatar Feb 10 '25 07:02 Abbas-Askari

@Spiral-Memory I have removed scrolling to bottom on staring/unstaring, pinning/unpining, copying, copying link, and qouting. Ready for Merge!

Screencast from 2025-02-10 19-23-55.webm

Abbas-Askari avatar Feb 10 '25 14:02 Abbas-Askari

Fixed Linting issues.

Abbas-Askari avatar Feb 12 '25 16:02 Abbas-Askari