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

WIP Upgrade @wordpress/edit-site to 4.9.0 #73078

Closed
wants to merge 1 commit into from

Conversation

arthur791004
Copy link
Contributor

@arthur791004 arthur791004 commented Feb 8, 2023

Related to #71038, #71917

Proposed Changes

Referring to #71917, when we're working on adding the font pairings variations to the site assembler, we need to "@wordpress/edit-site: ^4.9.0" and "@wordpress/blocks: ^11.11.0" to support changing the font family of the heading via the elements.heading. So, this PR proposes to upgrade those 2 packages first

TODOs

  • Fix unit tests

Testing Instructions

  • TBD

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

@arthur791004 arthur791004 self-assigned this Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

@arthur791004
Copy link
Contributor Author

@tyxla @noahtallen I'm trying to upgrade both @wordpress/edit-site and @wordpress/blocks packages to get the latest features, do you have any test cases or instructions to ensure everything works as before? thanks

@matticbot
Copy link
Contributor

matticbot commented Feb 8, 2023

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

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

name                   parsed_size           gzip_size
entry-gutenboarding       +74509 B  (+3.3%)   +22964 B  (+3.5%)
entry-stepper               +309 B  (+0.0%)     +174 B  (+0.0%)
entry-main                  +162 B  (+0.0%)     +148 B  (+0.0%)
entry-login                 +126 B  (+0.0%)     +110 B  (+0.0%)
entry-domains-landing       +126 B  (+0.0%)     +110 B  (+0.1%)
entry-browsehappy           +126 B  (+0.1%)     +110 B  (+0.3%)

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

Sections (~8992 bytes added 📈 [gzipped])

name                          parsed_size           gzip_size
gutenberg-editor                  +7933 B  (+1.5%)    +2808 B  (+1.7%)
site-setup-flow                    +597 B  (+0.0%)      -53 B  (-0.0%)
import-flow                        +597 B  (+0.0%)      -53 B  (-0.0%)
promote-post                       +463 B  (+0.1%)      +78 B  (+0.1%)
plugins                            +392 B  (+0.0%)      +59 B  (+0.0%)
with-theme-assembler-flow          +382 B  (+0.2%)      -94 B  (-0.1%)
marketplace                        +294 B  (+0.0%)      +41 B  (+0.0%)
media                              +215 B  (+0.0%)      +39 B  (+0.0%)
account                            +215 B  (+0.0%)      +39 B  (+0.0%)
themes                             +177 B  (+0.0%)      +20 B  (+0.0%)
sites-dashboard                    -169 B  (-0.0%)      -37 B  (-0.0%)
site-purchases                     -169 B  (-0.0%)      -37 B  (-0.0%)
purchases                          -169 B  (-0.0%)      -37 B  (-0.0%)
plans                              -169 B  (-0.0%)      -37 B  (-0.0%)
people                             -169 B  (-0.0%)      -37 B  (-0.0%)
jetpack-cloud-partner-portal       -169 B  (-0.0%)      -37 B  (-0.0%)
home                               -169 B  (-0.0%)      -37 B  (-0.0%)
checkout                           -169 B  (-0.0%)      -37 B  (-0.0%)
newsletter-post-setup-flow          +82 B  (+0.0%)      +41 B  (+0.1%)
newsletter-flow                     +82 B  (+0.0%)      +41 B  (+0.0%)
settings                            +46 B  (+0.0%)       +2 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 (~255893 bytes added 📈 [gzipped])

