-
Notifications
You must be signed in to change notification settings - Fork 285
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
Fix Loading of Older Thread Messages in Thread Message Modal #896
base: develop
Are you sure you want to change the base?
Conversation
Hey @smritidoneria, I think fetching threads only through the API once on opening the sidebar might not retrieve older messages due to the limit on the number of items it returns. Perhaps we could consider implementing a "load more threads" (by setting required offset) feature on scroll down to handle this |
hey @abirc8010 , Thanks for pointing out, I will look after this. |
Hi @smritidoneria, since this issue affects not only threads but also other items in the sidebar, it might be better to address the loading of more items in the sidebar in a single PR. You can refer to a similar issue #915 for reference. |
I was reviewing the pr and find out some issue Calling the function like this and, where can I see the logs for the file EmbeddedChatApi.ts. it is neither showing in browser tools nor in terminal? Any suggestions @abirc8010 , @Spiral-Memory , @SinghaAnirban005 |
Hey @smritidoneria you can find the logs in the browser console, did you run yarn build in the api directory after your changes? Also I found this in ChatLayout.js , try to import the Btw is there any reason you’re passing |
@smritidoneria you probably missed out on building the api package , @abirc8010 i believe doing that useEffect thing in |
yaa, actually I forgot to build the package, thanks! |
hey @abirc8010 , @SinghaAnirban005 , I'm encountering an issue with the scroll event not being detected in the message aggregator component,. I have tried using many ways , I have tried giving ref to the threaded message main container that didn't work, and then the message aggregator component main box, which is also not working suggestions? |
Hey @smritidoneria instead of maintaining a ref could we go with this approach ? Additionally, I think the logic in the The functionality needs to be extendable so that a similar logic can be applied to rest of the MessageAggregators like starred or pinned |
Yes, @abirc8010, we can proceed with the approach you mentioned. However, in the main ChatInterface, we are currently addressing this issue using ref. To maintain the application's consistency and serializability, we should first attempt to resolve this using ref. If we are unable to do so after further effort, we can then switch to your proposed approach. |
Hey all, Really busy these days.. and not getting the time to review.. will review as soon as i get some time Thanks |
2ef2985
to
8f3bb40
Compare
Brief Title
This pull request addresses the issue where older thread messages are not being loaded in the thread message modal.
Acceptance Criteria fulfillment
-Updated the ChatBody component to correctly use the getAllThreadMessages function from the useFetchChatData hook and update the state.
Fixes #895
Video/Screenshots
Screen.Recording.2025-01-14.at.5.32.42.PM.mov
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval. Contributors are requested to replace
<pr_number>
with the actual PR number.