Skip to content
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: use events as trigger to load delayed.js #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidnuescheler
Copy link
Contributor

in some situations it is desirable to load delayed on an earlier trigger than a specified timeout.

https://interaction-trigger-delayed--aem-boilerplate--adobe.aem.page/

Copy link

aem-code-sync bot commented Oct 2, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Oct 2, 2024

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@davidnuescheler
Copy link
Contributor Author

this is likely to be obsoleted when #376 is merged

@freshjones
Copy link

@davidnuescheler this looks/works great, just have a couple questions:

  1. since it seems like boilerplate is headed more in the direction of chore: change from delayed flow to include consent #376 should we wait for that to get merged before considering this approach for our sites? I think our goal is to try and remain as aligned w the Adobe boilerplate approach as much as we can.

  2. if we do use this approach is there any value in adding event listeners for additional events beyond scroll? e.g.
    'mousemove',
    'touchstart',
    'keydown',
    'click',
    'touchmove',

    thanks!

@davidnuescheler
Copy link
Contributor Author

@freshjones thanks a lot for the input... very helpful.

(1) i think that's definitely true that these are competing and i don't know what the merge schedule of either of them are, but it is definitely a good idea to keep an eye on them. even after we merge #376 i would expect people to still use the traditional loading sequence as well, so this is truly just a recommended template.

(2) i think that projects are welcome to add other events, but i found the list somewhat arbitrary, so i didn't want to include and maintain a large set of event here, but i would expect projects to be able add more events based on their specific needs and uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants