magento2
magento2 copied to clipboard
[Issue] Code cleanup and add new critical head block and move critical css before assets
This issue is automatically created based on existing pull request: magento/magento2#35580: Code cleanup and add new critical head block and move critical css before assets
Description (*)
The critical css should appear before the assets. In addition, the changes provide many more opportunities to insert custom blocks between the meta details and assets via template or xml blocks. These include, for example, own meta specifications which are not controllable via XML, as well as assets from the template which must be inserted before other files, for example, constentscripts or special preloads, og:meta tags.
These changes are important to make the frontend basically more customizable and performace or function optimization.
Related Pull Requests
Fixed Issues (if relevant)
- use short syntax PHP 5 compatibility is no longer needed
- adjustment namespace import
- use switch statement with direct return
- move critical inline css before assets
Manual testing scenarios (*)
- Use CSS critical path
Questions or comments
Contribution checklist (*)
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [ ] All automated tests passed successfully (all builds are green)
Before:
After:
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
- [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- [ ] 3. Add
Area: XXXXXlabel to the ticket, indicating the functional areas it may be related to. - [ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - [ ] 5. Add label
Issue: Confirmedonce verification is complete. - [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hello @in-session,
Thank you for the report and collaboration!
Verified this on 2.4-develop.
The critical CSS is appearing after the assets.
Take a look at the screenshot below:
And the rest of the code cleanup looks good, Hence confirming the issue.
Thank you.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12000 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.