Skip to content

feat: qidlevisible event / 'idle-visible' vistask strategy #7601

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wmertens
Copy link
Member

This makes Link's q-data prefetching less eager, so it doesn't interfere with LCP

@wmertens wmertens requested review from a team as code owners May 15, 2025 16:08
Copy link

changeset-bot bot commented May 15, 2025

🦋 Changeset detected

Latest commit: cdb40db

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@builder.io/qwik-city Minor
@builder.io/qwik Minor
eslint-plugin-qwik Minor
create-qwik Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented May 15, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@7601
npm i https://pkg.pr.new/@builder.io/qwik-city@7601
npm i https://pkg.pr.new/eslint-plugin-qwik@7601
npm i https://pkg.pr.new/create-qwik@7601

commit: cdb40db

Copy link
Contributor

github-actions bot commented May 15, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview cdb40db

* Emitted by qwik-loader when an element becomes visible, after document idle. Used by
* `useVisibleTask$` @public
*/
export type QwikIdlevisibleEvent = CustomEvent<IntersectionObserverEntry>;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be QwikIdleVisibleEvent?

@maiieul maiieul added the STATUS-2: requires discussion Requires further discussion before moving forward label May 15, 2025
@maiieul
Copy link
Contributor

maiieul commented May 15, 2025

Before merging this new strategy/API we need to make sure that VisibleTaskStrategy = "intersection-observer" can indeed be fired during LCP and therefore slow down LCP.

As discussed it's currently not the case (see screenshot) but might be in the future if we tweak things a little.

image
core is loaded after LCP, and we need core to execute a visible task

@maiieul maiieul moved this from Backlog to Waiting For Review in Qwik Development May 16, 2025
@wmertens wmertens marked this pull request as draft May 16, 2025 12:01
@wmertens
Copy link
Member Author

converted to draft, we may not need this strategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-2: requires discussion Requires further discussion before moving forward
Projects
Status: Waiting For Review
Development

Successfully merging this pull request may close these issues.

3 participants