-
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
Load color picker dependencies only when it is actually used #28400
Conversation
Hi @krzksz. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
@magento run all tests |
@magento run all tests |
@magento run Static Tests,Unit Tests |
@magento run Static Tests,Unit Tests |
@magento run all tests |
@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. |
Hi @krzksz Thank you for your contribution! I am looking into the build failure. Thank you! |
@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. |
Currently not looking into this PR as I am in between some other priority tasks. Will resume work on this once done with current work. |
@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 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 all tests |
@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. |
1 similar comment
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 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 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. |
As the build failure is showing errors in few outdated files after merging latest code too, closing this PR. All the code committed in this PR is covered in #34142 PR. Thank you! |
Description (*)
This is just another performance PR, which focuses on loading only the needed dependencies. This time I am optimizing color picker component and its
spectrum
andtinycolor
dependencies.Loading mentioned modules dynamically saves us 2 JavaScript requests and 123,6kB (28,3kB gzipped) from downloading and parsing.
This change is covered by unit tests that had to be adjusted to take asynchronous dependencies loading into account.
Manual testing scenarios (*)
spectrum.js
andtinycolor.js
are no longer loaded by default.Questions or comments
While making sure this change doesn't break anything I found out that
colorPicker
binding is not used anywhere in Magento. The easiest way to get it is to for example add it toapp/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml
:and test it in category edit form.
Contribution checklist (*)
Resolved issues:
Related Pull Requests
https://github.com/magento-commerce/magento2-page-builder/pull/76