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

SSR: Enable Login Section SSR for Mag-16 Locales #94718

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

Conversation

yuliyan
Copy link
Member

@yuliyan yuliyan commented Sep 19, 2024

Related to #94712

Proposed Changes

  • Enable SSR for the Login section for Mag-16 locales.

Why are these changes being made?

  • We're looking to add localized meta description to the Login section. To achieve that, we need to enable SSR and load the locale data for Mag-16 locales.

Testing Instructions

  • Code review.
  • Visit /log-in/{mag-16-locale}, for example /log-in/de, and verify the SSR page source is localized.
  • Visit /log-in and verify the page is served in English and verify previous behavior remains unchanged.
  • Visit the Login section for non-mag-16 locale, for example /log-in/bg and verify the page is rendered on the client side and localized, i.e. works as it did before the changes.

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

@yuliyan yuliyan added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. i18n Server Side Rendering Login labels Sep 19, 2024
@yuliyan yuliyan requested a review from a team September 19, 2024 13:34
@matticbot
Copy link
Contributor

matticbot commented Sep 19, 2024

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

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

name                   parsed_size            gzip_size
entry-login              +466186 B  (+29.9%)  +126325 B  (+27.3%)
entry-subscriptions        +1007 B   (+0.1%)    -2267 B   (-0.4%)
entry-main                  +905 B   (+0.0%)     -991 B   (-0.2%)
entry-stepper               -873 B   (-0.0%)    -1029 B   (-0.2%)
entry-domains-landing       -671 B   (-0.1%)     -524 B   (-0.3%)
entry-browsehappy           -445 B   (-0.2%)     -122 B   (-0.2%)

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

Async-loaded Components (~53216 bytes removed 📉 [gzipped])

name                                                                              parsed_size             gzip_size
async-load-calypso-layout-masterbar-checkout-tsx                                    -114691 B  (deleted)   -39903 B  (deleted)
async-load-calypso-blocks-support-article-dialog-dialog                             -101846 B   (-54.0%)   -30933 B   (-52.4%)
async-load-automattic-help-center                                                    +17348 B    (+3.1%)    +4771 B    (+2.9%)
async-load-calypso-lib-store-sandbox-helper                                          -16262 B   (-32.0%)    -4432 B   (-30.0%)
async-load-purchase-modal-wrapper                                                     +6836 B    (+1.9%)    +2157 B    (+1.9%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...      +6836 B    (+1.9%)    +2147 B    (+2.0%)
async-load-calypso-state-lib-automated-transfer-middleware                            -6343 B   (-23.7%)    -2221 B   (-26.8%)
async-load-calypso-lib-account-settings-helper                                        -5431 B    (-3.4%)    -1544 B    (-3.2%)
async-load-calypso-lib-preferences-helper                                             -4153 B   (-48.7%)    -1370 B   (-51.3%)
async-load-calypso-layout-command-palette                                             +3972 B    (+1.9%)    +1473 B    (+2.6%)
async-load-masterbar-launchpad-navigator                                              +3776 B    (+6.7%)     +975 B    (+5.5%)
async-load-calypso-blocks-jitm-templates-home-task                                    +3776 B    (+9.4%)     +977 B    (+6.7%)
async-load-automattic-whats-new                                                       +3776 B   (+16.8%)     +967 B   (+12.1%)
async-load-calypso-lib-react-query-devtools-helper                                    -1528 B  (deleted)     -684 B  (deleted)
async-load-calypso-components-sites-popover                                           +1008 B    (+0.8%)     +425 B    (+1.1%)
async-load-calypso-blocks-support-article-dialog                                      -1008 B   (-35.4%)     -269 B   (-24.3%)
async-load-calypso-layout-masterbar-drafts-popover                                     +567 B    (+2.0%)     +272 B    (+3.0%)
async-load-calypso-notifications                                                       +513 B    (+0.3%)     +131 B    (+0.2%)
async-load-calypso-lib-network-connection                                              -369 B    (-8.1%)     -146 B    (-8.4%)
async-load-calypso-components-jetpack-portal-nav                                       +248 B    (+0.5%)      +68 B    (+0.5%)
async-load-calypso-layout-masterbar-checkout                                           -196 B    (-0.3%)     -547 B    (-2.2%)

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.

@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

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats
  • whats-new
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/localized-login-ssr on your sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Login Server Side Rendering [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.

2 participants