google-listings-and-ads icon indicating copy to clipboard operation
google-listings-and-ads copied to clipboard

Onboarding: Remove Pre-Launch checklist UI

Open joemcgill opened this issue 1 year ago • 2 comments

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.

Image

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 PreLaunchChecklist component 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 PreLaunchChecklist is 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

  1. It looks like these checkboxes do actually trigger an HTTP request to the /wp-json/wc/gla/mc/settings endpoint, which ends up updating the DB option stored in gla_merchant_center but 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?
  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?

joemcgill avatar Aug 05 '24 14:08 joemcgill

1. It looks like these checkboxes do actually trigger an HTTP request to the /wp-json/wc/gla/mc/settings endpoint, which ends up updating the DB option stored in gla_merchant_center but 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..

eason9487 avatar Aug 06 '24 10:08 eason9487

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.

joemcgill avatar Aug 08 '24 18:08 joemcgill

Closing this as completed since it was part of the 2.9 release.

mikkamp avatar Dec 02 '24 15:12 mikkamp