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
Allow extensions in Add Products task #44892
Conversation
Test Results SummaryCommit SHA: e3a911e
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. |
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.
Looks good to me, @dakota! Let's polish it so @ilyasfoo can take a final look as well before I approve. Also left a minor comment.
The only thing that stands out to me is that this filter will allow complete replacements of that list; which can be a nice-to-have feature for heavily customized stores.
@@ -0,0 +1,25 @@ | |||
/** |
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.
Is this file needed?
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.
It is not. It was created by @ilyasfoo as part of the initial POC code. I thought of leaving it in as a example, but can remove it.
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.
Hey, @dakota! I'd recommend removing this file for review.
For a more realistic testing, appreciate if you could provide the GC plugin build that utilizes the filter. Thanks!
Hi @xristos3490, @ilyasfoo, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
@xristos3490 - I've made a change to prevent replacing the list as per the project requirements. |
@ilyasfoo @xristos3490 I believe this PR is now ready for CR and testing |
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.
Testing well! However, I have few comments:
plugins/woocommerce-admin/client/task-lists/fills/products/constants.tsx
Outdated
Show resolved
Hide resolved
plugins/woocommerce-admin/client/task-lists/fills/products/constants.tsx
Outdated
Show resolved
Hide resolved
plugins/woocommerce-admin/client/task-lists/fills/products/utils.tsx
Outdated
Show resolved
Hide resolved
plugins/woocommerce-admin/client/task-lists/fills/products/utils.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
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.
@dakota LGTM but please remember to update the filter name in GC plugin!
* Add POC for tasklist product types extensibility * Replace create product with custom onClick when it exists * Don't include dummy plugin * Remove dummy file * Cleanup product type filter for tasklist * Create unit test for product type filter * Added changelog * Move changelog file * Is Enhancement * Add changefile(s) from automation for the following project(s): woocommerce * Delete plugins/woocommerce/changelog/extend-product-task * Fix lint errors * Apply suggestions from code review Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> * CR responses --------- Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com> Co-authored-by: github-actions <github-actions@github.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
As part of the project to allow canonical WooCommerce extensions to surface themselves as part of the WooCommerce onboarding tasklist. This PR adds a filter to allow for such extensions to add themselves to the task-list.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
/wp-admin/admin.php?page=wc-admin&task=products
) you should see "Gift Card" as an option at the end of the list (hidden under the "view more" link)Changelog entry
Significance
Type
Message
Add support for extending product types on onboarding task list
Comment