Skip to content

Conversation

@louwie17
Copy link
Contributor

@louwie17 louwie17 commented Nov 21, 2022

All Submissions:

Changes proposed in this Pull Request:

Add's a CES bar to the footer of the Product MVP page when a user saves or publishes a product for the first time.

Closes #35129

Kapture.2022-11-21.at.11.23.33.mp4
  • 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 Products > Add New (MVP)
  4. Add a name and click Save draft
  5. A bar in the footer should show up saying: You're using the new product editor (currently in development). How is your experience so far? and give the option to share feedback
  6. Refresh the page, the bar should show up again after the product has been loaded.
  7. When clicking share feedback the CES modal should show up. You can fill it out and click Send
  8. This should trigger a track event with new_product action and the score.
  9. The bar should stay put after submitting feedback
  10. Now click Publish and enter feedback again, this should trigger the new_product action once finished.
  11. The feedback footer should still show up after, even after refresh.
  12. Now click the x or Turn it off on the notice, the notice should not show up there after, also on refresh.

If you wanted to re-test you can delete the woocommerce_ces_product_mvp_ces_action option.

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 21, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 2022

Test Results Summary

Commit SHA: 61989a6

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202611m 6s
E2E Tests186006019211m 12s

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/35129_product_mvp_ces branch from ea4b177 to 5c85b41 Compare November 22, 2022 14:44
import './footer.scss';
import { WC_FOOTER_SLOT_NAME, WooFooterItem } from './utils';

export const Footer: React.FC = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A simple Footer component with a SlotFill, this allows us to easily fill it with the CES footer and correctly use the full width.

Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@louwie17 louwie17 marked this pull request as ready for review November 22, 2022 14:50
@louwie17 louwie17 requested a review from a team November 22, 2022 14:50
@louwie17 louwie17 force-pushed the add/35129_product_mvp_ces branch 2 times, most recently from 203b845 to be6f3fc Compare November 23, 2022 15:48
@joelclimbsthings joelclimbsthings requested review from joelclimbsthings and removed request for a team November 23, 2022 22:33

export const WC_FOOTER_SLOT_NAME = 'woocommerce_footer_item';
/**
* Create a Fill for extensions to add items to the WooCommerce Admin header.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo here:

Suggested change
* Create a Fill for extensions to add items to the WooCommerce Admin header.
* Create a Fill for extensions to add items to the WooCommerce Admin footer.

cesShownForActions,
resolving: isLoading,
} = useSelect( ( select ) => {
const { getOption, isResolving } = select( OPTIONS_STORE_NAME );
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note here that isResolving will actually be false before it's true, which can cause some erratic behavior. I think it's more reliable to use hasFinishedResolution if that can serve your use case.

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

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

Nice work @louwie17 ! Made a couple minor comments.

I also noticed that the display breaks around a viewport width of ~1050px, which seems a bit fragile even if we're not putting attention towards mobile on this screen so far.

image

Once we do support mobile this will be additional technical debt, so perhaps it's worth trying to accommodate it here in some fashion? @jarekmorawski

Also, not at all required but I wonder if there is an argument for adding the UI layer of this component to the customer-effort-score package?

@louwie17 louwie17 force-pushed the add/35129_product_mvp_ces branch from be6f3fc to 3952fbc Compare November 24, 2022 08:49
@louwie17
Copy link
Contributor Author

Thanks for the review @joelclimbsthings, I addressed your feedback and fixed the styling around the viewport.

Also, not at all required but I wonder if there is an argument for adding the UI layer of this component to the customer-effort-score package?

Yeah potentially, given this is mostly geared towards the Product MVP, I don't think it be useful for users to re-use this, unless they wanted to gather feedback and have access to our tracks :)

The one potential item that probably should be moved is the Footer Slot fill, we did have to move that along with the header slot fill. Given the header hasn't moved yet, I will leave that until we move both, maybe when we implement extensibility.

@louwie17 louwie17 self-assigned this Nov 29, 2022
</WooFooterItem>
) }
{ showFeedbackModal && (
<CustomerFeedbackModal
Copy link
Contributor

Choose a reason for hiding this comment

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

Since I just merged the CES: Add additional question PR, we'll want to add the additional props here and double-check that it's working properly after a rebase on trunk. Here's an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed here: 66ad4d0

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

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

Right on, great work @louwie17 . Everything looks good, although I recently merged a PR that will require a minor update. See this comment for details.

@louwie17 louwie17 force-pushed the add/35129_product_mvp_ces branch from 3952fbc to 4b5869f Compare November 30, 2022 11:39
@github-actions github-actions bot added the package: @woocommerce/customer-effort-score issues related to @woocommerce/customer-effort-score label Nov 30, 2022
@louwie17
Copy link
Contributor Author

Right on, great work @louwie17 . Everything looks good, although I recently merged a PR that will require a minor update. See this comment for details.

Thanks @joelclimbsthings, I updated it to account for the second question. Also note that I updated the options text in the customer effort modal to match the questions, as from the design that looks to be new normal. Otherwise the options sounded kinda weird.

customOptions && customOptions.length > 0
? customOptions
: [
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Thanks for updating these @louwie17

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

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

Also note that I updated the options text in the customer effort modal to match the questions, as from the design that looks to be new normal. Otherwise the options sounded kinda weird.

💯 Looks like that was a miss on my part. Thanks for getting that. Everything looks and works great! 🚢

@louwie17 louwie17 merged commit 0e8fbe0 into trunk Dec 2, 2022
@louwie17 louwie17 deleted the add/35129_product_mvp_ces branch December 2, 2022 09:35
@github-actions github-actions bot added this to the 7.3.0 milestone Dec 2, 2022
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.

CES: Add prompt for modal feedback after user creates first product using the new experience.

3 participants