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

Update nav redesign overview plan card #90844

Merged
merged 8 commits into from
May 21, 2024
Merged

Conversation

candy02058912
Copy link
Contributor

@candy02058912 candy02058912 commented May 17, 2024

Fixes https://github.com/Automattic/dotcom-forge/issues/7205

Proposed Changes

Free plan

  • Add "Upgrade your plan" CTA button
  • Add 0 dollars for currency
  • Add "No expiration date"
  • Change "Mange plan" to "Manage add-ons"

Expired plan

  • Add "See all plans" and "Renew now" CTA buttons

Where each link/button goes

  • "Renew plan" goes to the checkout page directly.
  • "See all plans" goes to the /plans/:site page.
  • "Manage plan" goes to /purchases/subscription/:site
  • "Manage add-ons" goes to /add-ons/:site

Other changes

  • "Need more storage?" -> "Need more space?"

Jetpack site ("Upgrade your plan" CTA will list Jetpack upgrades)

jetpack

Legacy Creator/Business plan (no storage upsell)

old creator

Creator plan

new creator

Free plan

Free

Expired legacy Creator/Business plan

expired

Why are these changes being made?

  • To be more consistent and still have upsells available when needed

Testing Instructions

  • Go to /sites, and check out each type of plan type to see if the purposed changes are correct

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-aUh-p2)?

@candy02058912 candy02058912 requested review from lucasmendes-design and a team May 17, 2024 11:55
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 17, 2024
@matticbot
Copy link
Contributor

matticbot commented May 17, 2024

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

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

name                   parsed_size           gzip_size
entry-stepper              +1029 B  (+0.0%)     +157 B  (+0.0%)
entry-main                  +679 B  (+0.0%)     +127 B  (+0.0%)
entry-subscriptions         +139 B  (+0.0%)      +38 B  (+0.0%)
entry-login                 +139 B  (+0.0%)      +38 B  (+0.0%)
entry-domains-landing       +139 B  (+0.0%)      +38 B  (+0.0%)
entry-browsehappy           +139 B  (+0.1%)      +38 B  (+0.1%)

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

Sections (~4961 bytes removed 📉 [gzipped])

name                        parsed_size           gzip_size
hosting                         +2149 B  (+0.2%)    +1454 B  (+0.4%)
update-design-flow              +1350 B  (+0.1%)     +986 B  (+0.3%)
link-in-bio-tld-flow            +1229 B  (+0.1%)     +958 B  (+0.3%)
signup                           +824 B  (+0.3%)      +96 B  (+0.1%)
plugins                          +405 B  (+0.0%)     +862 B  (+0.1%)
plans                            +405 B  (+0.0%)     +862 B  (+0.2%)
jetpack-app                      +405 B  (+0.1%)     +862 B  (+0.8%)
with-theme-assembler-flow        +121 B  (+0.2%)      +30 B  (+0.3%)
update-options-flow              +121 B  (+0.3%)      +30 B  (+0.6%)
trial-wooexpress-flow            +121 B  (+0.3%)      +28 B  (+0.4%)
site-setup-flow                  +121 B  (+0.2%)      +30 B  (+0.2%)
site-migration-flow              +121 B  (+0.3%)      +29 B  (+0.4%)
migration-signup                 +121 B  (+0.3%)      +29 B  (+0.4%)
hosted-site-migration-flow       +121 B  (+0.3%)      +29 B  (+0.4%)
free-post-setup-flow             +121 B  (+0.3%)      +30 B  (+0.6%)
free-flow                        +121 B  (+0.3%)      +31 B  (+0.4%)
entrepreneur-flow                +121 B  (+0.3%)      +28 B  (+0.4%)
assembler-first-flow             +121 B  (+0.2%)      +28 B  (+0.2%)
ai-assembler-flow                +121 B  (+0.2%)      +29 B  (+0.2%)
start-writing-flow               +108 B  (+0.6%)      +26 B  (+0.5%)
reblogging-flow                  +108 B  (+1.3%)      +26 B  (+1.0%)
newsletter-flow                  +108 B  (+0.6%)      +27 B  (+0.6%)
new-hosted-site-flow             +108 B  (+1.4%)      +36 B  (+1.4%)
link-in-bio-flow                 +108 B  (+0.7%)      +23 B  (+0.5%)
design-first-flow                +108 B  (+0.6%)      +26 B  (+0.5%)
connect-domain                   +108 B  (+0.4%)      +37 B  (+0.5%)
import-hosted-site-flow           +13 B  (+0.0%)       +1 B  (+0.0%)
import-flow                       +13 B  (+0.0%)       +1 B  (+0.0%)
devdocs                           +13 B  (+0.0%)       +5 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.

