Skip to content

Conversation

in-session
Copy link
Contributor

@in-session in-session commented Nov 15, 2021

I don't see the need to use a script for the rating here I think with inline style that should be enough. This optimization avoids loading and executing JavaScript, which can result in faster page load time. In addition, the code is simplified and more readable because the CSS styles are specified directly in the HTML markup.

Ashampoo_Snap_Montag, 15 November 2021_21h08m18s_001_

On women/tops-women/jackets-women.html removes 12 script tags

Before:
before
before2

After:
after
after2

Resolved issues:

  1. resolves [Issue] Remove unnecessary scripts review summary #37776: Remove unnecessary scripts review summary
@m2-assistant
Copy link

m2-assistant bot commented Nov 15, 2021

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.

🎥 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

@in-session in-session changed the title Remove unnecessary scripts Remove unnecessary scripts review summary Nov 15, 2021
@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.

@mrtuvn
Copy link
Contributor

mrtuvn commented Nov 15, 2021

reason because it's rely on id . I think that why reason author use that approach
d2745c5#diff-b2e9bb45b6102e1c93288b1f9b3a7e3a0a1c0da52296a441c0b805e32b0e8a58

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

@ihor-sviziev
Copy link
Contributor

@sidolov, could you provide some info on why this block was added in MC-29420: Remove event handlers from CE 70ede03?

@sidolov
Copy link
Contributor

sidolov commented Nov 18, 2021

Hi @ihor-sviziev , it was done in the scope of the story: "Move inline event handlers, styles to dedicated tags in phtml templates"

@ihor-sviziev
Copy link
Contributor

@in-session
Copy link
Contributor Author

in-session commented Nov 18, 2021

Hi @ihor-sviziev @sidolov

Sorry, I don't quite get it yet :-)

Due to the changes in the files, a script is no longer needed to display the rating summary stars.
Or does the problem only relate to the view.phtml?

@ihor-sviziev
Copy link
Contributor

@in-session ifi got it correctly, the CSP rules in Magento disallows using inline styles, that's why it was added

@sidolov sidolov added the Priority: P3 May be fixed according to the position in the backlog. label Nov 18, 2021
@andrewbess andrewbess self-assigned this Nov 18, 2021
Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @in-session
Thank you for your contribution.
Could you please fix static tests
Thank you in advance.

@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 message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Lima
Copy link
Contributor

@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 message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Lima
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

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

@engcom-Lima
Copy link
Contributor

@magento give me test instance

@magento-deployment-service
Copy link

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

@engcom-Lima
Copy link
Contributor

engcom-Lima commented Jul 20, 2023

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop and PHP 8.1

Manual testing scenario:

  1. Disable the FPC in the backend and reload the category page.
  2. Verify whether the script got removed or not.

Before: ✖️
Screenshot 2023-07-20 at 5 43 59 PM

Screenshot 2023-07-20 at 5 41 38 PM Screenshot 2023-07-20 at 5 53 46 PM

After: ✔️

Screenshot 2023-07-20 at 5 44 30 PM Screenshot 2023-07-20 at 5 50 43 PM Screenshot 2023-07-20 at 5 51 58 PM

Additionally tested:
Verified the performance of page loading.

No additional manual test cases are required as part of regression as this PR is related to performance improvement.

Builds are failed. Hence, moving this PR to Extended Testing.

@engcom-Lima
Copy link
Contributor

@magento create issue

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests CE, Integration Tests, Static Tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Static Tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@Priyakshic Priyakshic added the Project: Community Picked PRs upvoted by the community label Oct 15, 2024
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 015206d into magento:2.4-develop Oct 18, 2024
10 of 12 checks passed
@in-session in-session deleted the patch-12 branch October 28, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels