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

Start: Refactor loading component in processing screen #100148

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

agrullon95
Copy link
Contributor

@agrullon95 agrullon95 commented Feb 21, 2025

Related to #99256 (comment)

Proposed Changes

  • Update loading state from ellipsis to indeterminate progress bar

Why are these changes being made?

  • Unify loading states

Testing Instructions

  • Checkout or use live link
  • Navigate to https://wordpress.com/pricing/ and select any plan. Update the URL to use localhost.
  • Verify you see the indeterminate progress bar after selecting a domain

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

@agrullon95 agrullon95 requested a review from a team February 21, 2025 15:14
@agrullon95 agrullon95 self-assigned this Feb 21, 2025
@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 Feb 21, 2025
@matticbot
Copy link
Contributor

matticbot commented Feb 21, 2025

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

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

name                   parsed_size           gzip_size
entry-stepper               -464 B  (-0.0%)      -65 B  (-0.0%)
entry-subscriptions         -380 B  (-0.0%)      -59 B  (-0.0%)
entry-login                 -380 B  (-0.0%)      -59 B  (-0.0%)
entry-domains-landing       -380 B  (-0.1%)      -59 B  (-0.0%)
entry-browsehappy           -380 B  (-0.2%)      -59 B  (-0.1%)
entry-main                  -296 B  (-0.0%)      -54 B  (-0.0%)

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

Sections (~1571 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
signup                               +5769 B  (+2.0%)    +2350 B  (+3.7%)
async-step-unified-plans             -1244 B  (-0.1%)      -63 B  (-0.0%)
update-design-flow                   -1210 B  (-0.1%)      -46 B  (-0.0%)
async-step-unified-domains           -1210 B  (-0.1%)      -39 B  (-0.0%)
write-flow                             +34 B  (+0.0%)      +24 B  (+0.0%)
transferring-hosted-site-flow          +34 B  (+0.0%)      +16 B  (+0.0%)
themes                                 +34 B  (+0.0%)      +21 B  (+0.0%)
theme                                  +34 B  (+0.0%)      +21 B  (+0.0%)
switch-site                            +34 B  (+0.0%)      +22 B  (+0.0%)
subscribers                            +34 B  (+0.0%)      +17 B  (+0.0%)
stats                                  +34 B  (+0.0%)      +15 B  (+0.0%)
staging-site                           +34 B  (+0.0%)      +17 B  (+0.0%)
sites-dashboard                        +34 B  (+0.0%)      +17 B  (+0.0%)
site-tools                             +34 B  (+0.0%)      +17 B  (+0.0%)
site-settings                          +34 B  (+0.0%)      +17 B  (+0.0%)
site-purchases                         +34 B  (+0.0%)      +17 B  (+0.0%)
site-performance                       +34 B  (+0.0%)      +17 B  (+0.0%)
site-overview                          +34 B  (+0.0%)      +17 B  (+0.0%)
site-monitoring                        +34 B  (+0.0%)      +17 B  (+0.0%)
site-marketing                         +34 B  (+0.0%)      +17 B  (+0.0%)
site-logs                              +34 B  (+0.0%)      +17 B  (+0.0%)
settings                               +34 B  (+0.0%)      +22 B  (+0.0%)
reader                                 +34 B  (+0.0%)      +17 B  (+0.0%)
purchases                              +34 B  (+0.0%)      +17 B  (+0.0%)
promote-post-i2                        +34 B  (+0.0%)      +15 B  (+0.0%)
posts-custom                           +34 B  (+0.0%)      +24 B  (+0.0%)
posts                                  +34 B  (+0.0%)      +24 B  (+0.0%)
plugins                                +34 B  (+0.0%)      +17 B  (+0.0%)
people                                 +34 B  (+0.0%)      +16 B  (+0.0%)
migrate                                +34 B  (+0.0%)      +22 B  (+0.0%)
media                                  +34 B  (+0.0%)      +15 B  (+0.0%)
marketing                              +34 B  (+0.0%)      +18 B  (+0.0%)
jetpack-connect                        +34 B  (+0.0%)      +22 B  (+0.0%)
jetpack-cloud-plugin-management        +34 B  (+0.0%)      +17 B  (+0.0%)
jetpack-cloud-overview                 +34 B  (+0.0%)      +17 B  (+0.0%)
jetpack-cloud-agency-dashboard         +34 B  (+0.0%)      +18 B  (+0.0%)
jetpack-cloud                          +34 B  (+0.0%)      +22 B  (+0.0%)
import-hosted-site-flow                +34 B  (+0.0%)      +22 B  (+0.0%)
import                                 +34 B  (+0.0%)      +18 B  (+0.0%)
hosting-features                       +34 B  (+0.0%)      +17 B  (+0.0%)
hosting                                +34 B  (+0.0%)      +17 B  (+0.0%)
home                                   +34 B  (+0.0%)      +16 B  (+0.0%)
gutenberg-editor                       +34 B  (+0.0%)      +26 B  (+0.0%)
github-deployments                     +34 B  (+0.0%)      +17 B  (+0.0%)
email                                  +34 B  (+0.0%)      +17 B  (+0.0%)
earn                                   +34 B  (+0.0%)      +15 B  (+0.0%)
domains                                +34 B  (+0.0%)      +17 B  (+0.0%)
copy-site-flow                         +34 B  (+0.0%)      +24 B  (+0.0%)
checkout                               +34 B  (+0.0%)       +2 B  (+0.0%)
build-flow                             +34 B  (+0.0%)      +24 B  (+0.0%)
backup                                 +34 B  (+0.0%)      +18 B  (+0.0%)
a8c-for-agencies-team                  +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-sites                 +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-referrals             +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-plugins               +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-overview              +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-migrations            +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-marketplace           +34 B  (+0.0%)      +17 B  (+0.0%)
a8c-for-agencies-client                +34 B  (+0.0%)      +17 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 (~16187 bytes removed 📉 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal                                            -7337 B  (-0.4%)    -2455 B  (-0.5%)
async-load-signup-steps-initial-intent                                                -4801 B  (-4.3%)    -1638 B  (-4.4%)
async-load-signup-steps-user                                                          -4746 B  (-1.9%)    -1348 B  (-1.7%)
async-load-signup-steps-site-picker                                                   -4610 B  (-1.9%)    -1699 B  (-2.2%)
async-load-signup-steps-difm-site-picker                                              -4610 B  (-1.9%)    -1704 B  (-2.2%)
async-load-signup-steps-theme-selection                                               -4609 B  (-1.4%)    -1337 B  (-1.3%)
async-load-signup-steps-woocommerce-install-step-business-info                        -4605 B  (-3.7%)    -1353 B  (-3.3%)
async-load-signup-steps-plans-theme-preselected                                       -4605 B  (-1.0%)    -1384 B  (-0.9%)
async-load-signup-steps-plans                                                         -4605 B  (-1.0%)    -1391 B  (-0.9%)
async-load-signup-steps-domains                                                       -4605 B  (-0.7%)    -1381 B  (-0.7%)
async-load-signup-steps-woocommerce-install-step-store-address                        -1962 B  (-1.9%)     -613 B  (-1.8%)
async-load-signup-steps-design-picker                                                   -84 B  (-0.1%)       -9 B  (-0.0%)
async-load-design-wordpress-components-gallery                                          +34 B  (+0.0%)      +22 B  (+0.0%)
async-load-design-blocks                                                                +34 B  (+0.0%)      +16 B  (+0.0%)
async-load-comment-block-editor                                                         +34 B  (+0.0%)      +23 B  (+0.0%)
async-load-calypso-post-editor-media-modal                                              +34 B  (+0.0%)      +18 B  (+0.0%)
async-load-calypso-layout-command-palette                                               +34 B  (+0.0%)      +22 B  (+0.0%)
async-load-calypso-jetpack-cloud-sections-sidebar-navigation-manage-selected-...        +34 B  (+0.0%)      +22 B  (+0.1%)
async-load-calypso-components-web-preview-component                                     +34 B  (+0.0%)      +24 B  (+0.0%)
async-load-automattic-help-center-stepper                                               +34 B  (+0.0%)      +22 B  (+0.0%)
async-load-automattic-help-center                                                       +34 B  (+0.0%)      +22 B  (+0.0%)

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.

@agrullon95 agrullon95 changed the title Refactor loading component in processing screen and update styles Start: Refactor loading component in processing screen Feb 21, 2025
@matticbot
Copy link
Contributor

matticbot commented Feb 21, 2025

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

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

  • blaze-dashboard
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/start-loph-pricing-loading on your sandbox.

Copy link
Contributor

@escapemanuele escapemanuele left a comment

Choose a reason for hiding this comment

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

I see this

image

<h1 className="processing-screen__progress-step">{ steps.current[ currentStep ]?.title }</h1>
{ shouldShowNewSpinner && <LoadingEllipsis /> }
{ shouldShowNewSpinner && (
<Loading title={ steps.current[ currentStep ]?.title } progress={ progress } />
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe progress is passed here as a value 0 < progress < 1, while the Loading component goes from 0 to 100.

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.

3 participants