-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[🐴] 60 FPS Keyboard #4066
[🐴] 60 FPS Keyboard #4066
Conversation
Your Render PR Server URL is https://social-app-pr-4066.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cp39316ct0pc73elet90. |
requestAnimationFrame(() => { | ||
if (isMomentumScrolling.value) return | ||
|
||
flatListRef.current?.scrollToEnd({animated: true}) | ||
isMomentumScrolling.value = true | ||
}) | ||
}, [isMomentumScrolling]) |
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.
Since this is happening sync now, we don't need to use requestAnimationFrame
here.
} | ||
|
||
keyboardIsOpening.value = now !== prev | ||
scrollTo(flatListRef, 0, contentHeight.value + now, false) |
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.
Running scrollTo
here within useAnimatedReaction
will perform the scroll sync.
@@ -119,6 +131,7 @@ export function MessagesList() { | |||
// really large - and the normal chat behavior would be to still scroll to the end if it's only one | |||
// message - we ignore this rule if there's only one additional message | |||
if ( | |||
!keyboardIsOpening.value && |
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.
We let the animated reaction handle this now, so never scroll on content size changes due to the keyboard opening.
|
* origin/main: [🐴] Don't always show notification for everything (#4083) [🐴] Additional tweaks to the message list (#4075) Conditionally load unreads (#4072) Revert "Aggregate quickly-sent messages into batches (#4061)" (#4069) 100% Real Deal™ (#4070) [🐴] 60 FPS Keyboard (#4066) Fix delete message error (#4065) Aggregate quickly-sent messages into batches (#4061) [🐴] Input hover and focus styles (#4064) fix typo (#4060) Fix error styles (#4063) Reset leave chat optimistic update if fails (#4058) don't show individual labels on own profile, only "have been placed..." (#4057) [🐴] Tweak header styles (#4053)
* origin/main: [🐴] NUX (#4062) [🐴] Reduce header size (#4078) [🐴] Don't always show notification for everything (#4083) [🐴] Additional tweaks to the message list (#4075) Conditionally load unreads (#4072) Revert "Aggregate quickly-sent messages into batches (#4061)" (#4069) 100% Real Deal™ (#4070) [🐴] 60 FPS Keyboard (#4066) Fix delete message error (#4065) Aggregate quickly-sent messages into batches (#4061) [🐴] Input hover and focus styles (#4064) fix typo (#4060) Fix error styles (#4063) Reset leave chat optimistic update if fails (#4058) don't show individual labels on own profile, only "have been placed..." (#4057) [🐴] Tweak header styles (#4053)
No description provided.