Skip to content

pat-inject autoload-visible with IntersectionObserver #955

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

Closed
thet opened this issue Jan 27, 2022 · 2 comments · Fixed by #941
Closed

pat-inject autoload-visible with IntersectionObserver #955

thet opened this issue Jan 27, 2022 · 2 comments · Fixed by #941

Comments

@thet
Copy link
Member

thet commented Jan 27, 2022

We had a problem where items which were visible on the dashboard were not loaded due to pat-inject trigger:autoload-visible not kicking in, even if the items were in the viewport when loading.

They were immediately loaded after scrolling once.

We had a quickfix for this.
But this should be fixed in a way, that trigger: autoload-visible does the expected thing - loading items when they are in the viewport, even without scrolling. We should think of using the intersection observer for that where we can also define a margin for loading items in advance.

@cornae
Copy link
Member

cornae commented Jan 27, 2022

Don't worry about the margin. I usually tune that with CSS.

@thet
Copy link
Member Author

thet commented Mar 14, 2022

Work is happening here: #941

thet added a commit that referenced this issue Mar 15, 2022
…ver.

The autoload-visible trigger of pat-inject now uses an IntersectionObserver.
This simplifies the code and improves performance because there are no more complex position calculations involved.

Fixes: #955
@thet thet closed this as completed in #941 Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants