-
Notifications
You must be signed in to change notification settings - Fork 13.1k
regression: jump to message #35918
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
regression: jump to message #35918
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/client/views/room/body/hooks/useRestoreScrollPosition.ts
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/body/hooks/useRestoreScrollPosition.ts
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/body/hooks/useRestoreScrollPosition.ts
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/MessageList/hooks/useLoadSurroundingMessages.ts
Show resolved
Hide resolved
|
dad4c3b to
dde27ab
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35918 +/- ##
===========================================
- Coverage 61.26% 59.86% -1.40%
===========================================
Files 3164 2880 -284
Lines 74757 70607 -4150
Branches 16689 15692 -997
===========================================
- Hits 45801 42271 -3530
+ Misses 25850 25547 -303
+ Partials 3106 2789 -317
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
1 similar comment
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
1 similar comment
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/client/views/room/contextualBar/Threads/hooks/useLegacyThreadMessages.ts
Show resolved
Hide resolved
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
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.
I'm not happy with the path we're moving here, mixing refactor and fixes. But as we discussed, all the changes are necessary to make the regression work properly

Proposed changes (including videos or screenshots)
Introduced here: #35818
Issue(s)
Steps to test or reproduce
Further comments
CORE-1101
This pull request introduces several enhancements and refactorings to improve message navigation and scrolling behavior in the Rocket.Chat application. The key changes include:
New Hook for Message Navigation: A new hook,
useJumpToMessageImperative, is introduced to provide an imperative method for scrolling to a specific message element, addressing complexities with custom scrollbars. This hook utilizesuseRef,useCallback, anduseMergedRefsfor efficient reference management.Refactoring of Existing Hooks:
useLoadSurroundingMessageshook is refactored to fetch the message ID from URL search parameters instead of receiving it as a prop. It now includes ajumpToRefto track the jump target element, preventing redundant operations.useRestoreScrollPositionhook is updated to accept a room ID directly and uses auseCallbackref pattern for improved scroll restoration behavior.Integration in Room Components:
RoomBodyandRoomBodyV2components are updated to integrate the new hooks for enhanced message list navigation. They also refactor ref handling by consolidating multiple references usinguseMergedRefs.RoomBodycomponent now correctly passesroom._idtouseRestoreScrollPosition, likely fixing previous issues.Improved Message Fetching Logic: The
useGetMorehook is refactored to centralize the logic for fetching more messages into a throttled function,checkPositionAndGetMore, which is triggered by scroll events and a newResizeObserver. This change improves the separation of concerns, although a significant change in the condition for loading future messages requires clarification.These changes aim to enhance the maintainability and functionality of message navigation and scrolling within the Rocket.Chat application.