wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Shadow Help Center styles in wp-admin and Gutenberg

Open alshakero opened this issue 1 year ago • 4 comments

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

  1. In apps/help-center run yarn dev --sync.
  2. Test in wp-admin/post-new.php and wp-admin.
  3. 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.

alshakero avatar Aug 16 '24 14:08 alshakero

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.

matticbot avatar Aug 16 '24 14:08 matticbot

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.

matticbot avatar Aug 16 '24 14:08 matticbot

~~Since styles are shadowed now, we lost the styles of the Help Button.~~

Fixed.

alshakero avatar Aug 16 '24 15:08 alshakero