Skip to content

Conversation

@stanlp1
Copy link
Contributor

@stanlp1 stanlp1 commented Apr 10, 2025

Pull Request Checklist

Before you submit a pull request, please make sure you have to following:

  • I have added or updated TypeScript types for my changes, ensuring they are compatible with the existing codebase.
  • I have added JSDoc comments to my TypeScript definitions for improved documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added any necessary documentation (if appropriate).
  • I have made sure my PR is up-to-date with the main branch.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no API changes)
  • Documentation content changes
  • TypeScript type definitions update
  • Other... Please describe:

@stanlp1 stanlp1 requested a review from a team as a code owner April 10, 2025 07:10
src/utils.tsx Outdated
return 'unknown';
}

export function getProductCardCnstrcDataAttributes(item: Item, productInfo: ProductInfoObject) {
Copy link
Contributor

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

Copy link
Contributor Author

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.

29e67ed

Copy link
Contributor

@mocca102 mocca102 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@Mudaafi Mudaafi left a 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.

@stanlp1 stanlp1 force-pushed the ci-4327-os-plp-ui-expose-data-attributes-on-product-card branch from d8e9aaa to 7fb5139 Compare April 17, 2025 19:15
@stanlp1 stanlp1 requested a review from Mudaafi April 17, 2025 19:25
Copy link
Contributor

@Mudaafi Mudaafi left a 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

@Mudaafi Mudaafi merged commit eb2d91a into main Apr 17, 2025
10 of 11 checks passed
@Mudaafi Mudaafi deleted the ci-4327-os-plp-ui-expose-data-attributes-on-product-card branch April 17, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants