woocommerce / google-listings-and-ads

Sync your store with Google to list products for free, run paid ads, and track performance straight from your store dashboard.
https://woo.com/products/google-listings-and-ads/
GNU General Public License v3.0
45 stars 21 forks source link

Onboarding: Remove Pre-Launch checklist UI #2492

Open joemcgill opened 1 month ago

joemcgill commented 1 month ago

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

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

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?
eason9487 commented 1 month ago

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..

joemcgill commented 1 month ago

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.