-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/CXSPA-8968
- Loading branch information
Showing
2,610 changed files
with
92,584 additions
and
29,361 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,4 +71,5 @@ Thumbs.db | |
**/git-ignore | ||
|
||
.nx/cache | ||
.nx/workspace-data | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Spartacus migration - Bootstrap | ||
|
||
1. Uninstall Bootstrap | ||
If the bootstrap package is still installed in your project, uninstall it to avoid conflicts. Use | ||
the following command: | ||
```npm uninstall bootstrap``` | ||
2. Update `styles.scss` | ||
Modify the `styles.scss` file to integrate Spartacus styles along with Bootstrap. Proper import order is critical for | ||
styles to be applied correctly. | ||
### Steps to Update: | ||
1. Place the following import for styles-config at the top of the file: | ||
```@import 'styles-config';``` | ||
2. Add Spartacus core styles first. Importing Spartacus styles before Bootstrap ensures core styles load as a | ||
priority. | ||
3. Follow this by importing Bootstrap styles using the Bootstrap copy provided by Spartacus. Ensure the order of | ||
Bootstrap imports matches the sequence below for consistency. | ||
4. Conclude with the Spartacus index styles. | ||
|
||
|
||
Final file structure should look like this: | ||
|
||
```styles.scss | ||
// ORDER IMPORTANT: Spartacus core first | ||
@import '@spartacus/styles/scss/core'; | ||
|
||
// ORDER IMPORTANT: Bootstrap next | ||
@import '@spartacus/styles/vendor/bootstrap/scss/reboot'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/type'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/grid'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/utilities'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/transitions'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/dropdown'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/card'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/nav'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/buttons'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/forms'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/custom-forms'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/modal'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/close'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/alert'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/tooltip'; | ||
|
||
@import '@spartacus/styles/index'; | ||
``` | ||
3. Individual imports. | ||
If your application directly imports specific Bootstrap classes in any of your stylesheets, replace those imports with the corresponding Spartacus imports. For example: | ||
``` | ||
// Original import | ||
@import '~bootstrap/scss/reboot'; | ||
// Replace with | ||
@import '@spartacus/styles/vendor/bootstrap/scss/reboot'; | ||
``` | ||
|
||
4. Some libraries have stopped importing Bootstrap-related styles. Instead, these styles should now be imported directly within the application. For example, the lib-cart.scss file should include the following imports: | ||
```scss | ||
// original imports | ||
@import '../styles-config'; | ||
@import '@spartacus/cart'; | ||
// new imports | ||
@import '@spartacus/styles/vendor/bootstrap/scss/functions'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/variables'; | ||
@import '@spartacus/styles/vendor/bootstrap/scss/_mixins'; | ||
``` | ||
Affected libraries: | ||
- cart | ||
- checkout | ||
- organization | ||
- pick-up-in-store | ||
- product | ||
- product-multi-dimensional | ||
- qualtrics | ||
- quote | ||
- storefinder | ||
- epd-visualization | ||
- opf |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# (EARLY NOTES) Migrating a custom app to use Spartacus with Angular v18 | ||
|
||
Before upgrading Spartacus to the new version with Angular 18, you need to first: | ||
- upgrade to the latest 2211.x of Spartacus | ||
- upgrade Angular to version v18 | ||
|
||
## Update Angular to 17 and 18 | ||
|
||
### Update Angular to 17 and 3rd party deps to be compatible with Angular 18 | ||
|
||
Follow the [Angular guidelines for upgrading from v17 to v18](https://angular.dev/update-guide?v=17.0-18.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 18 (e.g. `@ng-select/ng-select@13`, `@ngrx/store@18`, `ngx-infinite-scroll@18`): | ||
|
||
```bash | ||
ng update @angular/core@18 @angular/cli@18 @ng-select/ng-select@13 @ngrx/store@18 ngx-infinite-scroll@18 --force | ||
git add . | ||
git commit -m "update angular 18 and 3rd party deps angular 18 compatible" | ||
``` | ||
Note: Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already supports it. | ||
|
||
### Run Spartacus update | ||
|
||
After successfully updating the application to Angular 18, execute this command to initiate the Spartacus update process. | ||
|
||
```bash | ||
ng update @spartacus/schematics@latest | ||
``` | ||
|
||
### Adjust Angular configuration | ||
|
||
Due to changes in Angular's application builder, for applications created starting from SPA 2211.19, you need to adjust the `angular.json` file to generate the `index.html` file in the `dist` folder. This is required for CCv2 to map `OCC_BACKEND_BASE_URL_VALUE` and `MEDIA_BACKEND_BASE_URL_VALUE` meta tags to the correct values. Unfortunately, this will contribute to pre-rendering to not work properly (which is a known issue) | ||
|
||
```diff | ||
- "index": "src/index.html" | ||
+ "index": { | ||
+ "input": "src/index.html", | ||
+ "output": "index.html" | ||
+ } | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changes in feature lib order | ||
|
||
## MyAccountV2OrderHistoryService | ||
|
||
Method `getOrderDetails` has been removed. Instead directly use `getOrderDetailsV2`. |
This file contains 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
Oops, something went wrong.