feat: support setting timeout for client:idle#11743
feat: support setting timeout for client:idle#11743ematipico merged 8 commits intowithastro:mainfrom
client:idle#11743Conversation
🦋 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 |
sarah11918
left a comment
There was a problem hiding this comment.
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 <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
sarah11918
left a comment
There was a problem hiding this comment.
Approving for docs! Thank you @ph1p !
Changes
Add the timeout option from the
requestIdleCallbackspecification. 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
timeoutcan 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