-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plans (Storage): Always reflect selected storage option in the plan price #90989
Plans (Storage): Always reflect selected storage option in the plan price #90989
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~117 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~19 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. 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. Generated by performance advisor bot at iscalypsofastyet.com. |
9196728
to
0796e33
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Going to close this and just ship the child PR #91050 |
Part of addressing #90905
Presumably fixes #90947 (although cannot stand on its own 🤷 )
Proposed Changes
This PR makes the pricing on plans always reflect the selected storage option, irrespective of conditions that may allow a certain storage add-on to be purchasable. These are different concerns i.e. if something would "exceed storage limits" or is not "repurchasable", then these are things to be reflected in the UI that allows selections of that option.
In effect, the changes here make the pricing hook cleaner, more deterministic -> "if a storage add-on has been selected, then reflect its price in the plan price". It shouldn't be bothered with more context.
Media
Before/After...
Why are these changes being made?
Storage options/dropdowns coupled with site context are a pretty broken mess right now. There is really no way to enable storage selection in the plans-grid without introducing ambiguity / stemming from existing storage purchased, site storage limits, and weak UI (we'll get to that later).
This PR is part of (hopefully) a series of PRs to make storage selection in the plans-grid cleaner and less ambiguous when in admin (or in a "site" context) - and to eventually enable selection over the current/spotlight plan (per #90905). We will likely not be shipping anything individually. If the whole in the end doesn't make sense, then we won't ship anything.
Testing Instructions
/add-ons
with a site on the Creator plan/plans/[site]
:Entrepreneur
plan column and select the 100GB add-on upgrade. It should force the price of the plan to be updated.See #91050 for testing instead as it brings more of the puzzle together
Pre-merge Checklist