Skip to content
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

Move CES data store to @woocommerce/customer-effort-score #37252

Merged
merged 2 commits into from Mar 16, 2023

Conversation

mattsherman
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR moves the CES data store currently found in woocommerce/admin/client to the @woocommerce/customer-effort-score package. This builds on the work started in #37112.

No functionality should be impacted by this change... this is just a package file refactoring.

Note: There are non-generic bits of functionality in the CES data store (controlling whether specific modals are shown, etc.)... these should be abstracted out in the future to a pattern where @woocommerce/customer-effort-score contains no feature-specific details. For now though, we can live with this.

Closes #37247.

How to test the changes in this Pull Request:

Note: make sure tracking is enabled under WooCommerce > Settings > Advanced > WooCommerce.com

In order for CES snackbars and such to show up, you need to have not already dismissed/completed the CES for a particular feature. To reset things, you can delete the woocommerce_ces_shown_for_actions transient (use the WCA Test Helper).

  1. Load this branch and run pnpm install && pnpm run build and make sure everything builds correctly.

  2. Smoke test WCAdmin pages and make sure that any CES-related functionality works correctly.

    • Import CES snackbar - Go to Products > All Products; click "Import"; without continuing, click back to Products > All Products (see testing instructions on Fixing issue preventing import products CES exit page from firing #36656)
    • Filtering snackbar - Use advanced filter in Analytics > Variations; enter advanced filter criteria and click "Filter"
    • CES footer on new product editor page - make sure "Share feedback" button brings up feedback modal.
  3. Open your console and check if the following exist under window.wc.customerEffortScore (there will be more, these are the new ones added in this PR):

  • STORE_KEY
  • QUEUE_OPTION_NAME

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?
  • Have you included testing instructions?

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.

@mattsherman mattsherman added type: refactor The issue/PR is related to refactoring. focus: product management Related to product creation and editing. labels Mar 15, 2023
@mattsherman mattsherman requested review from a team March 15, 2023 19:27
@mattsherman mattsherman self-assigned this Mar 15, 2023
@github-actions github-actions bot added focus: react admin [team:Ghidorah] package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Mar 15, 2023
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #37252 (63ec710) into trunk (0cf5677) will decrease coverage by 0.0%.
The diff coverage is 26.5%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             trunk   #37252     +/-   ##
==========================================
- Coverage     46.7%    46.7%   -0.0%     
- Complexity   17191    17192      +1     
==========================================
  Files          429      429             
  Lines        64845    64872     +27     
==========================================
+ Hits         30275    30282      +7     
- Misses       34570    34590     +20     
Impacted Files Coverage Δ
plugins/woocommerce/includes/class-wc-ajax.php 4.3% <0.0%> (-<0.1%) ⬇️
...ugins/woocommerce/includes/class-wc-post-types.php 2.7% <0.0%> (-0.1%) ⬇️
...ocommerce/includes/abstracts/abstract-wc-order.php 86.6% <50.0%> (-0.1%) ⬇️
...gins/woocommerce/includes/wc-product-functions.php 44.7% <100.0%> (+1.0%) ⬆️

@mattsherman mattsherman marked this pull request as ready for review March 15, 2023 19:52
@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2023

Test Results Summary

Commit SHA: 6e2ed19

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 48s
E2E Tests189006019519m 8s

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.

Significance: minor
Type: dev

dd CES data store to @woocommerce/customer-effort-score
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing 'a'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Fixed in 6e2ed19

@nathanss nathanss self-requested a review March 16, 2023 13:07
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.

While testing I found this odd behavior with the snackbar in the Analytics page, where I had to scroll all the way down to see it (it wasn't showing in a fixed position). I've seen and reported it before and I think we concluded that it was not our fault. Definitely not related to this PR.

@mattsherman
Copy link
Contributor Author

@nathanss Fixed the typo -- ready for re-review!

While testing I found this odd behavior with the snackbar in the Analytics page, where I had to scroll all the way down to see it (it wasn't showing in a fixed position). I've seen and reported it before and I think we concluded that it was not our fault. Definitely not related to this PR.

Hmm, haven't seen that! Do you know if we have an issue logged for it?

@nathanss nathanss self-requested a review March 16, 2023 14:20
@nathanss
Copy link
Contributor

I think @louwie17 looked into it. Can you remember, Lourens?

@mattsherman mattsherman merged commit 9c5e9b5 into trunk Mar 16, 2023
18 checks passed
@mattsherman mattsherman deleted the update/move-ces-data-store branch March 16, 2023 14:22
@github-actions github-actions bot added this to the 7.6.0 milestone Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: product management Related to product creation and editing. package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score plugin: woocommerce Issues related to the WooCommerce Core plugin. type: refactor The issue/PR is related to refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move CES data store to @woocommerce/customer-effort-score
2 participants