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

Help Center: only check chat availability when user is eligible

Open alshakero opened this issue 3 years ago • 3 comments

Proposed Changes

Testing Instructions

  1. Start ETK by going in apps/editing-toolkit and running yarn dev --sync.
  2. Open DevTools and go to the Network tab. Filter by WS.
  3. Using a free user, go to the editor of a sandboxed site.
  4. You shouldn't see a WebSocket connection to Happychat server.
  5. Repeat with a premium user, you should see a connection.

alshakero avatar Sep 20 '22 17:09 alshakero

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit fix/only-check-chat-avail-for-eligible-users on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

matticbot avatar Sep 20 '22 17:09 matticbot

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

Async-loaded Components (~26 bytes added 📈 [gzipped])

name                               parsed_size           gzip_size
async-load-automattic-help-center       +122 B  (+0.0%)      +26 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.

matticbot avatar Sep 20 '22 17:09 matticbot