Shadow Help Center styles in wp-admin and Gutenberg
Proposed Changes
This wraps the Help Center in a shadow root to prevent styles from leaking in and out of the Help Center.
Why are these changes being made?
The Help Center styles can break a few things and be broken by a few things because the Help Center runs in many places under several environments.
Testing Instructions
- In
apps/help-centerrunyarn dev --sync. - Test in wp-admin/post-new.php and wp-admin.
- Make sure every route of the Help Center is well-styled.
Next
~~Once this is live. We can merge this.~~
We don't need this anymore.
Jetpack Cloud live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-117927&env=jetpack |
Automattic for Agencies live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-117927&env=a8c-for-agencies |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:
Async-loaded Components (~240 bytes added 📈 [gzipped])
name parsed_size gzip_size
async-load-automattic-help-center +627 B (+0.1%) +240 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.
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
To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/help-center-in-shadow on your sandbox.
~~Since styles are shadowed now, we lost the styles of the Help Button.~~
Fixed.