You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the calculations around distanceToEnd in VirtualizedList should subtract the footer height.
Details
Our site uses quite a large footer to drive SEO content on our pages. For some pages, this footer can be an entire window size of height or more.
I noticed that renderAhead (virtualization disabled) and I believe onEndReached both include the footer height in their calculations for how close to the end of content the user is currently at.
The issue with this is that, with a large enough footer, the virtualized list will not render additional content until the user has scrolled past the content and are viewing the footer. This causes content to "pop in" above the fold, where they won't see it until scrolled back into view.
Discussion points
We can always keep increasing the onEndReachedThreshold to account for the ever-increasing amount of SEO content shoved into our footer, but this feels wrong. If the goal of the code is to determine how close to the end of the primary content the user is, I believe it would be more correct to take the footer height out of the equation (subtract this._footerLength).
The text was updated successfully, but these errors were encountered:
Introduction
I believe the calculations around distanceToEnd in VirtualizedList should subtract the footer height.
Details
Our site uses quite a large footer to drive SEO content on our pages. For some pages, this footer can be an entire window size of height or more.
I noticed that renderAhead (virtualization disabled) and I believe onEndReached both include the footer height in their calculations for how close to the end of content the user is currently at.
The issue with this is that, with a large enough footer, the virtualized list will not render additional content until the user has scrolled past the content and are viewing the footer. This causes content to "pop in" above the fold, where they won't see it until scrolled back into view.
Discussion points
We can always keep increasing the onEndReachedThreshold to account for the ever-increasing amount of SEO content shoved into our footer, but this feels wrong. If the goal of the code is to determine how close to the end of the primary content the user is, I believe it would be more correct to take the footer height out of the equation (subtract this._footerLength).
The text was updated successfully, but these errors were encountered: