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

Jetpack Pro Dashboard: show "Not supported on multisite" when a product is not supported on a multisite #74692

Merged
merged 4 commits into from Mar 23, 2023

Conversation

yashwin
Copy link
Contributor

@yashwin yashwin commented Mar 21, 2023

Closes #73406

Proposed Changes

This PR makes the following changes

  • Show - with a tooltip showing Not supported on multisite when the product is Scan
  • Show - with a tooltip showing Not supported on multisite when the product is Backup and does not have a backup subscription https://href.li/?https://wp.me/pbuNQi-1jg

Testing Instructions

Testing Instructions

Prerequisites

Since these changes are made specifically for agencies, you must set yourself(partner) as an agency - 2c49b-pb. Make sure to switch it back to the previous type.

Instructions

  1. Run git checkout fix/handle-unsupported-products-for-multisite and yarn start-jetpack-cloud
  2. Open http://jetpack.cloud.localhost:3000/, and you'll be redirected to the /dashboard.
  3. Add a multisite with a plan that usually would include Backup & Scan, e.g. Complete.
  4. Verify that the Backup column shows the clock or check icon and Scan shows - and when hovering over, it shows Not supported on multisite. We will show the backup as it is if it is already added - https://href.li/?https://wp.me/pbuNQi-1jg
  5. Add another multisite without any plan
  6. Verify that both Backup & Scan shows - and when hovering over, it shows Not supported on multisite.

Screenshot 2023-03-21 at 12 16 03 PM

Screenshot 2023-03-21 at 12 36 06 PM

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

@yashwin yashwin added Jetpack Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Mar 21, 2023
@yashwin yashwin requested a review from a team March 21, 2023 07:21
@yashwin yashwin self-assigned this Mar 21, 2023
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Mar 21, 2023
@matticbot
Copy link
Contributor

matticbot commented Mar 21, 2023

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

Sections (~186 bytes added 📈 [gzipped])

name                            parsed_size           gzip_size
jetpack-cloud-agency-dashboard       +584 B  (+0.1%)     +186 B  (+0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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

@vitozev vitozev left a comment

Choose a reason for hiding this comment

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

Works as expected! I just noticed one minor issue:

image

The "1 available" isn't an actual link for the multisite, is that expected?

@yashwin
Copy link
Contributor Author

yashwin commented Mar 21, 2023

The "1 available" isn't an actual link for the multisite, is that expected?

@vitozev - Thanks for the review. No, it is not. I have fixed it now - df64857

Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

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

I added one comment that I think will make the code easier to read. WDYT?

@yashwin
Copy link
Contributor Author

yashwin commented Mar 22, 2023

I added one comment that I think will make the code easier to read. WDYT?

I have made the changes - 93fda78

@yashwin yashwin requested a review from vitozev March 22, 2023 06:08
Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

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

LGTM!

@yashwin yashwin force-pushed the fix/handle-unsupported-products-for-multisite branch from 93fda78 to c08da2d Compare March 23, 2023 05:54
@yashwin yashwin merged commit 6e03462 into trunk Mar 23, 2023
3 checks passed
@yashwin yashwin deleted the fix/handle-unsupported-products-for-multisite branch March 23, 2023 06:15
@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 23, 2023
@a8ci18n
Copy link

a8ci18n commented Mar 23, 2023

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

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

@a8ci18n
Copy link

a8ci18n commented Mar 30, 2023

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) Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jetpack Dashboard: Do not show threats for multisites
4 participants