-
Notifications
You must be signed in to change notification settings - Fork 43
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
chore: try section loader #434
base: main
Are you sure you want to change the base?
Conversation
|
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 like the overall simplification.
🤞🏼 Hoping that the SI improvements are not just an edge case of the page's content and can be repeated on other sites as well
scripts/scripts.js
Outdated
@@ -598,7 +597,8 @@ async function loadEager(doc) { | |||
decorateBreadcrumb(main); | |||
prepareSideNav(main); | |||
document.body.classList.add('appear'); | |||
await waitForLCP(LCP_BLOCKS); | |||
const firstSection = main.querySelector('.section'); | |||
await loadSection(firstSection, waitForImage); |
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 sometimes wonder if this shouldn't be even implementation details of the responsible block that should await internally before the end of the decoration.
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 would put extra burden on every block that could possibly host the LCP and worry about the distinction of being hosting the LCP and not...
|
trying out a simplified section loader...
https://section-loader--helix-website--adobe.hlx.live/home
https://section-loader--helix-website--adobe.hlx.live/docs/
https://section-loader--helix-website--adobe.hlx.live/developer/tutorial
vs.
https://main--helix-website--adobe.hlx.live/home
https://main--helix-website--adobe.hlx.live/docs/
https://main--helix-website--adobe.hlx.live/developer/tutorial