-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Exclude JS from move JS code to the bottom of the page #34946
Conversation
Hi @in-session. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests B2B, Functional Tests EE, Functional Tests CE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
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.
Hi @in-session.
Thanks for PR.
I believe that we can remove data-move="false"
string from result context after detection.
What do you think?
@Dan4ik |
So if in file xml layout dev add specific file external/custom js files have attribute "data-move" equal false magento will act not move these files to bottom ? From my experiences with requirejs in magento stack current if we require it somewhere in js codebase you cannot remove it from layout. The only way for exclude is find place where it define and add some condition or remove it completely |
Yes the idea behind it is to exclude scripts from moving
But of course this also refers to inline scripts which are integrated via phtml, like google tag manager:
You can find many entries of the missing function: |
@in-session what is the status on this? |
@vseager |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
I would say no as it is better for frontend debugging to check the values. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@in-session Can you please resolved the conflicts? |
@magento run all tests |
Pull Requests are not mergeable to the mainline. Please merge the latest mainlines to your Pull Requests and restart the builds. |
Currently there is no possibility to exclude global single files or inline scripts with the function "Move JS code to the bottom of the page". However, this is necessary in some areas, for example with the Google Tag Manager or other critical JS resources.
Configuration>Developer>JavaScript Settings>Move JS code to the bottom of the page