Adaptive site: add priority prop to Island#8970
Merged
Conversation
|
Size Change: 0 B 🆕 Total Size: 0 B |
abef462 to
1e2b436
Compare
1e2b436 to
1d8e3ee
Compare
eaa286c to
677d42c
Compare
b285560 to
5e40ec2
Compare
5e40ec2 to
d284108
Compare
IslandIsland
Non-critical islands _must_ be deferred! Co-authored-by: Alex Sanders <[email protected]>
d284108 to
dadb0eb
Compare
Islandpriority prop to Island
mxdvl
commented
Oct 5, 2023
abeddow91
approved these changes
Oct 5, 2023
mxdvl
commented
Apr 4, 2024
| // Deferring interactives until CPU idle achieves the lowest Cumulative Layout Shift (CLS) | ||
| // For more information on the experiment we ran see: https://github.com/guardian/dotcom-rendering/pull/4942 | ||
| <Island defer={{ until: 'idle' }}> | ||
| <Island priority="critical" defer={{ until: 'visible' }}> |
Contributor
Author
There was a problem hiding this comment.
We made this change because you cannot defer until idle for a critical priority – we should probably have brought more attention to this change to @guardian/commercial-dev
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
depends on #8967...
What does this change?
priorityprop toIsland, which corresponds to the priorities of the schedulerIslandvia the new propImportant
This PR does not affect way in which
Islands are loaded/hydrated right now.A subsequent PR will use the new
priorityprop to orchestrate hydration with the scheduler.Why?
Will enable us to ensure high priority islands are run on the page before other, lower priority tasks.
Reviewing
A lot of files are touched, but the main changes are in
dotcom-rendering/src/components/Island.tsx(and its test file).All other changes should just be adding the
priorityprop to existingIslands.#9013