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
Show spotlight when switching to variable product type #37413
Conversation
Hi , @woocommerce/mothra-enhancements 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: |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## trunk #37413 +/- ##
==========================================
- Coverage 45.7% 45.7% -0.0%
- Complexity 17197 17199 +2
==========================================
Files 429 429
Lines 64918 64923 +5
==========================================
+ Hits 29696 29698 +2
- Misses 35222 35225 +3
|
Test Results SummaryCommit SHA: e2e2875
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. |
plugins/woocommerce-admin/client/guided-tours/variable-product-tour/index.tsx
Outdated
Show resolved
Hide resolved
plugins/woocommerce-admin/client/guided-tours/variable-product-tour/index.tsx
Outdated
Show resolved
Hide resolved
plugins/woocommerce/tests/e2e-pw/tests/merchant/create-variable-product.spec.js
Show resolved
Hide resolved
plugins/woocommerce-admin/client/guided-tours/variable-product-tour/index.tsx
Show resolved
Hide resolved
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 @mattsherman! This is testing well here and the code looks good. I only left a couple of small questions.
d70e0e3
to
2810207
Compare
Removed the step Tracks events. Ready for a re-review, @octaedro ! |
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.
Thank you @mattsherman for addressing the changes! LGTM 🚀
@mattsherman I saw the tests were failing. Do you know why that was happening? |
* Show variable product tour * Only show tour when product type is changed to variable * Only show tour if it hasn't been shown before * Add variable_product_tour_shown to UserPreferences type * Store whether tour has been shown in user preferences * Record Tracks events * Add docblock for woocommerce_admin_get_user_data_fields filter * Add test for tour
All Submissions:
Changes proposed in this Pull Request:
This PR introduces a single step tour (spotlight) when switching to the variable product type.
This only shows a single time for each user (unless the user never interacts with it, in which case it will be shown again). This is stored in the
woocommerce_admin_variable_product_tour_shown
user preference (wp_usermeta
table).Tracks events are recorded for the tour:
wcadmin_variable_product_tour_started
wcadmin_variable_product_tour_step_viewed
wcadmin_variable_product_tour_completed
Each has a single
step
prop that is set toattributes
. The Tracks events are recorded this way to allow for additional steps to be added in the future and be automatically recorded.Closes #37149.
How to test the changes in this Pull Request:
Other information:
pnpm --filter=<project> changelog add
?FOR PR REVIEWER ONLY: