google-listings-and-ads
google-listings-and-ads copied to clipboard
Onboarding: Remove Pre-Launch checklist UI
Part of https://github.com/woocommerce/google-listings-and-ads/issues/2458
The 3rd step of the onboarding process includes this pre-launch check list at the bottom of the screen.
This checklist doesn't really add value to the user experience and can lead to someone either abandoning the onboarding process or just checking everything in order to move on. Let's remove this section to streamline the onboarding experience.
Acceptance Criteria
- [ ] On the 3rd step of onboarding, "Confirm store requirements", the pre-launch section is no longer shown
- [ ] The
PreLaunchChecklistcomponent is removed from the codebase (js/src/setup-mc/setup-stepper/store-requirements/pre-launch-checklist/index.js) - [ ] Options related to the pre launch checklist should no longer be updated during this onboarding step once the
PreLaunchChecklistis removed.
Implementation Brief
The PreLaunchChecklist component is defined in js/src/setup-mc/setup-stepper/store-requirements/pre-launch-checklist/index.js and imported into the StoreRequirements page in js/src/setup-mc/setup-stepper/store-requirements/index.js. We can likely just remove the PreLaunchChecklist component from the the StoreRequirements page and delete the file where it's defined, since it doesn't seem to be used anywhere else. This useEffect() hook (link) that updates the saved settings based on policyCheckData can also be removed.
Test Coverage
- Update E2E tests in tests/e2e/specs/setup-mc/step-3-confirm-store-requirements.test.js to remove tests related to the Pre-Launch Checklist.
Definition Questions
- It looks like these checkboxes do actually trigger an HTTP request to the
/wp-json/wc/gla/mc/settingsendpoint, which ends up updating the DB option stored ingla_merchant_centerbut these values don't persist when the page is reloaded. Is there any other JS code that needs to be cleaned up when this is removed so the onboarding process doesn't affect the stored DB values if previously set? - The JEST tests for the pre-launch-checker would be removed. Are there other JEST tests or storybook snapshots that we need to plan to update?
1. It looks like these checkboxes do actually trigger an HTTP request to the
/wp-json/wc/gla/mc/settingsendpoint, which ends up updating the DB option stored ingla_merchant_centerbut these values don't persist when the page is reloaded. Is there any other JS code that needs to be cleaned up when this is removed so the onboarding process doesn't affect the stored DB values if previously set?
Perhaps the JS codes related to the usePolicyCheck hook could be removed as well. For example, this code will no longer override the gla_merchant_center WP option.
https://github.com/woocommerce/google-listings-and-ads/blob/a8e9cac5cace2cb24efb076427308d1b16ce69cf/js/src/setup-mc/setup-stepper/store-requirements/index.js#L82-L121
2. The JEST tests for the pre-launch-checker would be removed. Are there other JEST tests or storybook snapshots that we need to plan to update?
I think there are no other jest tests that need to be update, and this should be clear when running jest tests after removal..
Perhaps the JS codes related to the usePolicyCheck hook could be removed as well. For example, this code will no longer override the gla_merchant_center WP option.
Thanks @eason9487, makes sense to me.
Closing this as completed since it was part of the 2.9 release.