Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Dynamically change color scheme from color_scheme query param #96557

Closed moon0326 closed 18 hours ago

moon0326 commented 2 days ago

Related to https://github.com/woocommerce/woocommerce/issues/52875

Proposed Changes

Testing Instructions

  1. Checkout this branch locally and run yarn start
  2. Once the build is ready, visit this link
  3. Confirm the color scheme is sunrise
  4. Copy the link and search for color_scheme
  5. Change it to one of the supported color schemes and revisit the link.
  6. Confirm the color scheme change.

Supported color schemes:

Pre-merge Checklist

github-actions[bot] commented 2 days ago
Calypso Live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125207
Jetpack Cloud live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125207&env=jetpack
Automattic for Agencies live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125207&env=a8c-for-agencies
matticbot commented 2 days ago

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

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

``` name parsed_size gzip_size entry-stepper +956 B (+0.0%) +36 B (+0.0%) entry-main +956 B (+0.0%) +36 B (+0.0%) entry-login +956 B (+0.0%) +36 B (+0.0%) ``` Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~10 bytes added 📈 [gzipped])

``` name parsed_size gzip_size purchase-product +29 B (+0.0%) +10 B (+0.0%) jetpack-connect +29 B (+0.0%) +10 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 commented 1 day ago

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

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

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/52876-persist-user-admin-color-scheme-on-wpcom-jpc on your sandbox.