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

Sites Dashboard: Add migration status to site header #95671

Open
wants to merge 3 commits into
base: add/site-overview-pending-migration
Choose a base branch
from

Conversation

m1r0
Copy link
Member

@m1r0 m1r0 commented Oct 24, 2024

Resolves #95589
Based on #95497

Proposed Changes

  • When the migration status is "pending", updates the site title to "Incoming Migration", changes to icon, and adds the "migration pending" status in the site header.
  • Fixes the site title being updated to "Incoming Migration" when the migration status is "started". In the design, it's updated only when the status is "pending".

Testing Instructions

  • Have a blog with the "pending" migration status.
  • Go to /sites, click on the blog, and make sure the site heading has the "Incoming Migration" title, custom icon, and the "migration pending" status added to it.
image

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

@m1r0 m1r0 self-assigned this Oct 24, 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 add/migration-status-to-site-header 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 (~211 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper       +499 B  (+0.0%)     +211 B  (+0.0%)
entry-main          +499 B  (+0.0%)     +211 B  (+0.0%)
entry-login         +283 B  (+0.0%)     +133 B  (+0.0%)

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

Sections (~1829 bytes removed 📉 [gzipped])

name                parsed_size           gzip_size
hosting                 +2879 B  (+0.2%)    +1508 B  (+0.3%)
hosting-features         +266 B  (+0.0%)     +206 B  (+0.1%)
site-monitoring          +157 B  (+0.0%)      +52 B  (+0.0%)
site-logs                +157 B  (+0.0%)      +52 B  (+0.0%)
github-deployments       +157 B  (+0.0%)      +59 B  (+0.0%)
settings                 +133 B  (+0.0%)      +50 B  (+0.0%)
staging-site              -37 B  (-0.0%)     +144 B  (+0.0%)
sites-dashboard           +24 B  (+0.0%)      +13 B  (+0.0%)
site-performance          +24 B  (+0.0%)      +13 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 (~50 bytes added 📈 [gzipped])

name                                       parsed_size           gzip_size
async-load-calypso-layout-command-palette       +133 B  (+0.1%)      +50 B  (+0.1%)

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.

Comment on lines +83 to +84
const isMigrationPending = getMigrationStatus( site ) === 'pending';
const siteTitle = isMigrationPending ? translate( 'Incoming Migration' ) : site.title;
Copy link
Member Author

@m1r0 m1r0 Oct 24, 2024

Choose a reason for hiding this comment

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

This fixes the site title being updated to "Incoming Migration" when the migration status is "started". In the design, it's updated only when the status is "pending".

@m1r0 m1r0 marked this pull request as ready for review October 24, 2024 15:52
@m1r0 m1r0 requested a review from a team October 24, 2024 15:53
@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 Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post-purchase Migration Experience: Add status to site header for pending migrations
2 participants