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

Pricing Page: Fix duplicate Backup product card showing when Jetpack Starter Plan is owned. #76647

Merged

Conversation

elliottprogrammer
Copy link
Contributor

@elliottprogrammer elliottprogrammer commented May 5, 2023

Now that the Jetpack Starter plan has been added as a new purchasable product on the pricing page, There was a bug that was causing duplicate VaultPress Backup product cards to show on the pricing page (when logged-in and the site is in context) when the Jetpack Starter plan is owned. See Screenshot:

.
Markup 2023-05-05 at 14 25 35
.


.
This PR fixes this bug whereas when a site has a subscription for the Jetpack Starter plan, The VaultPress Backup product card will only show once, and it will be labeled "Part of the current plan" with a "Manage subscription" CTA button, instead of showing 2 VaultPress Backup product cards.
(See After screenshot:)

Markup 2023-05-05 at 16 33 02

Asana Task: 1198218726984184-as-1204541714823225/f

Proposed Changes

  • Allowed JETPACK_BACKUP_T0 to be recognized as an "owned" product on the pricing page.

Testing Instructions

  • Spin up this PR: git fetch && git checkout add/backupT0-product-to-owned-products-pricing-page && yarn start-jetpack-cloud
  • If you don't already have a site that owns a subscription to the new Jetpack Starter plan, the you'll need to Purchase Jetpack Starter create an ephemeral or Jurassic Ninja site, connect Jetpack, and activate the product on the site.
  • Next go to http://jetpack.cloud.localhost:3000/pricing/:SITE (replace :SITE with the site-slug of the site you have your Jetpack Starter plan on.
  • Make sure you are logged-in. If not, log in and reload the /pricing/:SITE page.
  • Verify that the VaultPress Backup product card is not duplicated and it is showing as "Part of the current plan" (like the "After" screenshot shown above)..

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@elliottprogrammer elliottprogrammer added Jetpack [Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. Jetpack Starter Jetpack Starter plan labels May 5, 2023
@elliottprogrammer elliottprogrammer self-assigned this May 5, 2023
@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~12 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
plans                        +40 B  (+0.0%)      +12 B  (+0.0%)
jetpack-connect              +40 B  (+0.0%)      +12 B  (+0.0%)
jetpack-cloud-pricing        +40 B  (+0.0%)      +12 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 5, 2023
@elliottprogrammer elliottprogrammer requested review from a team and CodeyGuyDylan May 5, 2023 21:21
Copy link
Contributor

@CodeyGuyDylan CodeyGuyDylan 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, looks simple enough to me, no issues I see 😄

@elliottprogrammer elliottprogrammer merged commit 55ad7a1 into trunk May 5, 2023
@elliottprogrammer elliottprogrammer deleted the add/backupT0-product-to-owned-products-pricing-page branch May 5, 2023 23:08
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. Jetpack Starter Jetpack Starter plan Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants