Skip to content

Conversation

@retrofox
Copy link
Contributor

@retrofox retrofox commented May 6, 2021

Fixes #19498

Changes proposed in this Pull Request:

This PR adds the features availability logic according to the site plan for Atomic sites.

Jetpack product discussion

Does this pull request change what data or activity we track or use?

No

Testing instructions:

Simple sites

  • Apply the patch
  • Get sandboxed
  • Start to edit a post
  • Nothing should change here. For sites with a free plan and paid blocks, you should see the upgrade banner:
block Free plan Paid plan
Donations image image
Payments image image
Calendly image image

Atomic sites

  • Get the Jetpack beta plugin
  • Install and activate
  • Switch the plugin to this update/simple-and-atomic-plan-parity branch
  • Start to edit a post

The Almost the same behavior that Simple sites: show upgrade banner for paid blocks when the site has a free plan, with the difference that the button link should lead to the plans page, instead of the checkout one.

  • Confirm you see the Business sites and online stores as tab as default.

Jetpack sites

No upgrade banners at all. Some (paid for Simple and Atomic sites) blocks are available for Jetpack sites, such as Calendly, Payments, Video, etc. Other won't be, for instance Donations block.

Copy link

@test-case-reminder test-case-reminder bot left a comment

Choose a reason for hiding this comment

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

Here are some suggested test cases for this PR.

Gutenberg extensions

  • Use Core's block editor
  • Use latest stable Gutenberg plugin

Blocks

  • Tiled Gallery
  • Business Hours
  • Calendly
  • Form
  • Contact Info
  • Eventbrite
  • Google calendar
  • Mailchimp
  • Map
  • OpenTable
  • Pinterest
  • Podcast player
  • Star rating
  • Recurring Payments
  • Repeat Visitor
  • Revue
  • Simple Payments
  • Slideshow

Extensions

  • Publicize
  • Likes

If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello retrofox! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D61083-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label May 6, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: June 1, 2021.
  • Scheduled code freeze: May 24, 2021.

@retrofox retrofox added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] In Progress labels May 7, 2021
@retrofox retrofox requested a review from jeherve May 7, 2021 18:48
@retrofox retrofox added [Extension] Paid Blocks Functionality used to handle notices for paid blocks [Pri] Normal [Size] M labels May 7, 2021
Copy link
Contributor

@cpapazoglou cpapazoglou left a comment

Choose a reason for hiding this comment

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

Thanks @retrofox!

While it works as expected for Simple Sites and Atomic with a plan, I cannot test it with Atomic without plan cause in that case Jetpack Beta is deactivated...

Is there a workaround for this?

Using my local Jetpack with wpcomsh was enough! In that case:

  • Simple Sites 🎉
  • Atomic with a plan 🎉
  • Atomic without a plan 🎉

cpapazoglou
cpapazoglou previously approved these changes May 10, 2021
Copy link
Contributor

@cpapazoglou cpapazoglou left a comment

Choose a reason for hiding this comment

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

LGTM and works great!

I just left some minors.

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

Looks like you'll need to fix the linting issues and update your PR with the latest version of master before we can merge.

@jeherve jeherve added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Team Review Obsolete. Use Needs Review instead. labels May 10, 2021
@retrofox retrofox added [Status] Needs Review This PR is ready for review. [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] Needs Review This PR is ready for review. labels May 10, 2021
@retrofox retrofox force-pushed the update/simple-and-atomic-plan-parity branch from 67f0b5a to 732d5c6 Compare May 17, 2021 15:51
@samiff samiff added this to the jetpack/9.8 milestone May 17, 2021
@samiff samiff self-requested a review May 17, 2021 19:47
@samiff samiff removed the [Status] Needs Review This PR is ready for review. label May 17, 2021
Copy link
Contributor

@samiff samiff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@samiff samiff added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Team Review Obsolete. Use Needs Review instead. labels May 17, 2021
@retrofox retrofox changed the title Simple and Atomic plans parity Enable upgrade banner for WoA sites May 18, 2021
@pablinos
Copy link
Contributor

I've tested this with:

  • Simple Free
  • Simple Premium
  • Atomic Free
  • Atomic e-Commerce
  • Jetpack

All work as expected. :shipit:

@samiff samiff merged commit 20471cc into master May 19, 2021
@samiff samiff deleted the update/simple-and-atomic-plan-parity branch May 19, 2021 21:38
@github-actions
Copy link
Contributor

Great news! One last step: head over to your WordPress.com diff, D61083-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label May 19, 2021
@retrofox
Copy link
Contributor Author

r225990-wpcom

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

Labels

[Extension] Paid Blocks Functionality used to handle notices for paid blocks [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal [Size] M Touches WP.com Files Unit Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Premium Blocks: Show upgrade banners on Free Atomic sites

8 participants