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

Load appropriate slider widget on demand to improve performance #27616

Merged

Conversation

krzksz
Copy link
Contributor

@krzksz krzksz commented Apr 5, 2020

Description (*)

This PR is a part of my effort to improve Magento 2 frontend performance.

Because of the fact that all Knockout bindings are registered on every load, there are many dependencies requested no matter if such binding is even used on the page. Changes in this PR include:

  • Touch slider widget customization is moved to a separate file so it can be loaded only on compatible devices.
  • Appropriate slider widget type is loaded on-demand, only when range binding is actually used on the page.

Manual testing scenarios (*)

  1. Add the range slider widget to the page, e.g. by adding the following HTML to the CMS block:
<div class="timeline-scale"></div>
<div class="data-slider" data-bind="{"range":{
                "value": ko.observable(50),
                "min": 1,
                "max": 100,
                "step": 5
            }}">&nbsp;</div>
</div>
  1. Validate that it works for both mouse and touch.

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)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Load appropriate slider widget on demand to improve performance #28807: Load appropriate slider widget on demand to improve performance

@m2-assistant
Copy link

m2-assistant bot commented Apr 5, 2020

Hi @krzksz. Thank you for your contribution
Here is 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

For more details, please, review the Magento Contributor Guide documentation.

@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Apr 9, 2020
@ihor-sviziev ihor-sviziev self-assigned this Apr 9, 2020
@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ghost ghost moved this from Pending Review to Ready for Testing in Pull Requests Dashboard Apr 9, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7290 has been created to process this Pull Request

@krzksz krzksz added the Area: Perf/Frontend All tickets related with improving frontend performance. label Apr 10, 2020
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-7290 has been created to process this Pull Request

@engcom-Delta engcom-Delta self-assigned this Apr 27, 2020
@engcom-Delta engcom-Delta moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Apr 27, 2020
@engcom-Kilo engcom-Kilo self-assigned this Apr 28, 2020
@engcom-Kilo engcom-Kilo moved this from Extended Testing (optional) to Merge in Progress in Pull Requests Dashboard Apr 28, 2020
@ihor-sviziev ihor-sviziev added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Apr 28, 2020
@slavvka slavvka added this to the 2.4.1 milestone Apr 28, 2020
@slavvka slavvka added Priority: P3 May be fixed according to the position in the backlog. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. and removed Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Apr 28, 2020
@VladimirZaets VladimirZaets added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label May 20, 2020
@VladimirZaets VladimirZaets moved this from Merge in Progress to Extended Testing (optional) in Pull Requests Dashboard May 20, 2020
@engcom-Kilo
Copy link
Contributor

@magento run all tests

@engcom-Delta
Copy link
Contributor

@magento create issue

@engcom-Delta engcom-Delta added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jun 19, 2020
@engcom-Kilo
Copy link
Contributor

@magento run all tests

@engcom-Kilo engcom-Kilo moved this from Extended Testing (optional) to Merge in Progress in Pull Requests Dashboard Jun 22, 2020
@magento-engcom-team magento-engcom-team merged commit dc8449b into magento:2.4-develop Jun 24, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 24, 2020

Hi @krzksz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Area: Lib/Frontend Area: Perf/Frontend All tickets related with improving frontend performance. Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: complex Component: Ui Event: Global-Contribution-Day Partner: creativestyle partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

[Issue] Load appropriate slider widget on demand to improve performance
8 participants