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

Show feedback footer on product editor page #38599

Merged
merged 34 commits into from Jun 9, 2023

Conversation

mattsherman
Copy link
Contributor

@mattsherman mattsherman commented Jun 3, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #38519.

No footer (ignore section backgrounds; see #38607)

Screenshot 2023-06-05 at 19 35 07

Footer

Screenshot 2023-06-05 at 19 37 06

Footer with overlapping transient notice (to be addressed outside of this PR)

Screenshot 2023-06-05 at 19 36 54

How to test the changes in this Pull Request:

Note: To reset the state of the system so that the feedback footer will be shown, delete the following options:

  • woocommerce_product_editor_show_feedback_bar
  • woocommerce_ces_shown_for_actions
  1. Enable experimental "new product editor" (beta) in WooCommerce > Settings > Advanced > Features
  2. Go to Products > Add New
  3. Verify no feedback footer is shown.
  4. Fill out some fields and save draft (or publish).
  5. Verify feedback footer is shown.
  6. Refresh the page.
  7. Verify feedback footer is still shown.

Note: For the following, you will want to reset the state of the system between verifications to get the feedback footer to show (see above).

  1. Verify that if the "X" button is clicked:
    • the feedback footer is hidden permanently
    • the wcadmin_product_editor_feedback_bar_dismiss_click Tracks event is logged
  2. Verify that if the "Share feedback" link is clicked:
  3. Verify that if the "turn if off" link is clicked:

@mattsherman mattsherman self-assigned this Jun 3, 2023
@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jun 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

Test Results Summary

Commit SHA: 4d218c6

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 51s
E2E Tests1950010020519m 14s

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.

@github-actions github-actions bot added the package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score label Jun 5, 2023
@mattsherman mattsherman marked this pull request as ready for review June 5, 2023 23:55
@mattsherman mattsherman requested a review from a team June 5, 2023 23:55
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Hi , @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@mattsherman mattsherman changed the title Add/product editor feedback footer Show feedback footer on product editor page Jun 5, 2023
Copy link
Contributor

@joshuatf joshuatf left a comment

Choose a reason for hiding this comment

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

Really like the use of the new hook!

Left a few comments, mostly opinionated nitpicks around naming.

>
<WooFooterItem.Slot name="product" />

<FeedbackBar product={ product } />
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional, but it might be nice to move the FeedbackBar and ProductMVPFeedbackModalContainer to a fill for WooFooterItem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FeedbackBar actually already is a fill. It feels odd to include it here, but seemed like the most natural place to do so. Any suggestions?

@mattsherman
Copy link
Contributor Author

Ready for another round of review, @joshuatf, assuming the checks pass. 🤞

@mattsherman mattsherman added focus: product Issues related to product or product page. focus: product management Related to product creation and editing. focus: new product ux revamped product management experience labels Jun 8, 2023
Copy link
Contributor

@joshuatf joshuatf left a comment

Choose a reason for hiding this comment

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

Love the refactor! Really nice work, @mattsherman.

I left a couple thoughts, but those don't need to be addressed in this PR. Just one comment about using the window tracking flag to avoid fetching.

Otherwise this PR is testing perfectly and ready to go after rebase.

};

const onShareFeedbackClick = () => {
recordEvent( 'product_editor_feedback_bar_share_feedback_click', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not something we need to do in this PR, but just thinking out loud about a helper util in the future: something like recordProductEditorEvent( eventName ) might be nice that handles prefixing with product_editor_ and adding in entity props such as the product_type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the idea of auto-adding entity props.

I'm not sure about prefixing the Tracks event name... doing dynamic generation of event page makes it harder to find events in code when searching. But, I'm not totally opposed to it.

PRODUCT_EDITOR_SHOW_FEEDBACK_BAR_OPTION_NAME
) as string;

const allowTrackingOption =
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I missed this on the first pass, but we have window.wcTracks.isEnabled on the window that we can grab instead of fetching the option.

Same comment for areas getting the tracking option below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, cool.... I'll make that change. So, in general, should we never have to get the tracking option client-side by fetching it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Exactly. The only case where it could become out of sync is when it gets enabled client-side without a refresh, but that won't happen if anyone doing this is hitting the correct tracks API (window.wcTracks.enable) to enable this:

@mattsherman mattsherman force-pushed the add/product-editor-feedback-footer branch from a7c6633 to 4d218c6 Compare June 8, 2023 20:10
@mattsherman
Copy link
Contributor Author

@joshuatf Rebased and updated to use window.wcTracks.isEnabled. Ready for a re-review... hopefully all checks pass! 🤞

Copy link
Contributor

@joshuatf joshuatf left a comment

Choose a reason for hiding this comment

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

Tested with and without tracks enabled and still working as expected! Thanks for all the effor on this feature, Matt!

LGTM 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: new product ux revamped product management experience focus: product management Related to product creation and editing. focus: product Issues related to product or product page. 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.

Product Editor Onboarding: Show feedback bar in footer
2 participants