Skip to content
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

refactor: product selector memoization #528

Merged
merged 28 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7bfe79d
feat(schematics): generate lazy components for shared components in s…
dhhyi Feb 22, 2021
5e0e4c8
refactor: save product links in separate place in store
dhhyi Feb 3, 2021
3ef0331
refactor: collapse mini-basket when routing is started
dhhyi Feb 3, 2021
f5b49e0
refactor: save product parts for bundles and retail sets in separate …
dhhyi Feb 4, 2021
b27eae5
refactor: make product-master-variations component display dependant …
dhhyi Feb 5, 2021
14a72ea
refactor: simplify variation properties on product view
dhhyi Feb 5, 2021
933dd87
refactor: simplify default category property on product view
dhhyi Feb 5, 2021
714d242
refactor: introduce product-name component
dhhyi Feb 3, 2021
91583e5
refactor: make product-image component context aware
dhhyi Feb 4, 2021
32fd768
refactor: provide optional product link in image component
dhhyi Feb 10, 2021
5865619
fix: lazy reference for product links
dhhyi Feb 10, 2021
22956ef
refactor: decide in shopping facade, if product should be reloaded, s…
dhhyi Feb 10, 2021
4825d08
refactor: intruduce component for choosing variation and hold context…
dhhyi Feb 10, 2021
34f01b8
perf: optimized product selector memoization
dhhyi Feb 11, 2021
aa6b3f6
refactor: decide in context if loading details for retail sets is nec…
dhhyi Feb 12, 2021
c9ae2be
perf: prevent loading master product as it is not required for variat…
dhhyi Feb 12, 2021
56925a9
refactor: make product inventory component context-aware
dhhyi Feb 15, 2021
8437b7b
refactor: make product id component context-aware
dhhyi Feb 15, 2021
476a245
refactor: make product rating component context-aware
dhhyi Feb 15, 2021
ed16236
refactor: simplify sku reference for order-template and wishlist in s…
dhhyi Feb 15, 2021
58407f6
refactor: make product price component context-aware
dhhyi Feb 15, 2021
86ba59e
refactor: make product promotion component context-aware
dhhyi Feb 15, 2021
3ca2318
refactor: introduce product brand component on product detail
dhhyi Feb 15, 2021
55fa4b4
refactor: introduce product detail info accordion component
dhhyi Feb 15, 2021
314db78
refactor: decide translation key for add to cart in add to cart button
dhhyi Feb 15, 2021
8837720
fix: prevent flickering of product page when switching to another pro…
dhhyi Feb 16, 2021
51ba25c
refactor: lazy basket-content component
dhhyi Feb 22, 2021
8086db9
Merge branch 'develop' into refactor/product-selector-memoization
dhhyi Feb 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class OrderTemplatesDetailsPage {
get listItemLink() {
return cy
.get('ish-account-order-template-detail-line-item')
.find('a[data-testing-id="order-template-product-link"]');
.find('[data-testing-id="order-template-product"] a[data-testing-id="product-name-link"]');
}

get OrderTemplateTitle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class WishlistsDetailsPage {
}

get listItemLinks() {
return this.listItems.find('a[data-testing-id="wishlist-product-link"]');
return this.listItems.find('[data-testing-id="wishlist-product"] a[data-testing-id="product-name-link"]');
}

get wishlistTitle() {
Expand Down
9 changes: 9 additions & 0 deletions src/app/core/directives/product-context.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export class ProductContextDirective implements OnInit, OnChanges {
this.context.set('sku', () => sku);
}

@Input()
set categoryId(categoryId: string) {
this.context.set('categoryId', () => categoryId);
}

@Input()
set quantity(quantity: number) {
this.context.set('quantity', () => quantity);
Expand All @@ -44,6 +49,10 @@ export class ProductContextDirective implements OnInit, OnChanges {
@Input()
set parts(parts: SkuQuantityType[]) {
this.context.set('parts', () => parts);
this.context.set('displayProperties', () => ({
readOnly: true,
addToBasket: true,
}));
}

@Input()
Expand Down
Loading