-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Sending a message scrolls down to previous message #54071
Merged
deetergp
merged 12 commits into
Expensify:main
from
callstack-internal:Sending-a-message-scrolls-down-to-previous-message
Jan 22, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ea29168
add logic to scrol when message appears
rinej 768c6d0
adjust isNewMessageDisplayed
rinej 93b5320
Merge branch 'main' into Sending-a-message-scrolls-down-to-previous-m…
rinej 99f3502
changes after main merge
rinej 925a3e0
adjust after mergin main
rinej 273498a
adjust to new eslint rules
rinej c97a850
Merge branch 'main' into Sending-a-message-scrolls-down-to-previous-m…
rinej a6a79d7
refactor useCallstack to useMemo
rinej 37b1e7b
remove unnecessery useEffect deps
rinej e3cf125
Merge branch 'main' into Sending-a-message-scrolls-down-to-previous-m…
rinej d122060
Merge branch 'main' into Sending-a-message-scrolls-down-to-previous-m…
rinej 929a4f8
rename variable to be more descriptive
rinej File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Just a question, do we have any case that needs to run this navigation
runAfterInteractions
?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.
It is to make sure that the scroll occurs after any high-priority interaction in the RN event loop, most likely animation, without it it can lead to some jerky animations or incomplete rendering.
It was already added in the code before that PR
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.
Yeah, you're right. I mean previously, this navigation is put inside
runAfterInteractions
, but with our change, it's moved outside ofrunAfterInteractions
. I'm checking if it's safe to move outside.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 tested it by hardcoding reportID to navigate to and I didn't see any issues. Here is an example video:
navigation.mp4