-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add product variations list to new product management experience #35889
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
| @@ -0,0 +1,39 @@ | |||
| .woocommerce-product-variations { | |||
| min-height: 300px; | |||
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.
Note that this is temporary and height will be adjusted further in #35789.
| @@ -0,0 +1,49 @@ | |||
| /** | |||
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.
Hopefully this util isn't pushing the scope of this PR too far. Happy to separate it into another PR if it helps.
| }; | ||
| } ); | ||
|
|
||
| if ( ! variations || isLoading ) { |
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.
Note that the current behavior is odd because some products don't have variations. Automatic generation of variations will address this and hopefully guarantee that a variation always exists if any options exist.
Test Results SummaryCommit SHA: 7be839e
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
| * Get the product stock quantity or stock status label. | ||
| * | ||
| * @param product Product instance. | ||
| * @return {PRODUCT_STOCK_STATUS_KEYS} Product staus key. |
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.
Two nitpick things:
- There is a typo in
staus. - Since we can also return a number, I think that this line should be like this:
@return {PRODUCT_STOCK_STATUS_KEYS|number} Product stock quantity or product status key.
octaedro
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.
Good job @joshuatf! This is testing well and the code looks good.
I just left a small comment, and it seems like there are a few small lint errors as well.
octaedro
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.
Nice job @joshuatf! LGTM ![]()
) * Add product variations section * Add variations list * Add util to get product stock status * Add variation specific attribute type * Add currency code to header column * Fix up variations header width * Add variations loading state * Add changelog entries * Convert spaces to tabs * Fix status typo * Fix up return type for stock status
All Submissions:
Changes proposed in this Pull Request:
Adds the variations list to the new product experience.
Note that this PR does not address persistence of ordering for variations or any other updates. Those will be handled in a follow-up.
Closes #35772 .
How to test the changes in this Pull Request:
wp-admin/admin.php?page=wc-admin&path=/product/{product_id}Other information:
pnpm --filter=<project> changelog add?FOR PR REVIEWER ONLY: