fix: Load control & dialog assets with cart.js - #29625
Merged
Merged
Conversation
Previously, control & dialog assets were getting loaded only on visiting "/cart", but since cart.js sets up various events on homepage, dialog related assets are required up-front.
Contributor
|
@surajshetty3416 I think cart.js should not be in the bundle, I must have absent mindedly put that in. Its js for |
- Due to it being in the bundle, controls bundle was required for Dialogs used in cart - But this is exclusively used in `cart.html` - It has no reason to load and break the login page - Moved it back to where the html is, it is now back to being tightly coupled with its html
Contributor
marination
marked this pull request as ready for review
February 3, 2022 16:24
marination
requested review from
marination and
nextchamp-saqib
as code owners
February 3, 2022 16:24
marination
approved these changes
Feb 3, 2022
Contributor
|
@Mergifyio backport version-14-beta-pre-release |
Contributor
✅ Backports have been createdDetails
|
marination
added a commit
that referenced
this pull request
Feb 3, 2022
…release/pr-29625 fix: Load control & dialog assets with `cart.js` (backport #29625)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Previously, control & dialog assets were getting loaded only on visiting "/cart", but since cart.js sets up various events on the homepage, dialog-related assets are required up-front.
fixes frappe/frappe#15869

The issue was introduced via #27923
Final Fix:
Issue:
cart.jswas added to the erpnext-web bundle, so it loaded on every single pagecart.htmlforcart.html, not a generic utility file unlike the others.Fix:
cart.jsto /templates/pages withcart.html. They are tightly bound and exclusive to eachother