-
Notifications
You must be signed in to change notification settings - Fork 283
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
Arrow Redirection in Pinned Message and starred Message Modal Fails for Non-Visible Messages #871
Comments
working on this! |
If I click on the arrow of a pinned message that is not in the viewport and not in the DOM, how is its element being found? The element should not be in the DOM if it is not visible in the viewport. Screen.Recording.2025-01-11.at.11.18.08.PM.movthis is setJumpToMessage in messageAggregator.js file Any suggestions @Spiral-Memory , @abirc8010 , @devanshkansagra , @dhairyashiil ? |
I noticed that too, I don't remember, who exactly implemented that.. But whoever did, pls look into it It can't jump a lot of times when the message is not in the view.. I think they were attaching some ref id to each msg at the start.. and looking for that |
Hey @Spiral-Memory @smritidoneria if the message is not in the view , then it will require to fetch the older messages , there is an open PR by @SinghaAnirban005 to load more messages maybe we can reutilize that method |
Not just that.. it's fetched.. but it's just not in the view.. still many times I've noticed it doesn't go to that msg |
yaa, the message is fetched as that is why it is showing in the element. but it is not in the DOM |
In RocketChat, they maintains the route (signifying the message Id )that gets pushed when the jump arrow button hits. |
Yaa but we can't do like this.. we can't change urls.. It's like an integrated app when in use |
yes agreed. maybe we can fetch all the messages using the getMessage api in the embedded Chat by setting the count perimeter. |
Can you look into it.. ig you implemented jump to message right if I'm not wrong.. |
Yes @Spiral-Memory I am looking into it |
@Spiral-Memory, @abirc8010, @smritidoneria, I noticed this as well. If in between, there are user action messages or a quote message, then this problem occurs |
Hey @smritidoneria @Spiral-Memory @dhairyashiil , What I found is that the message is not fetched. The element you see in the log is actually from the sidebar. The getElementById function will scroll into view the first element with a matching ID. So, if the message exists in the chat window and is fetched, it will scroll that element into view. You can try removing |
Hey @abirc8010 That's what I'm saying.. i was testing it with web pr links.. I had a few messages in the chatwindow.. just not in the view.. but when i clicked on jump to message, it was not scrolling to that message. |
Hey @Spiral-Memory, |
Could you share him one |
yaa, I see the element it shows is from the sidebar only. what should we do then? |
hey @abirc8010 , I have attached the video in the issue itself, check the actual behaviour, kindly refer the same. |
I'll also attach one @abirc8010 |
Well @smritidoneria you may refer to one of my open PR's for loading of older messages , there I have made a function that handles loading of older messages |
@smritidoneria I think you’re trying to scroll to an older message. The starred message uses an API (which is not the case for pinned messages) that returns only starred messages, instead of filtering them out from the main chat window. As a result, it’s possible to see a message in the starred section that’s not visible (not fetched) in the main chat window. |
@abirc8010 , that is fine. but when the user hits the jump arrow button, the window should scroll down to that message, but for this to happen, the selected message should be available in the dom which is not right now. for this, we might to load the older messages and store it in dom so that scrollintoview work properly. |
For that we can use @SinghaAnirban005 code and modify it accordingly.. Anyone wants to work on that ? |
I can work on it |
Sure @abirc8010 |
Also, let's shift pinned messages to api call for keeping the same behaviour there as well Though we'll not be able to update in real time then 🥲.. What do you think, should we do that @abirc8010 |
Can we do something like this ? Fetch all pinned messages through api instead of reading it from messages.. Then whenever a pinned event is triggered, maybe add that as well.. I'm not sure about the feasibility.. but yeah |
maybe, I think that can work |
Hey @smritidoneria could you please check if your PR #854 fixes it ? |
yeah I can see it fixes the issue |
hey @abirc8010 ,I think that pr revolves around fixing the appearance of the pin messages of thread to appear on the sidebar even if the user is on the main chat interface. |
@smritidoneria , I can see you are using I tested it locally, and you can verify it as well. |
yes @abirc8010 , that is fine, older messages do not get shown in the sidebar by my pr, but we do have the issue that if the user press the jump arrow button for the older message that is not currently in the viewport, then the window did not get scroll to that older message. this is the issue that we are having |
@smritidoneria, I think there is some confusion here. I was referring to this issue of fetching pinned messages via an API call instead of filtering them from the main chat window messages. This can be fixed by #854, not the jump-to-message one. |
@abirc8010 , yes fetching of pinned message via an API call can be fixed by pr #854. we have to look the solution for jump-to-message issue. |
Yeah , waiting for #810 to get merged |
Description:
The arrow redirection in the pinned message modal does not properly redirect to messages that are not currently visible in the viewport. When clicking the jump arrow for a pinned message that is outside the visible area, the expected behavior is to scroll to and highlight the message. However, this redirection fails for messages that are not loaded in the DOM due to viewport limitations.
Steps to reproduce:
1.Open the chat interface.
2.Pin a message that is not currently visible in the viewport (e.g., an older message).
3.Open the pinned message modal.
4.Click the jump arrow for the pinned message.
5.Observe that the redirection does not properly scroll to and highlight the message.
Expected behavior:
It should redirect properly.
Actual behavior:
Screen.Recording.2025-01-11.at.11.12.06.PM.mov
The text was updated successfully, but these errors were encountered: