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

Fix free features is still rendered when no recommendation #33923

Merged

Conversation

chihsuan
Copy link
Member

@chihsuan chihsuan commented Jul 15, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes #33915.

This PR adds a check hasInstallableExtensions before component rendering to not render free features tab when no recommendation.

To make it, I moved the getFreeExtensions function call from <SelectiveExtensionsBundle> to <BusinessDetails>, as well as getInstallableExtensions.

Screen Shot 2022-07-15 at 12 28 48

How to test the changes in this Pull Request:

  1. Start with a fresh install
  2. Start OBW and use the following selections and click Continue
  • Store Details.country/region: Afghanistan
  • Industry: Food and drink
  • Product Types: Physical products
  • Business Details[how many products do you plan to display]: 1-10
  • Business Details[currently selling else where?]: Yes, on another platform
  • Business Details[How many employees do you have]: <10
  • Business Details[What's your current annual revenue?]: Up to 3.000
  • Business Details[Which platform is the store using?] BigCommerce
  1. On the Free features tab, make a note of the plugins. You should see MailPoet and Google Listings and Ads only (when Jetpack is already installed).
  2. Open a new tab and install and active the plugins listed on Free features manually.
  3. Refresh Free features tab
  4. Observe that the FreeFeatures tab is not rendered.

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 for each project being changed, ie pnpm changelog add --filter=<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.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jul 15, 2022
@chihsuan chihsuan marked this pull request as ready for review July 15, 2022 04:51
@chihsuan chihsuan self-assigned this Jul 15, 2022
@chihsuan chihsuan requested a review from a team July 15, 2022 04:53
@github-actions
Copy link
Contributor

github-actions bot commented Jul 15, 2022

Test Results Summary

Commit SHA: b5c4087

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests11500201170m 49s
E2E Tests185001018612m 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.

@chihsuan chihsuan force-pushed the fix/free-features-is-still-rendered-when-no-recommendation branch from 3bbac6c to e822b23 Compare July 18, 2022 05:53
Copy link
Contributor

@ilyasfoo ilyasfoo left a comment

Choose a reason for hiding this comment

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

It seems in my test, the business step displays empty screen after clicking on continue. There's no error in console:

@chihsuan chihsuan force-pushed the fix/free-features-is-still-rendered-when-no-recommendation branch from bfa7805 to e6bd879 Compare July 19, 2022 03:07
@chihsuan
Copy link
Member Author

It seems in my test, the business step displays empty screen after clicking on continue. There's no error in console:

@ilyasfoo Sorry, I forgot to update the submit logic so it went to an empty free features screen.

I've fixed that in e6bd879. You can use this release zip file. 🙂

@chihsuan
Copy link
Member Author

E2E is failing but I think it's unrelated.

2 failed
[Chrome] › merchant/order-refund.spec.js:53:2 › WooCommerce Orders > Refund an order › can issue a refund by quantity
[Chrome] › merchant/order-refund.spec.js:111:2 › WooCommerce Orders > Refund an order › can delete an issued refund

@chihsuan chihsuan requested a review from ilyasfoo July 19, 2022 04:48
@chihsuan chihsuan force-pushed the fix/free-features-is-still-rendered-when-no-recommendation branch from b7153b6 to b5c4087 Compare July 21, 2022 02:56
Copy link
Contributor

@ilyasfoo ilyasfoo left a comment

Choose a reason for hiding this comment

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

Tested well, great work @chihsuan! 🚢

@chihsuan chihsuan merged commit d09d591 into trunk Jul 21, 2022
@chihsuan chihsuan deleted the fix/free-features-is-still-rendered-when-no-recommendation branch July 21, 2022 04:57
@github-actions github-actions bot added this to the 6.9.0 milestone Jul 21, 2022
@github-actions
Copy link
Contributor

Hi @chihsuan, 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

jacob-sewell pushed a commit that referenced this pull request Jul 29, 2022
* Fix free features is still rendered when there is no recommendation

* Add changelog

* Update BusinessDetails tab to go to next step if no installable extensions

* Update spinner
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.

Free features is still rendered when there is no recommendation
2 participants