New Zendesk Client Package
Proposed Changes
This moves all of the hooks in Help Center that were used to manage the connection to Zendesk Messaging into its own package. The hooks were:
- useCanConnectToZendesk
- useZendeskMessaging
- openChatWidget
- useMessagingAuth
- useMessagingBindings
- useUpdateZendeskUserFieldsMutation
Why are these changes being made?
Clean up Help Center and have better maintenance of code. These hooks control the Zendesk Widget which is a separate item completely from Help Center. Most of these hooks are being consumed outside of Help Center in Calypso directly.
Testing Instructions
There are a few places that need to be tested. We need to specifically make sure that Help Center is able to work with Zendesk Messaging as it did before.
Calypso
- Simple site
- Non-site area such as
/help - Pre-cancellation
- Pre-sales
WP-ADMIN
- Simple site - also editor
- Atomic - also editor
Jetpack Cloud live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-114031&env=jetpack |
Automattic for Agencies live (direct link)
|
|
https://calypso.live?image=registry.a8c.com/calypso/app:build-114031&env=a8c-for-agencies |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:
App Entrypoints (~282 bytes removed 📉 [gzipped])
name parsed_size gzip_size
entry-stepper -1401 B (-0.1%) -186 B (-0.0%)
entry-subscriptions -1044 B (-0.1%) -199 B (-0.0%)
entry-domains-landing -1044 B (-0.2%) -168 B (-0.1%)
entry-browsehappy -1044 B (-0.5%) -168 B (-0.3%)
entry-main -976 B (-0.0%) -209 B (-0.0%)
entry-login -973 B (-0.1%) -144 B (-0.0%)
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.
Sections (~10712 bytes removed 📉 [gzipped])
name parsed_size gzip_size
jetpack-cloud-pricing -4717 B (-0.6%) -1846 B (-0.8%)
jetpack-connect -4533 B (-0.4%) -1708 B (-0.5%)
jetpack-cloud-features-comparison -4521 B (-0.7%) -1429 B (-0.7%)
plans -4166 B (-0.3%) +95 B (+0.0%)
update-design-flow -2579 B (-0.2%) -1020 B (-0.3%)
copy-site-flow -2171 B (-0.3%) -581 B (-0.3%)
link-in-bio-tld-flow -1990 B (-0.1%) -1256 B (-0.2%)
checkout -1863 B (-0.1%) -167 B (-0.0%)
domains -1091 B (-0.1%) -2457 B (-0.5%)
site-purchases -913 B (-0.1%) -1220 B (-0.3%)
purchases -913 B (-0.0%) -1220 B (-0.2%)
import-hosted-site-flow -798 B (-0.1%) -234 B (-0.1%)
email -684 B (-0.1%) +602 B (+0.3%)
scan -350 B (-0.0%) -640 B (-0.3%)
themes +332 B (+0.0%) +430 B (+0.1%)
hosting +330 B (+0.0%) +334 B (+0.1%)
jetpack-app +323 B (+0.1%) +131 B (+0.1%)
marketplace -259 B (-0.0%) -2037 B (-0.7%)
plugins +251 B (+0.0%) -24 B (-0.0%)
people -240 B (-0.0%) -42 B (-0.0%)
hundred-year-plan -216 B (-0.6%) -34 B (-0.3%)
signup -208 B (-0.1%) -198 B (-0.3%)
settings-writing -196 B (-0.0%) -1189 B (-0.7%)
settings-newsletter -196 B (-0.0%) -1189 B (-0.8%)
sensei-flow -196 B (-0.0%) -678 B (-0.4%)
home +196 B (+0.0%) +1296 B (+0.3%)
domain-user-transfer-flow +196 B (+0.1%) +883 B (+1.7%)
theme +166 B (+0.0%) +519 B (+0.2%)
marketing -165 B (-0.0%) -1191 B (-0.6%)
staging-site +134 B (+0.0%) +21 B (+0.0%)
settings-security +134 B (+0.0%) +29 B (+0.0%)
settings-performance +134 B (+0.0%) +30 B (+0.0%)
posts-custom +134 B (+0.0%) -34 B (-0.0%)
posts +134 B (+0.0%) -34 B (-0.0%)
media +134 B (+0.0%) +102 B (+0.0%)
jetpack-cloud-plugin-management +134 B (+0.0%) -39 B (-0.0%)
earn +134 B (+0.0%) +82 B (+0.0%)
jetpack-cloud-agency-sites-v2 -133 B (-0.0%) -2 B (-0.0%)
backup -133 B (-0.0%) -2 B (-0.0%)
a8c-for-agencies-sites -133 B (-0.0%) -2 B (-0.0%)
new-hosted-site-flow-user-included +122 B (+1.7%) +37 B (+1.6%)
new-hosted-site-flow +122 B (+1.8%) +38 B (+1.6%)
connect-domain +122 B (+0.5%) +36 B (+0.5%)
devdocs -108 B (-0.1%) -38 B (-0.1%)
plugin-bundle-flow +105 B (+0.1%) +6 B (+0.0%)
github-deployments -103 B (-0.0%) -31 B (-0.0%)
videopress-flow -101 B (-0.0%) -647 B (-0.2%)
with-theme-assembler-flow -95 B (-0.1%) -9 B (-0.1%)
update-options-flow -95 B (-0.2%) -12 B (-0.2%)
trial-wooexpress-flow -95 B (-0.2%) -10 B (-0.1%)
tailored-ecommerce-flow -95 B (-0.2%) -9 B (-0.1%)
site-setup-wg -95 B (-0.1%) -9 B (-0.0%)
site-setup-flow -95 B (-0.1%) -9 B (-0.1%)
site-migration-flow -95 B (-0.2%) -10 B (-0.1%)
readymade-template-flow -95 B (-0.1%) -10 B (-0.0%)
migration-signup -95 B (-0.2%) -13 B (-0.2%)
import-flow -95 B (-0.2%) -10 B (-0.1%)
hosted-site-migration-flow -95 B (-0.2%) -9 B (-0.1%)
free-post-setup-flow -95 B (-0.2%) -12 B (-0.2%)
free-flow -95 B (-0.2%) -11 B (-0.1%)
entrepreneur-flow -95 B (-0.1%) -4 B (-0.0%)
assembler-first-flow -95 B (-0.1%) -13 B (-0.1%)
ai-assembler-flow -95 B (-0.1%) -12 B (-0.1%)
settings +80 B (+0.0%) +630 B (+0.2%)
settings-podcast -62 B (-0.0%) -1170 B (-0.7%)
write-flow +41 B (+0.0%) -684 B (-0.3%)
build-flow +41 B (+0.0%) -686 B (-0.3%)
activity +31 B (+0.0%) +28 B (+0.0%)
start-writing-flow +14 B (+0.1%) +9 B (+0.1%)
reblogging-flow +14 B (+0.2%) -1 B (-0.0%)
newsletter-flow +14 B (+0.1%) -4 B (-0.1%)
link-in-bio-flow +14 B (+0.1%) +2 B (+0.0%)
design-first-flow +14 B (+0.1%) +11 B (+0.2%)
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 (~55605 bytes removed 📉 [gzipped])
name parsed_size gzip_size
async-load-signup-steps-site-picker -4962 B (-3.4%) -1844 B (-4.0%)
async-load-signup-steps-difm-site-picker -4962 B (-3.4%) -1832 B (-3.9%)
async-load-signup-steps-user -4869 B (-2.9%) -1496 B (-3.2%)
async-load-signup-steps-woocommerce-install-step-store-address -4777 B (-6.7%) -1513 B (-6.5%)
async-load-signup-steps-domains -4777 B (-0.8%) -1463 B (-0.9%)
async-load-signup-steps-theme-selection -4674 B (-1.2%) -1374 B (-1.1%)
async-load-signup-steps-p2-complete-profile -4674 B (-4.8%) -1441 B (-4.7%)
async-load-signup-steps-clone-point -4674 B (-2.7%) -1495 B (-3.3%)
async-load-signup-steps-woocommerce-install-transfer -4661 B (-13.2%) -1464 B (-13.0%)
async-load-signup-steps-woocommerce-install-confirm -4661 B (-7.8%) -1467 B (-7.8%)
async-load-signup-steps-test-step -4661 B (-18.7%) -1495 B (-18.4%)
async-load-signup-steps-store-features -4661 B (-9.7%) -1469 B (-10.0%)
async-load-signup-steps-starting-point -4661 B (-11.5%) -1500 B (-12.0%)
async-load-signup-steps-social-profiles -4661 B (-15.0%) -1471 B (-14.8%)
async-load-signup-steps-site-or-domain -4661 B (-10.2%) -1477 B (-10.6%)
async-load-signup-steps-site-options -4661 B (-10.2%) -1494 B (-10.9%)
async-load-signup-steps-site -4661 B (-10.0%) -1453 B (-10.2%)
async-load-signup-steps-rewind-were-backing -4661 B (-17.6%) -1495 B (-17.2%)
async-load-signup-steps-rewind-form-creds -4661 B (-6.4%) -1452 B (-6.6%)
async-load-signup-steps-reader-landing -4661 B (-16.0%) -1486 B (-16.0%)
async-load-signup-steps-p2-site -4661 B (-8.3%) -1460 B (-8.7%)
async-load-signup-steps-p2-join-workspace -4661 B (-13.5%) -1483 B (-13.4%)
async-load-signup-steps-p2-details -4661 B (-16.3%) -1509 B (-16.1%)
async-load-signup-steps-p2-confirm-email -4661 B (-15.3%) -1499 B (-15.1%)
async-load-signup-steps-new-or-existing-site -4661 B (-9.7%) -1479 B (-9.4%)
async-load-signup-steps-intent -4661 B (-10.7%) -1472 B (-11.0%)
async-load-signup-steps-hosting-decider -4661 B (-17.2%) -1494 B (-16.4%)
async-load-signup-steps-emails -4661 B (-7.2%) -1422 B (-6.8%)
async-load-signup-steps-creds-permission -4661 B (-8.5%) -1451 B (-8.3%)
async-load-signup-steps-creds-confirm -4661 B (-8.5%) -1443 B (-8.2%)
async-load-signup-steps-creds-complete -4661 B (-17.7%) -1493 B (-17.1%)
async-load-signup-steps-clone-start -4661 B (-14.8%) -1506 B (-14.7%)
async-load-signup-steps-clone-ready -4661 B (-8.1%) -1444 B (-8.1%)
async-load-signup-steps-clone-destination -4661 B (-12.8%) -1492 B (-13.2%)
async-load-signup-steps-clone-credentials -4661 B (-6.1%) -1443 B (-6.3%)
async-load-signup-steps-clone-cloning -4661 B (-15.0%) -1512 B (-15.1%)
async-load-calypso-components-jetpack-portal-nav -4661 B (-9.1%) -1373 B (-9.6%)
async-load-signup-steps-woocommerce-install-step-business-info -4660 B (-5.0%) -1477 B (-5.0%)
async-load-signup-steps-design-picker -4553 B (-7.9%) -1406 B (-7.6%)
async-load-signup-steps-plans-theme-preselected -4426 B (-1.2%) -987 B (-0.9%)
async-load-signup-steps-plans -4426 B (-1.2%) -986 B (-0.9%)
async-load-signup-steps-subscribe-email -2173 B (-1.3%) -652 B (-1.3%)
async-load-signup-steps-website-content -2171 B (-2.0%) -652 B (-1.8%)
async-load-signup-steps-initial-intent -2171 B (-2.5%) -652 B (-2.2%)
async-load-signup-steps-courses -2171 B (-6.3%) -652 B (-5.8%)
async-load-signup-steps-page-picker -2145 B (-0.6%) -447 B (-0.4%)
async-load-calypso-my-sites-checkout-modal -2078 B (-0.2%) -101 B (-0.0%)
async-load-calypso-blocks-editor-checkout-modal -1835 B (-0.2%) +295 B (+0.1%)
async-load-purchase-modal-wrapper +196 B (+0.1%) +885 B (+0.8%)
async-load-calypso-blocks-support-article-dialog-dialog +196 B (+0.1%) +513 B (+0.9%)
async-load-calypso-reader-sidebar +134 B (+0.1%) +23 B (+0.1%)
async-load-calypso-post-editor-editor-media-modal +134 B (+0.0%) +102 B (+0.0%)
async-load-calypso-my-sites-stats-summary +134 B (+0.3%) +23 B (+0.2%)
async-load-calypso-my-sites-current-site-notice +134 B (+0.2%) +21 B (+0.1%)
async-load-calypso-components-web-preview-component +134 B (+0.0%) +23 B (+0.0%)
async-load-calypso-blocks-jitm-templates-sidebar-banner +134 B (+0.3%) +26 B (+0.2%)
async-load-calypso-blocks-jitm-templates-notice +134 B (+0.3%) +23 B (+0.2%)
async-load-calypso-blocks-jitm-templates-default +134 B (+0.3%) +25 B (+0.2%)
async-load-calypso-blocks-support-article-dialog +108 B (+3.7%) +33 B (+2.9%)
async-load-automattic-help-center +93 B (+0.0%) +125 B (+0.1%)
async-load-calypso-layout-masterbar-checkout-tsx +71 B (+0.1%) +15 B (+0.0%)
async-load-calypso-layout-masterbar-checkout +71 B (+0.1%) +159 B (+0.6%)
async-load-design-blocks -62 B (-0.0%) -931 B (-0.1%)
async-load-design -29 B (-0.0%) +67 B (+0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou... +26 B (+0.0%) +292 B (+0.3%)
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
- help-center
- notifications
- wpcom-block-editor
To test WordPress.com changes, run install-plugin.sh $pluginSlug add/zendesk-client-package on your sandbox.
Everything appeared to function properly for me across all the areas.
Areas I Tested:
Atomic
- [x] wp-admin
- [x] editor
Simple
- [x] wp-admin
- [x] editor
Calypso
- [x] Home
- [x] /help
- [x] Checkout
- [x] Pre-cancellation
I was testing Checkout and everything seemed to work for wpcom_presales flows, but for some reason Jetpack/Akismet checkout were not loading the chat icon (jp_presales) no matter what I tried.
I also tried hacking the usePresalesChat function to return true for skipavailabilitycheck which tends to work 🤔
Line 354: client/my-sites/checkout/src/components/checkout-main-content.tsx
usePresalesChat( getPresalesChatKey( responseCart ), true, true );
I was testing Checkout and everything seemed to work for wpcom_presales flows, but for some reason Jetpack/Akismet checkout were not loading the chat icon (jp_presales) no matter what I tried.
Oh that is interesting. Do you have steps to test this? I can give this a try as well. I am not familiar with where these other instance are found.
Hey @jjchrisdiehl I was wondering if you had time to outline the testing steps for this?
He's AFK for a little while, but if you just want to test Jetpack/Aksimet checkout, go to https://cloud.jetpack.com/pricing or https://akismet.com/pricing/ and click one of the buttons to get a checkout URL for a specific product (which you can then modify to point to your Calypso testing instance).
From my testing it seems like it is the same as production. I do not see the chat widget icon at the bottom right like I do on WordPress.com
If thats the case maybe we can address that in a following PR just to unblock this and merge soon.
Maybe someone else can confirm this as well? @DavidRothstein @alshakero @escapemanuele
Calypso
- [x] Simple site
- [x] Non-site area such as /help
- [x] Pre-cancellation
- [x] Pre-sales
WP-ADMIN
- [x] Simple site - also editor
- [x] Atomic - also editor