Commit graph

3 commits

Author SHA1 Message Date
infiinte-persistence 0ab5ca080e Fix 'Related' being loaded on Autoplay despite not visible.
## Issue
In the `Autoplay` case, if the `WaitUntilOnPage` has already opened the gates previously, the next video's Related will be loaded regardless of scroll position.

## Changes
Add a `lastUpdateDate` prop to `WaitUntilOnPage` to allow the parent to reset the gating state.

I don't really like the `lastUpdateDate` prop since it's purpose is not intuitive. Is there a standard way to do a "one-time trigger" from the parent?
2020-07-29 17:56:38 -04:00
infiinte-persistence 1383b19817 WaitUntilOnPage: Debounce to fix false positives.
There are cases where `WaitUntilOnPage` will incorrectly render, such as at the beginning if the upper components hasn't expanded to full size, so `WaitUntilOnPage` would be briefly visible.

Added a 300ms debounce to fix this, which would also improve scrolling performance a bit by doing less. Hopefully 300ms is enough for the upper components to inflate to full size.
2020-07-29 17:56:38 -04:00
Sean Yesmunt 3d352593f3 defer rendering related/comments until user scrolls down 2020-06-01 10:28:13 -04:00