name                                                                 parsed_size            gzip_size
async-load-automattic-design-preview-src-components-style-variation    +836215 B  (+71.6%)  +249223 B  (+71.3%)
async-load-automattic-design-preview                                   +835744 B  (+75.8%)  +249035 B  (+75.6%)
async-load-screen-color-palettes                                        +14458 B   (+1.6%)    +3363 B   (+1.2%)
async-load-pattern-assembler-container                                  +14458 B   (+1.6%)    +3372 B   (+1.2%)
async-load-design-wordpress-components-gallery                           +1935 B   (+0.3%)      +80 B   (+0.0%)
async-load-pattern-list-renderer                                         -1002 B   (-0.1%)     -744 B   (-0.3%)
async-load-pattern-large-preview                                         -1002 B   (-0.1%)     -744 B   (-0.3%)
async-load-calypso-components-web-preview-component                       +463 B   (+0.1%)      +78 B   (+0.1%)
async-load-automattic-help-center                                         +294 B   (+0.0%)      +41 B   (+0.0%)
async-load-quick-language-switcher                                        +215 B   (+0.2%)      +39 B   (+0.1%)
async-load-design-playground                                              +215 B   (+0.0%)      +39 B   (+0.0%)
async-load-design-blocks                                                  +215 B   (+0.0%)      +39 B   (+0.0%)
async-load-calypso-post-editor-media-modal                                +215 B   (+0.0%)      +39 B   (+0.0%)
async-load-calypso-post-editor-editor-media-modal                         +215 B   (+0.0%)      +39 B   (+0.0%)
async-load-calypso-lib-account-settings-helper                            +215 B   (+0.1%)      +39 B   (+0.0%)
async-load-signup-steps-domains                                           +177 B   (+0.0%)      +20 B   (+0.0%)
async-load-masterbar-help-center                                          -169 B   (-0.6%)      -37 B   (-0.5%)
async-load-calypso-my-sites-checkout-modal                                -169 B   (-0.0%)      -37 B   (-0.0%)
async-load-calypso-layout-masterbar-checkout-tsx                          -169 B   (-0.1%)      -37 B   (-0.1%)
async-load-calypso-layout-masterbar-checkout                              -169 B   (-0.3%)      -37 B   (-0.2%)
async-load-calypso-blocks-editor-checkout-modal                           -169 B   (-0.0%)      -37 B   (-0.0%)
async-load-design                                                          +46 B   (+0.0%)       +2 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.

@tyxla
Copy link
Member

tyxla commented Feb 8, 2023

From my understanding, it's not a good idea to update only package X and Y but keep the other packages behind. Often packages have their interconnected dependencies and using different versions can lead to subtle bugs. That's why I'd recommend upgrading all packages at the same time, and if the upgrade is too big, just do it incrementally and upgrade to an older version for all packages in a single PR. I know it's troublesome, but we're currently quite behind on the @wordpress packages since Renovate was disabled over a year ago.

cc @noahtallen for feedback as well.

@arthur791004
Copy link
Contributor Author

arthur791004 commented Feb 9, 2023

Often packages have their interconnected dependencies and using different versions can lead to subtle bugs.

Yes, I totally agreed! But I think @wordpress/edit-site and @wordpress/blocks are not used in calypso widely, so it might be okay to do the partial upgrading 🤔

Or do we have any plans to upgrade @wordpress packages?

@tyxla
Copy link
Member

tyxla commented Feb 9, 2023

Or do we have any plans to upgrade @wordpress packages?

Yes, this is something that both @Automattic/team-calypso-platform and @Automattic/team-calypso-frameworks are interested to tackle in the short term.

@tyxla
Copy link
Member

tyxla commented Feb 9, 2023

I've started some early experiments in #73155 but they're far from where we should be. I'll continue next week and keep y'all posted.

@arthur791004
Copy link
Contributor Author

That's really nice, thanks 👍

@arthur791004 arthur791004 changed the title Upgrade @wordpress/edit-site to 4.9.0 WIP Upgrade @wordpress/edit-site to 4.9.0 Feb 24, 2023
@arthur791004 arthur791004 force-pushed the upgrade/wp-edit-site branch from 89397e6 to 33a0b90 Compare March 2, 2023 03:34
@tyxla
Copy link
Member

tyxla commented Mar 2, 2023

@arthur791004 just a heads up that we're working on the mass @wordpress package upgrade in a second approach in #73890.

@arthur791004
Copy link
Contributor Author

@tyxla Thanks for the reminder! I've also noticed that 😆

@arthur791004
Copy link
Contributor Author

Closing it in favor of #73890

@arthur791004 arthur791004 deleted the upgrade/wp-edit-site branch March 10, 2023 06:56
@tyxla
Copy link
Member

tyxla commented Mar 10, 2023

👍

Thanks for your testing of #73890 @arthur791004 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants