-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat: support setting timeout for client:idle
#11743
Conversation
🦋 Changeset detectedLatest commit: 062cd46 The changes in this PR will be included in the next version bump. 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 |
59e7eb0
to
94f8475
Compare
94f8475
to
54c788b
Compare
Thanks! Can you add a test? One in the |
Sure! :) |
8f122c4
to
13d00c1
Compare
Done. I don't know why the PR checks are failing |
I think you can ignore them. Those two don't work well with forks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this really helpful new feature addition, @ph1p ! I'm sure people will really appreciate this.
I've left some comments below for the changeset for your consideration, and I'll be reviewing the accompanying docs PR shortly!
Co-authored-by: Sarah Rainsberger <[email protected]>
Co-authored-by: Sarah Rainsberger <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for docs! Thank you @ph1p !
Changes
Add the timeout option from the
requestIdleCallback
specification. https://www.w3.org/TR/requestidlecallback/#the-requestidlecallback-methodTesting
I don't know where to put the test because expanding each file with client directives makes the tests very slow.
Docs
client:idle={{timeout}}
Optionally, a value for
timeout
can be passed to the underlyingrequestIdleCallback
. It hydrates the component if the client is not idle, but specifies the maximum time to wait.withastro/docs#9130