Skip to content

Comments

Untangled Plans: add manage billing & add-ons button in the header#101709

Merged
fushar merged 3 commits intotrunkfrom
untangled-plans-buttons
Mar 27, 2025
Merged

Untangled Plans: add manage billing & add-ons button in the header#101709
fushar merged 3 commits intotrunkfrom
untangled-plans-buttons

Conversation

@fushar
Copy link
Contributor

@fushar fushar commented Mar 21, 2025

Related to:

Proposed Changes

This PR implements the Manage add-ons and Manage billing buttons as per Figma kyrhgvUpBQak3Qww1560PK-fi-461_8867

image

Note that there's a discussion about the button copy here: p58i-kcO-p2#comment-67294 (cc: @matt-west)

Why are these changes being made?

pbxlJb-6Xi-p2

Testing Instructions

  1. Go to /plans/:site?flags=untangling/plans on a Free site
    • Verify you see the Manage add-ons button.
  2. Go to /plans/:site?flags=untangling/plans as an owner of a site with a paid plan
    • Verify you see the Manage add-ons and Manage billing buttons.
    • Verify you can click the buttons and they take you to the correct pages:
Manage add-ons Manage billing
image image

(Note that the Manage add-ons destination page is temporary; it will be replaced with a modal, soon.

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

@github-actions
Copy link

github-actions bot commented Mar 21, 2025

@fushar fushar marked this pull request as ready for review March 21, 2025 07:06
@fushar fushar requested a review from a team as a code owner March 21, 2025 07:06
@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 Mar 21, 2025
@matticbot
Copy link
Contributor

matticbot commented Mar 21, 2025

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 untangled-plans-buttons on your sandbox.

@fushar fushar self-assigned this Mar 21, 2025
@matticbot
Copy link
Contributor

matticbot commented Mar 21, 2025

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

Sections (~342 bytes added 📈 [gzipped])

Details
name                               parsed_size           gzip_size
plans                                   +638 B  (+0.0%)     +190 B  (+0.0%)
site-purchases                           +68 B  (+0.0%)      +23 B  (+0.0%)
purchases                                +68 B  (+0.0%)      +23 B  (+0.0%)
settings-jetpack                         +44 B  (+0.0%)       +9 B  (+0.0%)
settings                                 +44 B  (+0.0%)      +18 B  (+0.0%)
scan                                     +44 B  (+0.0%)      +14 B  (+0.0%)
plugins                                  +44 B  (+0.0%)      +10 B  (+0.0%)
overview                                 +44 B  (+0.0%)      +13 B  (+0.0%)
jetpack-social                           +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-search                           +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-connect                          +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-cloud-settings                   +44 B  (+0.0%)      +12 B  (+0.0%)
jetpack-cloud-pricing                    +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-cloud-plugin-management          +44 B  (+0.0%)      +12 B  (+0.0%)
jetpack-cloud-partner-portal             +44 B  (+0.0%)      +15 B  (+0.0%)
jetpack-cloud-manage-pricing             +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-cloud-features-comparison        +44 B  (+0.0%)      +14 B  (+0.0%)
jetpack-cloud-agency-dashboard           +44 B  (+0.0%)      +15 B  (+0.0%)
jetpack-app                              +44 B  (+0.0%)      +10 B  (+0.0%)
incoming-redirect                        +44 B  (+0.2%)       +9 B  (+0.1%)
email                                    +44 B  (+0.0%)      +10 B  (+0.0%)
earn                                     +44 B  (+0.0%)      +10 B  (+0.0%)
domains                                  +44 B  (+0.0%)      +13 B  (+0.0%)
backup                                   +44 B  (+0.0%)      +14 B  (+0.0%)
async-step-unified-plans                 +44 B  (+0.0%)      +14 B  (+0.0%)
a8c-for-agencies-sites                   +44 B  (+0.0%)      +14 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 (~42 bytes added 📈 [gzipped])

Details
name                                                      parsed_size           gzip_size
async-load-signup-steps-plans-theme-preselected                 +44 B  (+0.0%)      +14 B  (+0.0%)
async-load-signup-steps-plans                                   +44 B  (+0.0%)      +14 B  (+0.0%)
async-load-design-blocks                                        +44 B  (+0.0%)      +14 B  (+0.0%)
async-load-calypso-my-sites-stats-jetpack-upsell-section        +44 B  (+0.3%)      +14 B  (+0.3%)

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.

@fushar fushar requested review from a team and matt-west March 21, 2025 07:14
@fushar fushar changed the title Untangled Plans: add manage plan & add-ons button in the header Untangled Plans: add manage billing & add-ons button in the header Mar 21, 2025
Copy link
Contributor

@matt-west matt-west left a comment

Choose a reason for hiding this comment

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

Thanks @fushar. The buttons appear and behave as expected.

I noticed that the back button on the purchase page takes you to /me/purchases rather than back to the plans page though. Perhaps that will be addressed in a separate PR< but just wanted to point it out.

Screenshot 2025-03-21 at 16 31 45

@fushar
Copy link
Contributor Author

fushar commented Mar 21, 2025

I noticed that the back button on the purchase page takes you to /me/purchases rather than back to the plans page though.

Ah, yeah. I noticed that many nested pages in /me screens have this back button that points to the outer page. If we want to go back to a different screen (like this new Plans page), one way that I've seen is to add an ugly query param, like ?source=/plans 🤔 it works if we really want the back button to point to the previous screen which is not the original outer page.

In any case, these /me screens have different card styles from the rest of the hosting dashboard. Do we want to keep this pattern (i.e. having random Back button in card headings)? How do we solve it in the new multi-site hosting dashboard?

@matt-west
Copy link
Contributor

In any case, these /me screens have different card styles from the rest of the hosting dashboard. Do we want to keep this pattern (i.e. having random Back button in card headings)? How do we solve it in the new multi-site hosting dashboard?

I’ll keep this in ming with the new dashboard designs.

I'm okay with the URL param solution. We could also tackle this in the interim by just changing the ← Back button label to ← Purchases so that it’s clearer where it will take you.

@fushar
Copy link
Contributor Author

fushar commented Mar 27, 2025

We could also tackle this in the interim by just changing the ← Back button label to ← Purchases so that it’s clearer where it will take you.

Thanks, I ended up using this solution for now 👍

@fushar fushar merged commit ff74bf9 into trunk Mar 27, 2025
13 checks passed
@fushar fushar deleted the untangled-plans-buttons branch March 27, 2025 05:07
@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 Mar 27, 2025
@a8ci18n
Copy link

a8ci18n commented Mar 27, 2025

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

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 @fushar for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Mar 30, 2025

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.

4 participants