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

Fix Need more storage? link on Hosting Overview page #94702

Merged
merged 8 commits into from
Sep 19, 2024

Conversation

fredrikekelund
Copy link
Contributor

Fixes #94670
Related to #94144

Proposed Changes

On the Hosting Overview page, the plan storage widget is sometimes a div and sometimes an anchor. The Need more storage? text in the footer of that widget was previously always a link, which is wrong since we don't want nested links. #94144 sought to fix this but made it so Need more storage? is never a link instead. This PR fixes that.

I also took the opportunity to convert client/blocks/plan-storage/index.js to Typescript.

Why are these changes being made?

Because we don't want nested anchors (since that's not valid HTML).

Testing Instructions

  1. Have an Atomic site without storage addons (that's not enrolled in A4A)
  2. Navigate to /overview/:site_slug
  3. Ensure that Need more storage? is a clickable link
  4. Have a free site without storage addons
  5. Navigate to /overview/:site_slug
  6. Ensure that Need more storage? is not a link

@fredrikekelund fredrikekelund self-assigned this Sep 19, 2024
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Sep 19, 2024
@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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug f26d/hosting-overview-plan-storage-link on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Sep 19, 2024

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

Sections (~183 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
hosting                               +369 B  (+0.0%)     +124 B  (+0.0%)
media                                 +124 B  (+0.0%)      +59 B  (+0.0%)
themes                                +110 B  (+0.0%)      +57 B  (+0.0%)
theme                                 +110 B  (+0.0%)      +57 B  (+0.0%)
staging-site                          +110 B  (+0.0%)      +57 B  (+0.0%)
settings-performance                  +110 B  (+0.0%)      +57 B  (+0.0%)
scan                                  +110 B  (+0.0%)      +57 B  (+0.0%)
plugins                               +110 B  (+0.0%)      +57 B  (+0.0%)
marketplace                           +110 B  (+0.0%)      +57 B  (+0.0%)
jetpack-cloud-plugin-management       +110 B  (+0.0%)      +57 B  (+0.0%)
hosting-features                      +110 B  (+0.0%)      +57 B  (+0.0%)
backup                                +110 B  (+0.0%)      +57 B  (+0.0%)
a8c-for-agencies-sites                +110 B  (+0.0%)      +57 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 (~120 bytes added 📈 [gzipped])

name                                               parsed_size           gzip_size
async-load-design-blocks                                +124 B  (+0.0%)      +61 B  (+0.0%)
async-load-calypso-post-editor-media-modal              +124 B  (+0.0%)      +59 B  (+0.0%)
async-load-calypso-post-editor-editor-media-modal       +124 B  (+0.0%)      +59 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.

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected 👍
Screenshot 2024-09-19 at 11 45 00
Screenshot 2024-09-19 at 11 45 26

@@ -195,6 +195,30 @@ const PricingSection: FC = () => {
);
};

function PlanStorageFooter( { children }: PropsWithChildren< unknown > ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, looks like we don't need it

Suggested change
function PlanStorageFooter( { children }: PropsWithChildren< unknown > ) {
function PlanStorageFooter( { children }: PropsWithChildren ) {

@fredrikekelund fredrikekelund merged commit b734286 into trunk Sep 19, 2024
11 checks passed
@fredrikekelund fredrikekelund deleted the f26d/hosting-overview-plan-storage-link branch September 19, 2024 14:50
@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 Sep 19, 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.

Hosting Overview: 'Need more storage?' is not a hyperlink
3 participants