Skip to content

Conversation

in-session
Copy link
Contributor

@in-session in-session commented Jun 6, 2022

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)

  1. use short syntax PHP 5 compatibility is no longer needed
  2. adjustment namespace import
  3. use switch statement with direct return
  4. move critical inline css before assets

Manual testing scenarios (*)

  1. 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:
before

After:
after

Resolved issues:

  1. resolves [Issue] Code cleanup and add new critical head block and move critical css before assets #38748: Code cleanup and add new critical head block and move critical css before assets
@m2-assistant
Copy link

m2-assistant bot commented Jun 6, 2022

Hi @in-session. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

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.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 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.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@in-session
Copy link
Contributor Author

@magento give me test instance

@magento-deployment-service
Copy link

Hi @in-session. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @in-session, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@engcom-Hotel engcom-Hotel added the Priority: P3 May be fixed according to the position in the backlog. label Jun 7, 2022
@in-session
Copy link
Contributor Author

@magento give me test instance

@magento-deployment-service
Copy link

Hi @in-session. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @in-session, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@in-session
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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
Copy link
Contributor Author

@magento give me test instance

@magento-deployment-service
Copy link

Hi @in-session. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @in-session, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@in-session
Copy link
Contributor Author

@magento run Functional Tests B2B, Functional Tests EE, Static Tests

@magento-automated-testing
Copy link

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
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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.

@engcom-November
Copy link
Contributor

@magento create issue

@engcom-November
Copy link
Contributor

Hello @in-session,

Thanks for the collaboration & contribution!

✔️ QA Passed

Preconditions:
Enable use_css_critical_path.

Steps to reproduce:

  • Navigate to Home Page
  • Open Inspect, look for criticalCss data-type.

Before: ✖️
image

After: ✔️
image

@engcom-November
Copy link
Contributor

@magento run all tests

@engcom-November
Copy link
Contributor

Since builds are failing moving it to Extended Testing.

@engcom-November
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

@engcom-November
Copy link
Contributor

The repeating failures in Functional tests are flaky, and are known issues.

Functional Tests B2B :
1st Run:
image

2nd Run:
image

Known issues:
ACQE-6523 - AdminReorderWithCatalogPriceRuleDiscountTest

Functional Tests CE :
1st Run:
image

2nd Run:
image

Known issues:
ACQE-6590 - AdminCheckConfigurationForPayPalExpressCheckoutInUnitesStatesTest

Functional Tests EE :
1st Run:
image

2nd Run:
image

Known issues:
ACQE-6523 - AdminReorderWithCatalogPriceRuleDiscountTest
ACQE-6331 - StorefrontCreateOrderAllQuantityGroupedProductOptionDefaultStockTest

Hence moving this issue to Merge in Progress

@in-session
Copy link
Contributor Author

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@hostep
Copy link
Contributor

hostep commented Jul 4, 2024

PR isn't marked as merged (probably because of the additional commits after it got accepted), but seems to be merged in this bigger merge: ada8d1d

@engcom-Charlie
Copy link
Contributor

Hi @hostep,

Thats right, This PR got merge in ada8d1d.

The PR status is Open as few commits are not part of merged PR at the time of acceptance. I will be adding these remaining commits in next Mainline PR till then requesting for not to close it.

Thank you!

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 7167ab9 into magento:2.4-develop Jul 14, 2024
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Area: Perf/Frontend All tickets related with improving frontend performance. Area: Performance Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
9 participants