Async-loaded Components (~863 bytes added 📈 [gzipped])

name                                             parsed_size           gzip_size
async-load-signup-steps-plans-theme-preselected       +405 B  (+0.1%)     +862 B  (+0.8%)
async-load-signup-steps-plans                         +405 B  (+0.1%)     +862 B  (+0.8%)
async-load-design                                      +13 B  (+0.0%)       +1 B  (+0.0%)

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.
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
Copy link
Contributor

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

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

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/overview-plan-card on your sandbox.

@lucasmendes-design
Copy link

Hi Candy, It looks good to me :) One detail:

Can we remove the blue color from here?
image
image

Thanks 🙏🏽

@davemart-in
Copy link
Contributor

davemart-in commented May 17, 2024

@lucasmendes-design just clarifying, are you referring to this blue?

CleanShot 2024-05-17 at 10 43 08@2x

Just clarifying that the "Need more space?" link can remain blue.

@lucasmendes-design
Copy link

Yes, these ones you pointed out. Thanks, Dave.

"Need more space" can remain blue.

@candy02058912
Copy link
Contributor Author

Notes: Fixed the blue color since it only happens (and currently in production) when it has been clicked and the link gets treated as a visited link.

@candy02058912 candy02058912 self-assigned this May 20, 2024
Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

On P2 sites (such as untangling), it is showing as Free, even though the site's plan is P2+.

@candy02058912
Copy link
Contributor Author

On P2 sites (such as untangling), it is showing as Free, even though the site's plan is P2+.

I can't find a way to check if a site's plan is P2 Free or P2+, I'll hard code it as P2 plan as we're not letting people create new P2s.

@candy02058912
Copy link
Contributor Author

candy02058912 commented May 20, 2024

Also, I noticed the sites with a P2 plan for their site object, the "plan" key is free_plan and all the other attributes are the same as the free plan 🤔

I'll create an issue to see if we want to address the P2 situation as of now. Since for P2 sites, we should not show the Dev Tools tab either.

@candy02058912
Copy link
Contributor Author

candy02058912 commented May 20, 2024

On second thought, let's not handle the P2 case in this PR as there are many states for that as mentioned in the newly created issue: https://github.com/Automattic/dotcom-forge/issues/7278 cc: @fushar

This reverts commit d94579c.
@fushar
Copy link
Contributor

fushar commented May 20, 2024

On second thought, let's not handle the P2 case in this PR as there are many states for that as mentioned in the newly created issue: https://github.com/Automattic/dotcom-forge/issues/7278 cc: @fushar

Sure, makes more sense this way!

) }
plain
href={
isFreePlan ? `/add-ons/${ site?.slug }` : `/purchases/subscriptions/${ site?.slug }`
Copy link
Member

@mmtr mmtr May 20, 2024

Choose a reason for hiding this comment

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

On sites with a paid plan, I think this should link to /purchases/subscriptions/:site/:planSubscriptionId. That's what the "Manage plan" button does in wordpress.com/plans/:site:

Screenshot 2024-05-20 at 12 37 18

? this.props.getManagePurchaseUrlFor( selectedSiteSlug, purchase.id )

Similarly, the button should be disabled for users who didn't make the purchase:

disabled={ ! userIsPurchaseOwner }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, I've added the check for isOwner.

It will directly hide the Manage button if ! isOwner.

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Not sure if it's in the scope, but for staging sites, the plan card is showing Free:

image

Every CTA in this card is unusable for staging sites. Maybe, we should either completely hide the card, or just show the text Staging in the card. 🤔

@candy02058912
Copy link
Contributor Author

candy02058912 commented May 21, 2024

@fushar Rendered Staging site and left the rest blank for now, @lucasmendes-design feel free to give feedback on this. We can implement it in a followup PR.

staging

Copy link
Member

@mmtr mmtr left a comment

Choose a reason for hiding this comment

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

Works great!

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Tested the mentioned cases and it all worked great.

I think this is good to merge and we can fix any further issues (if any) in follow-up PRs 👍

@candy02058912 candy02058912 merged commit fa25fd3 into trunk May 21, 2024
11 checks passed
@candy02058912 candy02058912 deleted the update/overview-plan-card branch May 21, 2024 14:38
@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 21, 2024
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.

None yet

6 participants