Skip to content

Conversation

@louwie17
Copy link
Contributor

@louwie17 louwie17 commented Nov 29, 2022

All Submissions:

Changes proposed in this Pull Request:

Add's an exit prompt tracking script to the WooCommerce setting pages that will trigger a CES notice if users exit the setting page while having made changes, without saving them.

Part of #35126 .

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Load this branch, build it, and make sure you have the new-product-management-experience feature flag enabled (you can do so using the latest version of the Beta tester within the mono repo).
  2. Make sure you have tracks enabled and also outputted in the console: localStorage.setItem( 'debug', 'wc-admin:*' );
  3. Go to WooCommerce > Settings and make some changes
  4. Now go to another page like WooCommerce > Home and select Leave when it warns you about unsaved changes.
  5. A notice should show on the new page that allows you to share feedback, something to the affect of ⚙️ Did you find the right setting?
  6. Click the share feedback and submit feedback, notice how the wcadmin_ces_snackbar_view, wcadmin_ces_view, and wcadmin_ces_feedback include the ces_location prop with the outside value.
  7. The Modal description should say something to this effect: We noticed you started changing store settings, then left. How was it? Your feedback will help create a better experience for thousands of merchants like you.
    You may also want to try dismissing the notice and see if the prop has been added to wcadmin_ces_snackbar_dismiss
  8. Now delete the woocommerce_ces_shown_for_actions option and disable tracking under WooCommerce > Settings > Advanced > Woocommerce.com
  9. Make sure the notice doesn't show up for the above anymore and that customer-effort-score-exit-page in local storage does not get updated, but stays empty.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Nov 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 29, 2022

Test Results Summary

Commit SHA: ca490e7

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 55s
E2E Tests187006019314m 46s

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.

@louwie17 louwie17 force-pushed the add/35126_ces_exit_prompt branch from 049815d to a8ee37c Compare December 8, 2022 09:50
@louwie17 louwie17 force-pushed the add/35126_ces_exit_prompt_settings branch 2 times, most recently from d5e0075 to 8779640 Compare December 9, 2022 10:59
@louwie17 louwie17 force-pushed the add/35126_ces_exit_prompt branch from 9ebe306 to 104a1e3 Compare December 12, 2022 10:27
Base automatically changed from add/35126_ces_exit_prompt to trunk December 12, 2022 13:56
@louwie17 louwie17 force-pushed the add/35126_ces_exit_prompt_settings branch from 8779640 to 91fcc50 Compare December 12, 2022 19:07
@louwie17 louwie17 requested a review from a team December 12, 2022 19:28
@louwie17 louwie17 marked this pull request as ready for review December 12, 2022 19:28
@nathanss
Copy link
Contributor

While testing I noticed some behaviors:

  • It seems that it shows at the bottom of the Home page, instead of a fixed position on the screen.
Screen.Recording.2022-12-13.at.10.30.55.mov
  • If I "give up" in the middle of the feedback by clicking Cancel or closing the dialog, there seem to be no tracks event related, it is not logged as dismissed. Is that OK?

@github-actions github-actions bot added the package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score label Dec 14, 2022
@louwie17
Copy link
Contributor Author

louwie17 commented Dec 14, 2022

@nathanss thanks for the review.

  • It seems that it shows at the bottom of the Home page, instead of a fixed position on the screen.

I was not able to reproduce this, and I am not sure if this would be related to this PR as we use the notices for a lot of other things as well. Did you test this in a specific browser? Also maybe check if your build ran fine? It could be that some stylesheets didn't get applied correctly.

  • If I "give up" in the middle of the feedback by clicking Cancel or closing the dialog, there seem to be no tracks event related, it is not logged as dismissed. Is that OK?

In theory it's ok, its been like that as well, but it makes sense for us to add tracks for that as well. So I added a ces_view_dismiss track when the user dismisses the CES modal by clicking cancel.

This should be good for a re-review if you have time.

@louwie17 louwie17 requested a review from nathanss December 14, 2022 11:23
Copy link
Contributor

@nathanss nathanss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great @louwie17, I think I've seen that notice not appearing correctly issue before, so I definitely agree it's not specific to this PR. I hope this doesn't happen in production, as it's almost guaranteed that the user won't see it in that case.

As for the other suggestions, they all look great. I'll approve it! Thanks a lot for implementing the tests.

@louwie17 louwie17 merged commit c7132ec into trunk Dec 14, 2022
@louwie17 louwie17 deleted the add/35126_ces_exit_prompt_settings branch December 14, 2022 14:55
@github-actions github-actions bot added this to the 7.3.0 milestone Dec 14, 2022
samueljseay pushed a commit that referenced this pull request Dec 15, 2022
* Add exit settings page tracker

* Add exception for when user hits the save button

* Update settings and add icon support

* Add changelog

* Add dismiss track for when user dismisses CES modal

* Add changelog

* Add tests for staticFormDataToObject function

* Fix imports of test file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants