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

Merge "feature/product sets" into develop #1019

Merged
merged 12 commits into from
Mar 1, 2023
Merged

Conversation

vmarta
Copy link
Contributor

@vmarta vmarta commented Mar 1, 2023

I have synced up with the latest from develop branch. In addition to waiting for the CI tests to pass, I did some manual testing to go through the happy path.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

vmarta and others added 12 commits January 9, 2023 14:30
* Show product sets on PLP (alongside other products)

For now, the product sets would look the same as any other kinds of products.

* Parse the product type

* Add todo

* Ignore linting of this line for now

* Add "Starting at" label
* Product set: render the children products with minimal UI

* No longer showing breadcrumbs in the child items

* Individual swatches now have correct `value`

There was a subtle bug where the `value` of the SwatchGroup was passed down to override all the values of the children Swatch components.

* 1st attempt at saving swatches state in the page url

* Avoid null in the url search params

* Some refactoring

* Add-to-cart now works for child items

* Show accordion for each child item

* Add todo

* Rename variable for accuracy

The child product itself is actually not a set, but is considered a set product.

* Optional argument

* Some refactoring and fix linting

* Helper hook for url search params

* Clean up

* Rename module for a specific use case (PDP)

* Show/hide add-to-cart buttons accordingly

* Modal shows product set data

* Parent product

* Variant's product image shows up in add-to-cart modal

* Rename variables for clarity

* Fix linting error

* Add horizontal rules to separate the parent and child items

* Tweak whitespace

* Localize the Starting At label

* Add todo
* Starting At label

* 1st attempt at updating wishlist for product sets

* "Select Options" → "View Options"

* Some refactoring

* Render add-all-to-cart button if necessary

* Better way to fetch `setProducts` data

* Switch to zzrf-009 temporarily

* For debugging purpose

I'll revert this commit later

* Simpler requirement

* Update what quantity meant for product set

* Some refactoring

* Add comment

* Add-to-wishlist for the individual child items

* Rename variable

* Update button text on PDP

* Update button text on Wishlist page

* Revert "Switch to zzrf-009 temporarily"

This reverts commit 484c8d8.

* PDP: show wishlist button on mobile

* Fix formatting issues (prettier)

* PR feedback

* Clearer as to which is product or variant

* Make it consistent with addToWishlist signature
* Product sets: basic PLP (#878)

* Variant's product image shows up in add-to-cart modal

* Get modal showing multiple items added to cart

* Add scroll to after validation

Co-authored-by: Vincent Marta <vmarta@salesforce.com>
* verify viewcategory and viewsearch is working

* viewproduct event is sent for every child product

* addtocart event fires for all children when add set to cart

* parent set only sends id
* remove complete the set carousel

* remove complete the set translations

* sticky buttons on mobile view

* fix modal vertical margins on desktop

* move recos to modalbody and cleanup margins

* add dividers between product set items in mobile view

* fix margins so sticky buttons do not overlap with content

* add lazy loading of product set children product images

* remove height - does nothing

* bump build size to 55

* add conditional for complete the set and change loading var name

* lint

* revert translations

* Cleanup

* added to cart modal is scrollable and 90% of viewport

* remove dialogprops

* lint
* Product tile: test product set's price label

* Test product set rendering

* Test callbacks are called properly

* itemAccumulatedCount is redundant

* Test that modal can render multiple products

* Finally the add-to-cart modal shows up in testing

* Clean up

* Test error messages

* Test lazy loading of the child products

* Split a test into smaller ones

* Use `describe` to group all the related tests

* Update comment

* Test the wishlist and its primary action buttons

* Clean up

* Some refactoring

* Some refactoring

* Linting fix

* Update comment

* Test `getDisplayVariationValues`

* Test the usePDPSearchParams

* Tweak another test to pass

Not related to product sets, but needing CI to pass.

* Move mocked data into their own files

* Moving it to within `beforeEach`
@vmarta vmarta marked this pull request as ready for review March 1, 2023 21:51
@vmarta vmarta requested a review from a team as a code owner March 1, 2023 21:51
@vmarta vmarta merged commit 61d0c8a into develop Mar 1, 2023
@vmarta vmarta deleted the feature/product-sets branch March 1, 2023 23:36
@vmarta vmarta mentioned this pull request Mar 1, 2023
12 tasks
bfeister added a commit that referenced this pull request Mar 9, 2023
* develop:
  Allow query hook parameters to be `null`. (#1046)
  Implement `updateCustomerPassword` as no-op. (#1031)
  Update Retail React App Page Designer integration README (#1041)
  BUG: Changed type of the phone number field to bring up numberic keyboard on mobile devices - W-9871940 (#1016)
  Move the MRT reference app to the SDKs, so that we can verify eg. Node support (#966)
  Update `develop` with `release-v2.7.0` (#1033)
  Remove unused dependencies. (#1020)
  Make some style decisions on padding (#1023)
  Update CHANGELOG.md (#1021)
  Support product-sets in retail-react-app (#1019)
  Simplify hooks logic (#959)
  Fix NPM dependencies (#1012)

# Conflicts:
#	lerna.json
#	package-lock.json
#	package.json
#	packages/commerce-sdk-react/CHANGELOG.md
#	packages/commerce-sdk-react/package-lock.json
#	packages/commerce-sdk-react/package.json
#	packages/internal-lib-build/package-lock.json
#	packages/internal-lib-build/package.json
#	packages/pwa-kit-create-app/package-lock.json
#	packages/pwa-kit-create-app/package.json
#	packages/pwa-kit-dev/CHANGELOG.md
#	packages/pwa-kit-dev/package-lock.json
#	packages/pwa-kit-dev/package.json
#	packages/pwa-kit-dev/src/configs/webpack/config.js
#	packages/pwa-kit-dev/src/ssr/server/build-dev-server.js
#	packages/pwa-kit-react-sdk/CHANGELOG.md
#	packages/pwa-kit-react-sdk/package-lock.json
#	packages/pwa-kit-react-sdk/package.json
#	packages/pwa-kit-runtime/CHANGELOG.md
#	packages/pwa-kit-runtime/package-lock.json
#	packages/pwa-kit-runtime/package.json
#	packages/template-express-minimal/package-lock.json
#	packages/template-express-minimal/package.json
#	packages/template-retail-react-app/app/hooks/use-add-to-cart-modal.js
#	packages/template-retail-react-app/app/partials/product-view/index.jsx
#	packages/template-retail-react-app/package-lock.json
#	packages/template-retail-react-app/package.json
#	packages/template-typescript-minimal/package-lock.json
#	packages/template-typescript-minimal/package.json
#	packages/test-commerce-sdk-react/package-lock.json
#	packages/test-commerce-sdk-react/package.json
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.

3 participants