Skip to content

Conversation

@james-allan
Copy link
Contributor

@james-allan james-allan commented May 9, 2022

All Submissions:

Changes proposed in this Pull Request:

This PR adds a button to the WooCommerce > Subscriptions screen that users can use to hide/dismiss the menu item.

Closes #32909

Screen Shot 2022-05-09 at 3 11 43 pm

How to test the changes in this Pull Request:

  1. Checkout this branch and build assets with pnpm nx build-watch woocommerce-admin
  2. With WooCommerce Payments and WooCommerce Subscriptions inactive, navigate to WooCommerce > Subscriptions
  3. There should be a "No thanks" button.
  4. Clicking "No thanks" should redirect you to the WooCommerce > Home screen * and the subscriptions menu item should no longer appear in the navigation.

* this UX hasn't been agreed to so feel free to give me feedback on that.

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 successfully run tests with your changes locally?
  • Have you created a changelog file by running pnpm nx affected --target=changelog?
    • NA for this PR. We'll submit a single change log entry for this project.

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.

@james-allan james-allan requested review from Jinksi and aprea May 9, 2022 04:06
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 9, 2022
>
{ __( 'Get started', 'woocommerce' ) }
</Button>
</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change looks larger than it actually is. So the two buttons were in the same wrapper container, I moved this div out of here and put in the MainContent component instead, see change directly below this one. Let me know if there's a better way to do this.

@james-allan james-allan force-pushed the add/experiment-subscriptions-admin-dismiss-button branch from e3bd401 to 738b376 Compare May 9, 2022 04:33
Copy link
Contributor

@aprea aprea left a comment

Choose a reason for hiding this comment

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

This LGTM and is working as expected 👍

@james-allan james-allan merged commit 2c7bfca into add/experiment-subscriptions-admin-menu-1 May 9, 2022
@james-allan james-allan deleted the add/experiment-subscriptions-admin-dismiss-button branch May 9, 2022 05:32
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2022

Hi @james-allan, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants