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

A4A: add support for new pressable enterprise plans in marketplace #96647

Merged
merged 13 commits into from
Nov 25, 2024

Conversation

travisw
Copy link
Contributor

@travisw travisw commented Nov 21, 2024

Related to: https://github.com/Automattic/automattic-for-agencies-dev/issues/1466
P2: pfSQfS-tF-p2

Proposed Changes

  • Add support for new pressable enterprise plans
  • Split existing plans and enterprise up into separate tabs

Why are these changes being made?

  • To allow agencies to self-serve purchasing Pressable plans with higher limits

Testing Instructions

  • Sandbox public-api.wordpress.com.
  • Visit the Pressable marketplace page (/marketplace/hosting/pressable).
  • You should see two new tabs - "Shared Resource Plans" and "Signature Shared Resource Plans"
  • Under "Shared Resource Plans" you should see the existing Pressable plans
  • Under "Signature Shared Resource Plans" you should see the new Enterprise Pressable plans ("Signature")
  • Make sure the sliders work as expected.
    • If you have an existing plan the slider should start at the next available plan.
    • The slider under "Signature Shared Resource Plans" should default to the far left.
    • In refer mode the sliders should allow choosing any plan (no minimum).
    • The "More" item should appear as the last option under "Signature Shared Resource Plans".
    • Selecting "More" should show the "Contact Us" details just as before.
    • Filtering by installs or visits should continue to work the same.
    • Add one of the new plans to the cart (don't purchase yet). It should show the appropriate "Signature" plan name.
    • Make sure all the displayed plan limits (installs, visits, storage) match what's shown in the spreadsheet in this post (pfSQfS-tF-p2).
  • Once D166722-code has shipped, also test purchasing the plans
    ⚠️ Purchasing plans before that could cause issues since it writes to production tables before the code is live on production. Likely a minor concern but no need to generate errors.
    • Make sure purchasing existing plans works the same.
    • Purchase one of the new plans.
    • Once your existing plan is one of the new ones the slider under "Shared Resource Plans" should be all grey so you can't select a lower plan.
    • Under "Signature Shared Resource Plans", the slider should start at the next available plan and not let you select a lower plan, just like before.
    • Make sure when you have any Signature plan or the Business 150 plan that the "Shared Resource Plans" tab is disabled so users can't select a lower or the same plan.
    • Make sure revoking a plan still works ok.
Screenshot 2024-11-22 at 9 27 52 AM Screenshot 2024-11-22 at 9 29 34 AM Screenshot 2024-11-22 at 9 31 35 AM Screenshot 2024-11-22 at 9 35 43 AM Screenshot 2024-11-22 at 9 36 04 AM Screenshot 2024-11-22 at 9 41 36 AM

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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-aUh-p2)?

@matticbot
Copy link
Contributor

matticbot commented Nov 21, 2024

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

App Entrypoints (~104 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
entry-stepper               +864 B  (+0.0%)     +104 B  (+0.0%)
entry-main                  +864 B  (+0.0%)     +104 B  (+0.0%)
entry-subscriptions         +252 B  (+0.0%)      +70 B  (+0.0%)
entry-login                 +252 B  (+0.0%)      +72 B  (+0.0%)
entry-domains-landing       +252 B  (+0.0%)      +70 B  (+0.0%)
entry-browsehappy           +252 B  (+0.1%)      +70 B  (+0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~17467 bytes added 📈 [gzipped])

name                           parsed_size           gzip_size
a8c-for-agencies-marketplace      +37797 B  (+4.7%)   +11979 B  (+5.0%)
a8c-for-agencies-client            +1328 B  (+0.1%)     +554 B  (+0.2%)
a8c-for-agencies-purchases         +1250 B  (+0.2%)     +213 B  (+0.1%)
hosting                             -788 B  (-0.0%)    +1109 B  (+0.2%)
a8c-for-agencies-team               +196 B  (+0.0%)     +706 B  (+0.3%)
site-settings                       +181 B  (+0.0%)     +330 B  (+0.1%)
site-performance                    +181 B  (+0.0%)     +290 B  (+0.1%)
reader                               +78 B  (+0.0%)     +346 B  (+0.1%)
jetpack-cloud-agency-sites-v2        +78 B  (+0.0%)     +340 B  (+0.1%)
a8c-for-agencies-sites               +78 B  (+0.0%)     +340 B  (+0.1%)
site-marketing                       +66 B  (+0.0%)     +629 B  (+0.1%)
site-tools                           +13 B  (+0.0%)     +341 B  (+0.1%)
github-deployments                   +13 B  (+0.0%)     +335 B  (+0.1%)

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.

@travisw travisw force-pushed the add/a4a-support-for-pressable-enterprise-plans branch from 71fecca to e7776af Compare November 21, 2024 23:52
@matticbot
Copy link
Contributor

matticbot commented Nov 22, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/a4a-support-for-pressable-enterprise-plans on your sandbox.

@travisw travisw force-pushed the add/a4a-support-for-pressable-enterprise-plans branch from 4a77a55 to 1d1b099 Compare November 22, 2024 17:26
@travisw travisw requested review from jeffgolenski and a team November 22, 2024 17:47
@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 Nov 22, 2024
@travisw travisw changed the title A4A: add support for new pressable enterprise plans A4A: add support for new pressable enterprise plans in marketplace Nov 22, 2024
@andrii-lysenko
Copy link
Contributor

While testing, I noticed that when you own enterprise plan, if switching tab to Standart it will pre-select 150 plan and you can add it to the cart. We should not allow downgrade and I'm wondering if we should just disable standart tab or purchase button. Other than that I think it looks good, but would confirm with @jeffgolenski

Screenshot 2024-11-22 at 11 48 49 AM

On a side note, our code around sliders and marketplace is growing, and maybe we could re-visit it in the future to see if it's need some refactoring.

@travisw
Copy link
Contributor Author

travisw commented Nov 22, 2024

I noticed that when you own enterprise plan, if switching tab to Standart it will pre-select 150 plan and you can add it to the cart

Ah, nice catch. Yeah it does seem like something should get disabled here

On a side note, our code around sliders and marketplace is growing, and maybe we could re-visit it in the future to see if it's need some refactoring.

Agreed - I think some of the code in these components could be simplified

@travisw
Copy link
Contributor Author

travisw commented Nov 22, 2024

I noticed that when you own enterprise plan, if switching tab to Standart it will pre-select 150 plan and you can add it to the cart

I've changed it so the "Shared Resource Plans" tab becomes disabled when you already own Business 150 or any Signature plan to prevent the user from buying a lower or the same plan.

@jeffgolenski
Copy link
Member

@travisw Great work. Tested both regular purchases and referrals. All seems to work well on the agency and client sides! Other than what Andrei pointed out, my only recommendation is a small one. Can we shrink the width of the tabs to be max-width: 600px; to occupy a little less space?

CleanShot 2024-11-25 at 12 07 04@2x

After that 🚢

Copy link
Member

@jeffgolenski jeffgolenski left a comment

Choose a reason for hiding this comment

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

Adjust the max width of the tabs and we're golden!

@travisw travisw force-pushed the add/a4a-support-for-pressable-enterprise-plans branch from ffa537e to f6e422f Compare November 25, 2024 18:27
@travisw
Copy link
Contributor Author

travisw commented Nov 25, 2024

Adjust the max width of the tabs and we're golden!

Max width applied

Screenshot 2024-11-25 at 10 25 10 AM

@travisw travisw merged commit 8146923 into trunk Nov 25, 2024
11 checks passed
@travisw travisw deleted the add/a4a-support-for-pressable-enterprise-plans branch November 25, 2024 23:14
@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 Nov 25, 2024
@a8ci18n
Copy link

a8ci18n commented Nov 26, 2024

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17019592

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @travisw for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Dec 1, 2024

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants