Conversation
🦋 Changeset detectedLatest commit: d89b60e 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 |
|
LVGTM: I am very happy that the different prefetch approaches are unified here and the special handling in ViewTransition.astro is replaced by core functions! |
sarah11918
left a comment
There was a problem hiding this comment.
Love this, @bluwy and I'm also getting into the docs PR for this too!
I left some suggestions, mostly about getting explicit options shown etc. as this is a reference page and people might be coming here to look something up or check on it quickly. Duplication of content here and in the guide isn't always a bad thing, since the guide will walk through more and this can be for people who already pretty much know what the feature is about, they just don't know for example all the possible hover, tap etc.
Also, I do not know what's up with documenting the options twice. We're going to need to call in someone else to confirm that.
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Changes
close #8926
Add new
prefetchoption. Supersedes@astrojs/prefetch. Check the docs and RFC for more information on how it works.@astrojs/prefetchintegration will be deprecated after this is merged and released.Tip for reviewing
The core logic changes are in
src/core.src/core/prefetch/index.tscontains the client-side script.The documentation is in the changeset and
src/@types/astro/ts. They take a lot of lines, and the docs forprefetch.prefetchAllandprefetch.defaultStrategyare duplicated. I think it's needed for docs to detect it.Testing
Added e2e tests to make sure a request is sent
Docs
Main docs: withastro/docs#5271
This PR also has changesets and JSDoc for review.