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

Prevents upsell for Jetpack Backup for multisite installations #44187

Merged
merged 4 commits into from
Jul 17, 2020

Conversation

ChaosExAnima
Copy link
Contributor

Changes proposed in this Pull Request

  • Adds an additional state for multisite installations to notify users that Backup is not available.
  • Removes unused file wpcom-upsell.tsx in the Jetpack Cloud code.
  • Fixes a bug with the Scan request code that causes a fail when threats are not an array.

Screenshots

Screen Shot 2020-07-15 at 3 00 34 PM

Testing instructions

  • Create a Jetpack multisite and connect it.
  • With this code, visit cloud.jetpack.com and navigate to the Backup nav for the site.
  • Verify Backup matches screenshot above.

Note: Jetpack Scan may not show the correct state for multisites. This is a known issue and is due to an API issue.

Fixes 1184358343400545-as-1184719508034178.

@ChaosExAnima ChaosExAnima added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Jul 15, 2020
@ChaosExAnima ChaosExAnima requested a review from a team July 15, 2020 19:45
@ChaosExAnima ChaosExAnima self-assigned this Jul 15, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

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

Sections (~154 bytes added 📈 [gzipped])

name    parsed_size           gzip_size
backup       +384 B  (+0.1%)     +114 B  (+0.1%)
scan         +341 B  (+0.1%)      +40 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 (~44 bytes added 📈 [gzipped])

name                                   parsed_size           gzip_size
async-load-my-sites-sidebar                 +165 B  (+0.1%)      +22 B  (+0.0%)
async-load-components-jetpack-sidebar       +165 B  (+0.8%)      +22 B  (+0.4%)

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.

@cleacos
Copy link
Contributor

cleacos commented Jul 16, 2020

Should this PR work for the Jetpack (Calypso) upsells?

@ChaosExAnima
Copy link
Contributor Author

Should this PR work for the Jetpack (Calypso) upsells?

No, as the Calypso side of things uses different components. It's a good point, and we should implement that in a different PR. :)

Copy link
Contributor

@rcanepa rcanepa left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@cleacos cleacos left a comment

Choose a reason for hiding this comment

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

It works as expected for the Backup section. One question, in the end, should the Scan section have the same/similar message for multisite?

@ChaosExAnima
Copy link
Contributor Author

It works as expected for the Backup section. One question, in the end, should the Scan section have the same/similar message for multisite?

@cleacos whoops, should have updated the testing code. This PR applies to Scan as well!

@ChaosExAnima ChaosExAnima merged commit d310023 into master Jul 17, 2020
@ChaosExAnima ChaosExAnima deleted the fix/prevent-backup-multisite branch July 17, 2020 14:07
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jul 17, 2020
@cleacos
Copy link
Contributor

cleacos commented Jul 17, 2020

This PR applies to Scan as well!

For Scan section it didn't work, I saw the normal upsell page. @ChaosExAnima

@ChaosExAnima
Copy link
Contributor Author

@cleacos - Yes, see the note above under the testing instructions. That is expected.

@a8ci18n
Copy link

a8ci18n commented Jul 17, 2020

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

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

@a8ci18n
Copy link

a8ci18n commented Jul 24, 2020

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
Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants