-
Notifications
You must be signed in to change notification settings - Fork 56
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
afterFirstRoutePaint instead of afterContentPaint #96
Conversation
Also note the seeing the |
I don't know enough about this, but seems logical. @briangonzalez would you like to weigh in? |
I just to note, here is the README from
|
@snewcomer are there any potential downsides to this change? I don't know much about this myself, but it seems like it could be fine. I just don't want to change the current behavior or introduce anything that jumps or appears glitchy. |
adcdd8d
to
a0ce3a5
Compare
@rwwagner90 This PR just moves one tick before to here. I guess this PR wasn't necessarily to merge this, but to perhaps figure out an improved pattern. Even in the demo app, it's really easy to see the jumping (well not easy easy 😆 ). Removing Based on #57, the basic premise was to add In our app, w/o @cclo7 Do you happen to have any thoughts here as well? |
@snewcomer so should we remove |
@rwwagner90 I think it would be good to see if anybody familiar with some history could chime in; however, given this problem is visible in the demo app, it's prob something we should solve. One option would be to set a configuration variable. |
Or |
This change simply puts the scrollTop functionality one frame before it currently runs (which
afterContentPaint
is two frames after running scheduleWork in didTransition).I currently see jitter as the DOM elements of the
next
route are showing beforescrollTop
happens. Visually, this reduces the time thenext
route content is seen before scrollTop happens; however, perhaps more work can be done to tighten this loop.Also, I might be missing some context, but what is the reason we want to scrollTop after the content has painted? I'm currently seeing that without the
scheduleWork
functionality, visually the app is better b/w transitions w/ and w/ofetch/xhrs
...Ref #57 #17