bug: The “latest message” button doesn’t scroll to the correct position.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce I set the messages_limit to load 25 messages at a time.
Currently, my channel has 100 messages. I replied to the very first message, then reloaded the page.
After reloading, when I click on the message I replied to, a button appears that allows me to jump back to the latest message. However, when I click that button, it doesn’t always scroll correctly to the latest message — after repeating this action a few times, the scroll position becomes inaccurate.
Please show me how to fix this. I want it to instantly scroll to the latest message when I click the button.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
https://drive.google.com/drive/folders/1qYArL6WbITStdY86bjmnvA_7K5k64MvB
Package version "@stream-io/stream-chat-css": "^5.14.0", "stream-chat-react": "^13.9.0", "stream-chat": "^9.222.1"
Hello @vihan85 , what I observe is a slight delay in scroll, when the position becomes inaccurate. I am taking a look.
The reason for the delay is that we debounce propagation of the target message page.
This is in order to prevent race conditions as described in the PR #2242.
We plan to do a refactor of the Channel component that would consist in having reactive state in the Channel instance instead of the component. Once that is done, this issue should also be solved.
Hi @MartinCupela
Can I know when the Channel component refactor is planned?
I cannot share any ETA at the moment.