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

Self-service site restore: remove second sites query for deleted sites #90112

Merged
merged 3 commits into from
May 2, 2024

Conversation

mpkelly
Copy link
Contributor

@mpkelly mpkelly commented Apr 30, 2024

Related to #89997 (comment)

Proposed Changes

  • Don't do a separate query for deleted sites and merge them with active sites when the user requests "all". Instead, update the backend to return deleted sites with all sites (see D147075-code)

Testing Instructions

  • Make sure you have some deleted sites that are visible on the trunk when filtering to the status "deleted". Note the slugs.
  • Apply D147075-code
  • Apply patch Site Restore: Add is_deleted attribute to sites api response to flag deleted sites jetpack#37142 to your sandbox
  • Test this on Calypso Live or local branch
  • You can find your deleted sites when filtering to "all" now because of D147075-code
  • You can also filter to "deleted" and see only your deleted sites
  • You should not see deleted sites on the /setup/migrate-hosted-site and /setup/import-focused flows.

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

@mpkelly mpkelly self-assigned this Apr 30, 2024
@matticbot
Copy link
Contributor

matticbot commented Apr 30, 2024

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

App Entrypoints (~42 bytes removed 📉 [gzipped])

name           parsed_size           gzip_size
entry-stepper        -83 B  (-0.0%)      -42 B  (-0.0%)
entry-main           -83 B  (-0.0%)      -42 B  (-0.0%)
entry-login          -83 B  (-0.0%)      -42 B  (-0.0%)

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

Sections (~40 bytes removed 📉 [gzipped])

name                     parsed_size           gzip_size
sites-dashboard               -156 B  (-0.0%)      -33 B  (-0.0%)
site-monitoring               -156 B  (-0.0%)      -33 B  (-0.0%)
hosting                       -156 B  (-0.0%)      -33 B  (-0.0%)
github-deployments            -156 B  (-0.0%)      -33 B  (-0.0%)
import-hosted-site-flow        -63 B  (-0.0%)      -18 B  (-0.0%)
import-flow                    -46 B  (-0.0%)       -7 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.

@matticbot
Copy link
Contributor

matticbot commented Apr 30, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/change-deleted-state-filter-logic on your sandbox.

@mpkelly mpkelly requested a review from a team April 30, 2024 15:34
@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 Apr 30, 2024
@mpkelly mpkelly requested a review from a team as a code owner May 1, 2024 09:13
@mpkelly mpkelly removed the request for review from a team May 1, 2024 11:08
Copy link
Contributor

@vykes-mac vykes-mac left a comment

Choose a reason for hiding this comment

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

Ready to merge once the jetpack changes are on WPCOM. I already merge that PR

@mpkelly mpkelly merged commit 7072d3a into trunk May 2, 2024
13 of 14 checks passed
@mpkelly mpkelly deleted the update/change-deleted-state-filter-logic branch May 2, 2024 08:10
@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 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants