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

Show the expert banner across the theme tabs except for My Themes

Open southp opened this issue 2 years ago • 2 comments

Proposed Changes

Testing Instructions

Pre-merge Checklist

  • [ ] 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)?

Related to #

southp avatar Sep 22 '22 08:09 southp

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

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

name                   parsed_size           gzip_size
entry-main                  -226 B  (-0.0%)      -34 B  (-0.0%)
entry-login                 -226 B  (-0.0%)      -34 B  (-0.0%)
entry-gutenboarding         -226 B  (-0.0%)      -34 B  (-0.0%)
entry-domains-landing       -226 B  (-0.0%)      -34 B  (-0.0%)
entry-browsehappy           -226 B  (-0.2%)      -34 B  (-0.1%)
entry-stepper                +75 B  (+0.0%)      -70 B  (-0.0%)

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

Sections (~1225 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
themes                                +874 B  (+0.1%)     +264 B  (+0.1%)
site-purchases                        +404 B  (+0.0%)      +73 B  (+0.0%)
settings                              +404 B  (+0.1%)      +81 B  (+0.0%)
purchases                             +404 B  (+0.0%)      +73 B  (+0.0%)
plugins                               +404 B  (+0.0%)      +83 B  (+0.0%)
plans                                 +404 B  (+0.0%)      +75 B  (+0.0%)
people                                +404 B  (+0.1%)      +81 B  (+0.0%)
jetpack-cloud-partner-portal          +404 B  (+0.1%)      +79 B  (+0.1%)
email                                 +404 B  (+0.1%)      +81 B  (+0.0%)
domains                               +404 B  (+0.0%)      +73 B  (+0.0%)
backup                                +404 B  (+0.0%)      +76 B  (+0.0%)
activity                              +404 B  (+0.1%)      +76 B  (+0.0%)
settings-security                     +390 B  (+0.1%)      +85 B  (+0.1%)
settings-writing                      +364 B  (+0.1%)      +65 B  (+0.0%)
media                                 +364 B  (+0.0%)      +73 B  (+0.0%)
jetpack-cloud-agency-dashboard        +364 B  (+0.1%)      +59 B  (+0.0%)
hosting                               +364 B  (+0.1%)      +71 B  (+0.0%)
earn                                  +364 B  (+0.1%)      +81 B  (+0.1%)
settings-performance                  +327 B  (+0.1%)      +42 B  (+0.0%)
marketing                             +301 B  (+0.0%)      +31 B  (+0.0%)
stats                                 +287 B  (+0.0%)      +11 B  (+0.0%)
theme                                 +261 B  (+0.1%)      +71 B  (+0.0%)
posts-custom                          +261 B  (+0.0%)      +28 B  (+0.0%)
posts                                 +261 B  (+0.0%)      +28 B  (+0.0%)
reader                                 -40 B  (-0.0%)      -13 B  (-0.0%)
promote-post                           -40 B  (-0.0%)      -12 B  (-0.0%)
preview                                -40 B  (-0.0%)      -13 B  (-0.0%)
pages                                  -40 B  (-0.0%)      -12 B  (-0.0%)
jetpack-cloud-plugin-management        -40 B  (-0.0%)      -17 B  (-0.0%)
gutenberg-editor                       -40 B  (-0.0%)      -14 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.

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

name                                                         parsed_size           gzip_size
async-load-calypso-reader-sidebar                                 +560 B  (+0.4%)     +910 B  (+2.3%)
async-load-calypso-post-editor-editor-media-modal                 +560 B  (+0.0%)     +712 B  (+0.2%)
async-load-calypso-my-sites-current-site-notice                   +560 B  (+0.5%)     +885 B  (+3.0%)
async-load-calypso-components-web-preview-component               +560 B  (+0.1%)     +806 B  (+0.5%)
async-load-calypso-blocks-jitm-templates-sidebar-banner           +560 B  (+0.6%)     +668 B  (+2.6%)
async-load-calypso-blocks-jitm-templates-notice                   +560 B  (+0.6%)     +651 B  (+2.5%)
async-load-calypso-blocks-jitm-templates-default                  +560 B  (+0.6%)     +659 B  (+2.6%)
async-load-design-playground                                      +430 B  (+0.0%)      +73 B  (+0.0%)
async-load-design                                                 +430 B  (+0.0%)      +73 B  (+0.0%)
async-load-signup-steps-domains                                   +404 B  (+0.1%)      +81 B  (+0.1%)
async-load-design-blocks                                          +301 B  (+0.0%)      +40 B  (+0.0%)
async-load-calypso-blocks-jitm                                    -120 B  (-1.2%)      -11 B  (-0.3%)
async-load-signup-steps-design-picker                              -40 B  (-0.0%)      -15 B  (-0.0%)
async-load-calypso-my-sites-site-settings-seo-settings-form        -40 B  (-0.0%)      -12 B  (-0.0%)
async-load-calypso-my-sites-sidebar                                -40 B  (-0.0%)      -19 B  (-0.1%)
async-load-calypso-components-jetpack-sidebar                      -40 B  (-0.0%)      -19 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 22 '22 08:09 matticbot

Unrelated to the specific test but I wanted to note it somewhere: the dismiss icon appears misaligned vertically.

image

ianstewart avatar Sep 23 '22 15:09 ianstewart

Log in as a user who has never dismissed the expert banner.

Having some difficulty with step 1 here and Calypso live. Not sure if me.

ianstewart avatar Sep 23 '22 16:09 ianstewart

@ianstewart Thanks for dropping by ✋🏼

Having some difficulty with step 1 here and Calypso live. Not sure if me.

Could you tell me more about the difficulty here? Here is what I just did and it worked for me:

  1. Access the calypso.live instance in an anonymous browser
  2. Sign up as a new user
  3. Go to /theme and see the banner.

I'd be happy to see how I can help your case. Plus, it could be a case that I didn't address in my code ;)

southp avatar Sep 26 '22 06:09 southp

This is old stuff from my notes, and might not work anymore, but running this in JS console might un-dismiss the banner for you:

dispatch( { type: 'PREFERENCES_SET', key: 'appBannerDismissTimes', value: null } );

Also WP CLI command:

wp user-attributes undismiss_a_banner --user_id=123456 --banner=dismissible-card-activity-upgrade-banner-jetpack

Here you might have the full list of dimisssed banners to find the banner key, in wpsh:

return get_user_attribute( <USER ID>, 'calypso_preferences' );

(you'd need to change they key to right one of course)

simison avatar Sep 26 '22 08:09 simison