Skip to content

Conversation

@chihsuan
Copy link
Member

@chihsuan chihsuan commented Apr 27, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes #32634.

Implement experimental product page with two layouts:

Stack layout:

Screen Shot 2022-04-27 at 16 56 57

Card layout:

Screen Shot 2022-04-27 at 16 57 22

How to test the changes in this Pull Request:

  1. Use a fresh site
  2. Open the plugins/woocommerce/client/admin/config/development.json and change experimental-products-task to true
  3. Run pnpm nx dev woocommerce-admin
  4. Skip OBW
  5. Go to Woocommerce > Home
  6. Click "Add my products" task
  7. Observe that "Physical product, Variable product, Grouped product" are shown by default. The other ones are collapsed.
  8. Go to OBW
  9. Select "Physical products" in the product types step
  10. Go to Woocommerce > Home
  11. Click "Add my products" task
  12. Observe that "Physical product, Variable product, Grouped product" are shown.
  13. Click "View more product types" button.
  14. Should display all product type
  15. Repeat 9~12 with other configurations below

The visible product types depend on what the user declared during the signup (step 3 - Product types - What type of products will be listed?). The other ones are collapsed.

Selected (signup): Physical products
Surfaced (add product page): Physical product, Variable product, Grouped product

Selected (signup): Physical products, Subscriptions
Surfaced (add product page): Physical product, Subscription product

Selected (signup): Physical products, Downloads
Surfaced (add product page): Physical product, Digital product

Selected (signup): Physical products, Downloads, Subscriptions
Surfaced (add product page): Physical product, Digital product, Subscription product

Selected: Downloads
Surfaced: Digital product

Selected: Downloads, Subscriptions
Surfaced: Digital product, Subscription product

Selected: Subscriptions
Surfaced: Subscription product

Card Layout

  1. Change SHOW_STACK_LAYOUT to false in this line.
  2. Run pnpm nx dev woocommerce-admin
  3. Go to "Add my products" task
  4. Observe that page shows the product types in card layout.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file by running pnpm nx affected --target=changelog?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Apr 27, 2022
@chihsuan chihsuan changed the title Add experimental product task Add experimental add product for task list Apr 27, 2022
@chihsuan chihsuan force-pushed the add/32634-add-products-task branch 3 times, most recently from b337ba1 to 4936526 Compare April 27, 2022 10:36
@chihsuan chihsuan changed the base branch from trunk to add/product-stack April 27, 2022 10:41
@chihsuan chihsuan force-pushed the add/32634-add-products-task branch from 4936526 to 3d80640 Compare April 27, 2022 10:42
@chihsuan chihsuan marked this pull request as ready for review April 27, 2022 10:48
@chihsuan chihsuan requested a review from a team April 27, 2022 10:48
@chihsuan chihsuan force-pushed the add/32634-add-products-task branch from 9b233fa to 06b031f Compare April 27, 2022 11:03
@chihsuan chihsuan self-assigned this Apr 28, 2022
Base automatically changed from add/product-stack to trunk April 28, 2022 01:47
@chihsuan chihsuan force-pushed the add/32634-add-products-task branch 3 times, most recently from 396b863 to 1d0689b Compare April 28, 2022 10:11
moon0326
moon0326 previously approved these changes Apr 28, 2022
Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

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

Fantastic work @chihsuan

One of the tests is failing. I think there is an issue with Extension type definition.

I've opened a PR to fix it.

LGTM and tested well 🚀

Pre-approving.

@chihsuan chihsuan force-pushed the add/32634-add-products-task branch from 1663360 to 345a2ed Compare April 29, 2022 02:47
Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@chihsuan chihsuan merged commit 60334e3 into trunk Apr 29, 2022
@chihsuan chihsuan deleted the add/32634-add-products-task branch April 29, 2022 03:35
@github-actions github-actions bot added this to the 6.6.0 milestone Apr 29, 2022
@github-actions
Copy link
Contributor

Hi @chihsuan, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task List: Add Products Task - Add products

3 participants