-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Update toolbar.js #25934 #26097
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
Update toolbar.js #25934 #26097
Conversation
Hi @Nagamaiah007. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
this._bind($(this.options.modeControl), this.options.mode, this.options.modeDefault); | ||
this._bind($(this.options.directionControl), this.options.direction, this.options.directionDefault); | ||
this._bind($(this.options.orderControl), this.options.order, this.options.orderDefault); | ||
this._bind($(this.options.limitControl), this.options.limit, this.options.limitDefault); | ||
window.isToolbarLoaded = true; |
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.
Storing this in a global variable is not needed, you can move it to a local variable above widget declaration.
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.
I tried this (this.options.isToolbarLoaded) earlier it is not working as expected so, had to use it as a global variable.
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.
I mean adding var isToolbarLoaded
at line 11 instead: https://github.com/magento/magento2/pull/26097/files#diff-1364732a1dafeccded6675a06411dbdbR11
I also think that changing the wording to isTollbarInitialized
would be more informative.
this._bind($(this.options.modeControl), this.options.mode, this.options.modeDefault); | ||
this._bind($(this.options.directionControl), this.options.direction, this.options.directionDefault); | ||
this._bind($(this.options.orderControl), this.options.order, this.options.orderDefault); | ||
this._bind($(this.options.limitControl), this.options.limit, this.options.limitDefault); | ||
window.isToolbarLoaded = true; |
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.
I mean adding var isToolbarLoaded
at line 11 instead: https://github.com/magento/magento2/pull/26097/files#diff-1364732a1dafeccded6675a06411dbdbR11
I also think that changing the wording to isTollbarInitialized
would be more informative.
@magento run all tests |
Hi @ptylek, thank you for the review.
|
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 @Nagamaiah007 .
Due to Magento Definition of Done all code must be covered by tests. Please cover your fix by jasmine test.
Thanks!
Pull Request state was updated. Re-review required.
@magento run Database Compare |
@magento run all tests |
@Nagamaiah007, I am closing this PR now due to inactivity. |
Hi @Nagamaiah007, thank you for your contribution! |
Description (*)
Fixed Issues (if relevant)
Manual testing scenarios (*)
(for verify put any log in to catalog->product->list controller).
Questions or comments
Contribution checklist (*)