-
Notifications
You must be signed in to change notification settings - Fork 202
Enable wishlist functionalities for Einstein recommended products #131
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
Conversation
| productSearchItem={product} | ||
| onClick={() => onProductClick(product)} | ||
| /> | ||
| renderProduct(product) |
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.
it's hard to customize the product tiles in the scroller so this is my attempt to decouple the two components...
feedback is welcomed
| } = props | ||
| const {currency, image, price, productName} = productSearchItem | ||
| const styles = useMultiStyleConfig('ProductTile', {isLoading: isWishlistLoading}) | ||
| const {product, enableFavourite = false, isFavourite, onFavouriteToggle, ...rest} = props |
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'd like to de-couple the concept of wishlist from the components like ProductTile, so they are more re-usable.
i intentionally renamed wishlist related props to "favourite", which i think is more generic. feedback is welcomed
|
Couple of comments on general usability:
|
| return null | ||
| } | ||
|
|
||
| // TODO: DRY the wishlist handlers when intl |
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.
We probably shouldn't knowingly leave todo's in the production code.
bendvc
left a comment
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.
Please remove the "todo" comment and we are good to go.

Description
Note: this work is built on top of the
wishlist_reworkbranch, for easier PR review, the base branch for this PR is temporarily pointing towishlist_rework. (afterwishlist_reworkis merged, this will point back todevelop)Enable wishlist functionalities for Einstein recommended products.
Types of Changes
Changes
wishlisticon tohearticon to better represent the actual svg iconProductTilefromProductScrollerso it's more easier to customize the tiles in the scrollerRecommendedProductscomponent to have wishlist functionalitiesProductTilecomponent, update the API of this component to be clean and easy to use.OLD product tile API:
NEW api:
How to Test-Drive This PR
npm startand go to http://localhost:3000/en-GB/product/25686364MChecklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization