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 Manage: Adding the ability to multi select filters in the sites dashboard #87951

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

coder-karen
Copy link
Contributor

@coder-karen coder-karen commented Feb 27, 2024

Note

This PR is not intended to be implemented as Dataviews will eventually allow implementation of multi-selection of filters, but exists as a 'just in case' should we need something at some stage, and could build on this.

Proposed Changes

  • This PR adds the ability to multi select filters.

Not implemented:

  • The current default behaviour when clicking a filter name that was selected immediately before, is to reset the filter (to 'Needs Attention'). This does not yet have an override.
  • Another issue is that if you navigate away from the filter selection, the filters will not show as selected when re-opening the filter dropdown until another one is selected.

Initially linked to https://github.com/Automattic/jetpack-manage/issues/323

Testing Instructions

  • To test, apply this PR and then from the filter dropdown select multiple filters. Each should show as selected. If you click 'Needs Attention' the others will be unselected. If you click either reset button, the options will be reset.
  • You will likely notice the existing issues as well (notes above).

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • https://wpcalypso.wordpress.com/devdocs/docs/testing/index.md 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)?

@coder-karen coder-karen added [Status] In Progress Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Feb 27, 2024
@coder-karen coder-karen self-assigned this Feb 27, 2024
Copy link

github-actions bot commented Feb 27, 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

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/jp-manage-multi-filter-selection-sites-dashboard on your sandbox.

@matticbot
Copy link
Contributor

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

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

name                   parsed_size           gzip_size
entry-stepper               +234 B  (+0.0%)     +101 B  (+0.0%)
entry-main                  +234 B  (+0.0%)      +95 B  (+0.0%)
entry-subscriptions         +126 B  (+0.0%)      +48 B  (+0.0%)
entry-login                 +126 B  (+0.0%)      +48 B  (+0.0%)
entry-domains-landing       +126 B  (+0.0%)      +48 B  (+0.0%)
entry-browsehappy           +126 B  (+0.1%)      +48 B  (+0.1%)

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

Sections (~905 bytes added 📈 [gzipped])

name                           parsed_size           gzip_size
jetpack-cloud-agency-sites-v2      +1470 B  (+0.1%)     +387 B  (+0.1%)
settings-jetpack                    -300 B  (-0.1%)      -28 B  (-0.0%)
home                                +196 B  (+0.0%)     +531 B  (+0.1%)
site-purchases                      -103 B  (-0.0%)      -29 B  (-0.0%)
purchases                           -103 B  (-0.0%)      -29 B  (-0.0%)
jetpack-search                      +103 B  (+0.0%)      +29 B  (+0.0%)
email                               -103 B  (-0.0%)     -133 B  (-0.1%)
domains                              -90 B  (-0.0%)       +2 B  (+0.0%)
activity                             -52 B  (-0.0%)      +58 B  (+0.0%)
scan                                 -39 B  (-0.0%)     -136 B  (-0.1%)
backup                               -39 B  (-0.0%)      +16 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.

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.

Comment on lines +69 to +75
{ value: 1, label: translate( 'Needs Attention' ) },
{ value: 2, label: translate( 'Backup Failed' ) },
{ value: 3, label: translate( 'Backup Warning' ) },
{ value: 4, label: translate( 'Threat Found' ) },
{ value: 5, label: translate( 'Site Disconnected' ) },
{ value: 6, label: translate( 'Site Down' ) },
{ value: 7, label: translate( 'Plugins Needing Updates' ) },
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add these translations to another PR, as this PR is now 'on hold' (or rather just existing as a 'just in case').

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) [Status] Blocked / Hold
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants