-
Notifications
You must be signed in to change notification settings - Fork 394
feat: Epic/saved carts #11358
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
feat: Epic/saved carts #11358
Conversation
* Create base feature-lib for cart (GH-11061) * base cart lib - now for multicart * made cart have multi entrypoint for saved cart package * yarn config:update + change files and exposed the the basic necessities * hook it to the config shell app * updated root module with multiple cms components to trigger the feature-lib * added the routes so that no conflicts in future * push empty folder for Michal so that he can place his part in there instead * remove unncessary module for saved cart occ module * additional config * add the filter in test.ts in cart feature-lib * adding cart to build:libs script and removing top level re-export of carts
* feat: Saved carts list page UI #9194 * fixed ui to work with core form 9193 * feat: Load saved carts store and facade (GH-9193) * everything in the cart state instead of a global state * added logilogic for restore * added the github action * refactored load / restore logic * ran the config:update script * uncomment michal's styling * introduced list in multicart * constructor requirement from restore success as it is for changing the flag * loardcartsuccess instead of reloading the cart * removed unun-ncessary files/folders Co-authored-by: Michal Dydo <mdydo@divante.pl>
…vironment.ts for ootb dev3
… for other component unit tests to pass (#11415) * Fix other broken unit tests for saved carts lib * Unit tests for add to save cart component * fixed Michal's PR Co-authored-by: Brian Gamboc-Javiniar <brian_javiniar@hotmail.com>
This reverts commit 2888b11.
* chore: support events by updating saved cart actions * fix the undefined description to use default backend response
…o eslint (GH-11327) * Unit tests for details page + exposing components/services * restore save cart change in order to use default name value when empty string is passed * fix directionality issue with border-right * removed unused styling * update to eslint * prettier + version update to libs * removed a 'it' duplication unit test
…ion.ts Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
…er.ts Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
…er.ts Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
…er.ts Co-authored-by: Marcin Lasak <lasakmarcin90@gmail.com>
Hosting service deployment❗ Spartacus deployment failed ( ERR Failed to execute command [application deploy] due to: Error: Deploy ). Check job logs for details.) |
Public API changes
|
return this.translation.translate('savedCartDetails.cartName').pipe( | ||
filter(() => Boolean(cartName)), | ||
map((textTitle) => ({ | ||
title: textTitle, | ||
text: [cartName], | ||
})) | ||
); |
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.
Generally we should prefer using cxTranslate
pipe in the template pipe over the TranslationService
in the TS logic (unless TranslationService
is justified).
The disadvantages of using TranslationService
are:
- it introduces an unnecessary dependency in the component TS class
- it likely introduces unnecessary methods and RxJs logic to the TS class, which could be avoided
In this particular example we could have in the template:
<cx-card [content]="{
title: 'savedCartDetails.cartName' | cxTranslate
text: [cart?.name],
}"></cx-card>
closes GH-11062
Master ticket: #11062
testing use cases were done from here #11518
NOTE