Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Interactivity API: Improvements to the experimental full-page navigation #64067
Interactivity API: Improvements to the experimental full-page navigation #64067
Changes from all commits
b34f5b6
894bc9a
d132d26
2f8c93b
d8500ec
804b7c1
0f2a51b
eac0deb
af136bc
424da1c
56a9b08
bc0c933
78d2d88
a5a40cc
3cef459
2811a8c
79bd1c9
06fd98d
9983180
0186d2a
3e49d89
a9469d0
13c881a
0b550f9
cf73a66
375d4ee
a539b9a
ba856cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We need the webpack comment here. Otherwise, webpack will try to code-split here into a new chunk and it does not permit using fully dynamic paths.
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.
The possible fetch failure is one of the more fragile places here and it's handled.
However, anything else that fails in these promises will cause the entire function to reject. I don't think that's desired (based on the
try/catch
onfetch
).allSettled
may be better to use here, since we're not interested in the result and want to make a best effort here, then the function can continue whether or not all the promises resolve.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.
That's a good idea indeed, but could we do it in a follow-up PR?
I didn't intend to change this behavior in this PR.
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 should check for
response.ok
and it would probably be good to check the content type response as well.These could throw an error to enter the catch and be logged to the console.
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.
I'm rather new to this and lack context. Is there a reason to inject link tags instead of loading the style elements inline?
One reason I'm curious about this is that the browser will decide how many resources on the page to fetch in parallel, but I believe these fetch calls fetch all the resources in parallel without any limits. Ideally it seems like
link
tags would be used but I assume that was explored and discarded as an option.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.
That totally makes sense, but could we also leave this for a follow-up PR? I didn't intend to change this behavior in this PR.
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.
I'm not sure I follow here, sorry. We are injecting
<link>
tags to prefetch modules.Or did you mean if there's a reason NOT to inject
link
tags for CSS assets?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: why not use the same link tags for CSS assets?
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.
Yeah, we can do that! (#60951 (comment))
I just wasn't planning on doing that in this iteration 🙂