-
Notifications
You must be signed in to change notification settings - Fork 2
[CI-4327] Add cnstrc data attributes to Product Card #146
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
[CI-4327] Add cnstrc data attributes to Product Card #146
Conversation
src/utils.tsx
Outdated
| return 'unknown'; | ||
| } | ||
|
|
||
| export function getProductCardCnstrcDataAttributes(item: Item, productInfo: ProductInfoObject) { |
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.
Can we consolidate both parameters into one object instead
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 added itemId as a return to productInfo instead. I feel like it makes sense to return it there too.
mocca102
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.
LGTM!
Mudaafi
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.
Would it make sense to write a simple test for getProductCardCnstrcDataAttributes as well? It's reliant on the type ProductInfoObject, so it'd be nice to know this method stops working if we change that type in the future but our check-types might catch it regardless.
d8e9aaa to
7fb5139
Compare
Mudaafi
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.
lgtm, thanks for making the changes
Pull Request Checklist
Before you submit a pull request, please make sure you have to following:
PR Type
What kind of change does this PR introduce?