-
Notifications
You must be signed in to change notification settings - Fork 25
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
omnibus: scroller perf, devex enhancements #1197
Conversation
This hook was originally extracted from the Unread banner and then reused in the Scroller; now pulling it back in to the Banner
This changes the localStorage key used to persist the banner notification dimissal to be consistent with the rest of the values we track.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
First, prioritize the most recently viewed channel; then batch fetch the remaining channels. Also, consolidate recentChannel tracking into a hook.
Since we pre-fetch all messages from all channels, this change decreases the initial page fetch size to reduce load on the backend, and to render the page sooner. Then for future page fetches, it uses a much higher number, to reduce subsequent fetches as the user backscrolls. In a future commit, we will hook into the virtuoso scroll seek configuration; if the user is scrolling above a certain threshold velocity, we will fetch even more messages in anticipation of them going deep in the backscroll.
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.
Looks good and runs well locally.
await fetchChannel(recentChannel); | ||
} | ||
|
||
// defer the rest, in batches |
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.
Thank you!
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.
Testing this is giving me some really bad behavior just putting this here now before I can write it all out
So I haven't been able to capture this on camera, but in either watercooler or urbit app dev, on a fresh reload, if you scroll up as soon as you see messages and then scroll up again once the second set of messages load, sometimes you get stuck in like a purgatory of sorts where messages are almost all missing and going either up or down scrolls in the wrong direction. Other than that, it seems like scrolling backwards now gets stuck more often than before. |
@arthyn Okay thanks, will look into this |
sidebar: recent sorting
As luck would have it, an issue that I was struggling with on mobile has been fixed in a recent update: petyosi/react-virtuoso#788 Went through the list of breaking changes and confirmed we are not affected.
Context
This addresses #1187. It also includes additional performance enhancements and devex tweaks.
Changes
react-virtuoso
last.brief
to sort by recent insteadreact-virtuoso
from 2.19.0 --> 3.1.4 to fix a scroller bug on iOS Chrome