Skip to content
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

Improve listingpage lazy loading #871

Merged
merged 4 commits into from
Jul 20, 2018
Merged

Conversation

Gnito
Copy link
Contributor

@Gnito Gnito commented Jul 19, 2018

No description provided.

@Gnito Gnito requested a review from lyyder July 19, 2018 14:34
Copy link
Contributor

@lyyder lyyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the comments, otherwise good to go 👍

@@ -106,8 +110,8 @@ export const lazyLoadWithDimensions = (Component, options) => {
window.addEventListener('orientationchange', this.handleWindowResize);

this.defaultRenderTimeout = window.setTimeout(() => {
if (this.isElementInViewport()) {
this.handleWindowResize();
if (this.isElementNearViewport(0)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isElementNearViewport doesn't seem to take a param.

@@ -120,7 +124,9 @@ export const lazyLoadWithDimensions = (Component, options) => {
}

handleWindowResize() {
this.setDimensions();
if (this.isElementNearViewport(NEAR_VIEWPORT_MARGIN)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isElementNearViewport doesn't seem to take a param, but it uses NEAR_VIEWPORT_MARGIN internally.

@Gnito Gnito force-pushed the improve-listingpage-lazy-loading branch from 3a5fa17 to ab81987 Compare July 20, 2018 08:50
@Gnito Gnito merged commit fbdc110 into master Jul 20, 2018
@Gnito Gnito deleted the improve-listingpage-lazy-loading branch July 20, 2018 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants