-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Don't load datepicker module until it is actually needed #27860
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
Don't load datepicker module until it is actually needed #27860
Conversation
Hi @krzksz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @krzksz,
Please review failing tests, looks like date format has changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @krzksz,
Functional tests still fails due to incorrect date format, please fix it
@magento give me test instance |
Hi @krzksz. Thank you for your request. I'm working on Magento instance for you |
Hi @krzksz, here is your new Magento instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ approved
Failing functional tests for EE isn’t related to changes from this PR
app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/datepicker.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work! Suggested one additional optimization, but looks great!
@magento create issue |
Hi @krzksz, thank you for your contribution! |
Description (*)
This PR is a part of my effort to improve Magento 2 frontend performance.
Goal here is to eliminate unnecessary loading of datepicker UI component, which is only needed when the shop has date of birth field enabled.
Performance improvement
Tested on Magento 2.4-develop with Luma and sample data.
Manual testing scenarios (*)
jquery/ui-modules/datepicker.js
is not loaded on pages that do not use datepicker (e.g. homepage, category, product etc.).Contribution checklist (*)
Resolved issues: