Skip to content

Move help-center managing code into the dashboard #105120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

p-jackson
Copy link
Member

@p-jackson p-jackson commented Aug 7, 2025

Part of DOTDASH-242

Proposed Changes

  • Makes the help center's setSubject and setNavigateToRoute methods available in the dashboard too
  • Lazy loads the help center data store, regardless of what method is used first
  • Async loads the help center UI using React.lazy rather than Calypso's AsyncLoad

Why are these changes being made?

The DOTDASH-241 task needs access to more help center methods than just show/hide. It also needs the ability to set the search terms within the help center. That was the impetus to rearranging the hook so that it would async load the data store, regardless of what method was used first.

It also removes some dependency on the calypso client code. The client/component/help-center code is a pretty thin wrapper around the @automattic/ packages. So I figured it was better to just depend on the packages directly.

Testing Instructions

The two existing ways the help center is currently accessed in the HD should work just as they used to.

The help button in the top-right works just as it did before. Clicking the button toggles the help center.

CleanShot.2025-08-08.at.13.58.02.mp4

When the help center is currently open and you create a new site with AI, the help center is closed. I don't know why this is exactly, but I'm guessing it is to prevent the help center from being auto opened when you sand in the big sky environment.

CleanShot.2025-08-08.at.13.58.58.mp4

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • 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 tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • 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)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@p-jackson p-jackson self-assigned this Aug 7, 2025
Copy link

github-actions bot commented Aug 7, 2025

@matticbot
Copy link
Contributor

matticbot commented Aug 7, 2025

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

App Entrypoints (~69426 bytes added 📈 [gzipped])

name                    parsed_size            gzip_size
entry-subscriptions       +430158 B  (+23.0%)  +115552 B  (+20.7%)
entry-stepper             +194081 B  (+13.1%)   +53788 B  (+12.6%)
entry-reauth-required      +28588 B   (+1.5%)    +8434 B   (+1.5%)
entry-login                +28444 B   (+1.3%)    +8400 B   (+1.3%)
entry-main                 +19577 B   (+0.8%)    +4736 B   (+0.8%)
entry-dashboard-dotcom      +2642 B   (+0.2%)     -483 B   (-0.1%)
entry-dashboard-a4a         +2642 B   (+0.2%)     -449 B   (-0.1%)
entry-domains-landing         -24 B   (-0.0%)      +52 B   (+0.0%)
entry-browsehappy             -24 B   (-0.0%)      +42 B   (+0.1%)

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

Sections (~89924 bytes removed 📉 [gzipped])

name                                parsed_size            gzip_size
reader                                +242785 B   (+6.0%)   +65246 B   (+6.1%)
async-step-unified-plans              -204712 B  (-14.0%)   -52751 B  (-13.5%)
async-step-unified-domains            -185119 B   (-9.1%)   -47031 B   (-9.0%)
copy-site-flow                        -173984 B  (-82.8%)   -46010 B  (-79.4%)
async-step-use-my-domain              -171699 B  (-23.7%)   -45079 B  (-25.1%)
hundred-year-domain                   -171392 B  (-79.7%)   -44944 B  (-77.9%)
connect-domain                        -171378 B  (-87.5%)   -44934 B  (-87.8%)
new-hosted-site-flow                  -170036 B  (-96.4%)   -44667 B  (-95.2%)
onboarding-unified-flow               -169985 B  (-92.7%)   -44675 B  (-89.0%)
hundred-year-plan                     -169973 B  (-88.0%)   -44659 B  (-84.3%)
onboarding-flow                       -169957 B  (-87.3%)   -44406 B  (-82.2%)
site-setup-flow                       -169914 B  (-72.3%)   -44640 B  (-70.0%)
notification-settings                 +107143 B  (+14.1%)   +27195 B  (+12.2%)
home                                   +38112 B   (+2.1%)    +8615 B   (+1.6%)
site-settings                          +21029 B   (+1.1%)    +4978 B   (+1.0%)
domains                                -19301 B   (-0.5%)    -2218 B   (-0.2%)
subscribers                            +17176 B   (+1.3%)    +5044 B   (+1.4%)
settings                               +16707 B   (+1.6%)    +4153 B   (+1.4%)
migrate                                -11738 B   (-3.0%)    -3579 B   (-2.9%)
google-my-business                     -11738 B   (-2.0%)    -3850 B   (-2.1%)
a8c-for-agencies-reports               -11605 B   (-0.9%)    -2912 B   (-0.9%)
add-ons                                -11510 B   (-2.6%)    -3622 B   (-2.5%)
a8c-for-agencies-overview              -11375 B   (-0.7%)    -4334 B   (-1.1%)
posts-custom                           -11359 B   (-1.6%)    -3422 B   (-1.5%)
posts                                  -11359 B   (-1.6%)    -3422 B   (-1.5%)
a8c-for-agencies-purchases             -11336 B   (-1.2%)    -4766 B   (-1.7%)
jetpack-cloud-agency-dashboard         -11303 B   (-1.0%)    -3525 B   (-1.1%)
settings-security                      -11288 B   (-2.2%)    -3533 B   (-2.3%)
activity                               -11288 B   (-1.6%)    -3597 B   (-1.7%)
a8c-for-agencies-team                  -11283 B   (-0.9%)    -2875 B   (-0.9%)
a8c-for-agencies-migrations            -11257 B   (-0.9%)    -3206 B   (-1.0%)
a8c-for-agencies-woopayments           -11219 B   (-0.9%)    -4249 B   (-1.3%)
a8c-for-agencies-referrals             -11219 B   (-0.8%)    -4269 B   (-1.2%)
jetpack-cloud-partner-portal           -11113 B   (-1.1%)    -4459 B   (-1.4%)
jetpack-cloud-agency-signup            -11010 B  (-12.0%)    -3609 B  (-11.9%)
a8c-for-agencies-partner-directory     -10992 B   (-1.9%)    -3508 B   (-1.9%)
switch-site                            -10946 B   (-5.2%)    -3487 B   (-5.7%)
jetpack-cloud-manage-pricing           -10946 B   (-2.5%)    -3487 B   (-2.8%)
a8c-for-agencies-signup                -10946 B   (-4.6%)    -3487 B   (-4.8%)
a8c-for-agencies-settings              -10946 B   (-3.5%)    -3487 B   (-3.6%)
a8c-for-agencies-landing               -10946 B   (-5.4%)    -3487 B   (-5.6%)
a8c-for-agencies-feedback              -10946 B   (-4.0%)    -3487 B   (-4.0%)
a8c-for-agencies-agency-tier           -10946 B   (-3.3%)    -3487 B   (-3.4%)
a8c-for-agencies                       -10946 B   (-6.6%)    -3487 B   (-6.9%)
stats                                  -10937 B   (-0.9%)    -3256 B   (-0.9%)
site-profiler                          -10890 B   (-3.6%)    -3517 B   (-3.9%)
theme                                  -10843 B   (-1.2%)    -3412 B   (-1.2%)
woocommerce                            -10838 B   (-3.6%)    -3455 B   (-3.7%)
settings-reading                       -10838 B   (-2.9%)    -3455 B   (-2.9%)
settings-jetpack                       -10838 B   (-1.8%)    -3455 B   (-2.0%)
jetpack-search                         -10838 B   (-1.8%)    -3455 B   (-1.9%)
jetpack-connect                        -10838 B   (-0.7%)    -3345 B   (-0.7%)
jetpack-cloud-settings                 -10838 B   (-1.6%)    -3435 B   (-1.7%)
jetpack-cloud-overview                 -10838 B   (-2.4%)    -3181 B   (-2.2%)
jetpack-cloud-features-comparison      -10838 B   (-1.5%)    -3431 B   (-1.6%)
gutenberg-editor                       -10838 B   (-3.7%)    -3455 B   (-3.7%)
customize                              -10838 B   (-3.8%)    -3455 B   (-3.8%)
concierge                              -10838 B   (-2.4%)    -3455 B   (-2.6%)
patterns                               -10750 B   (-0.5%)    -2830 B   (-0.5%)
jetpack-cloud-pricing                  -10745 B   (-1.3%)    -3112 B   (-1.3%)
jetpack-cloud                          -10735 B   (-2.6%)    -3469 B   (-2.7%)
performance-profiler                   -10712 B   (-2.8%)    -2002 B   (-1.7%)
a8c-for-agencies-marketplace           -10646 B   (-1.0%)    -2504 B   (-0.8%)
settings-podcast                       -10501 B   (-1.8%)    -3306 B   (-1.9%)
marketing                              -10501 B   (-1.2%)    -3326 B   (-1.3%)
settings-performance                   -10429 B   (-1.5%)    -3091 B   (-1.5%)
themes                                 -10336 B   (-0.9%)    -2559 B   (-0.7%)
staging-site                           -10334 B   (-0.7%)    -2423 B   (-0.6%)
email                                  -10271 B   (-0.9%)    -3099 B   (-0.9%)
jetpack-cloud-plugin-management        -10233 B   (-0.5%)    -2531 B   (-0.4%)
a8c-for-agencies-plugins               -10155 B   (-0.5%)    -2553 B   (-0.4%)
woocommerce-installation               -10051 B   (-2.9%)    -3246 B   (-3.0%)
settings-writing                       -10051 B   (-1.8%)    -3225 B   (-1.9%)
settings-newsletter                    -10051 B   (-2.0%)    -3225 B   (-2.1%)
settings-discussion                    -10051 B   (-2.4%)    -3235 B   (-2.5%)
promote-post-i2                        -10051 B   (-1.4%)    -3221 B   (-1.4%)
jetpack-social                         -10051 B   (-1.4%)    -3227 B   (-1.6%)
export                                 -10051 B   (-3.0%)    -3230 B   (-3.1%)
import                                 -10041 B   (-1.3%)    -3162 B   (-1.4%)
scan                                    -9979 B   (-1.1%)    -3074 B   (-1.2%)
marketplace                             -9979 B   (-1.3%)    -3257 B   (-1.4%)
media                                   -9966 B   (-0.6%)    -3203 B   (-0.7%)
comments                                -9813 B   (-1.3%)    -2555 B   (-1.2%)
people                                  -9800 B   (-1.1%)    -3211 B   (-1.2%)
backup                                  -9783 B   (-0.8%)    -2374 B   (-0.7%)
pages                                   -9739 B   (-1.9%)    -2869 B   (-1.8%)
a8c-for-agencies-sites                  -9727 B   (-0.3%)    -3264 B   (-0.4%)
plugins                                 -9446 B   (-0.3%)    -3153 B   (-0.4%)
jetpack-app                             -9168 B   (-2.0%)    -3409 B   (-2.3%)
security                                -8452 B   (-1.1%)    -2477 B   (-1.1%)
account                                 -8428 B   (-1.1%)    -3074 B   (-1.3%)
signup                                  -8422 B   (-2.7%)     -120 B   (-0.2%)
site-blocks                             -8340 B   (-1.5%)    -2497 B   (-1.5%)
privacy                                 -8340 B   (-1.5%)    -2558 B   (-1.5%)
me                                      -8340 B   (-1.6%)    -2653 B   (-1.7%)
developer                               -8340 B   (-1.5%)    -2529 B   (-1.5%)
account-close                           -8340 B   (-1.5%)    -2531 B   (-1.5%)
plans                                   -8258 B   (-0.4%)    -3322 B   (-0.5%)
site-purchases                          -8048 B   (-0.3%)     -901 B   (-0.1%)
stepper-user-step                       -7546 B   (-1.0%)    -2223 B   (-1.1%)
earn                                    -7303 B   (-0.8%)    -2230 B   (-0.8%)
readymade-template-flow                 -7259 B   (-5.7%)    -2625 B   (-6.6%)
site-migration-flow                     -7035 B  (-12.6%)    -2247 B  (-11.5%)
a8c-for-agencies-client                 -6716 B   (-0.3%)     +219 B   (+0.0%)
github-deployments                      -6572 B   (-0.3%)    -2209 B   (-0.4%)
purchases                               -6347 B   (-0.2%)     -706 B   (-0.1%)
site-monitoring                         -6122 B   (-0.3%)    -2213 B   (-0.4%)
site-logs                               -6031 B   (-0.3%)    -2256 B   (-0.5%)
site-performance                        -5802 B   (-0.3%)    -2659 B   (-0.5%)
hosting                                 +5178 B   (+0.2%)     +708 B   (+0.1%)
entrepreneur-flow                       -3923 B   (-2.3%)    -1062 B   (-2.0%)
checkout                                -2638 B   (-0.1%)     -860 B   (-0.1%)
overview                                -2631 B   (-0.1%)     -337 B   (-0.0%)
sites-dashboard                          -932 B   (-0.0%)     -530 B   (-0.1%)
devdocs                                   +45 B   (+0.0%)      +16 B   (+0.0%)
update-design-flow                        +12 B   (+0.0%)       +3 B   (+0.0%)
example-flow                              +12 B   (+0.0%)       +3 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 (~7362 bytes added 📈 [gzipped])

name                                                                              parsed_size             gzip_size
async-load-automattic-data-stores                                                   +475986 B  (+455.9%)  +125174 B  (+417.7%)
async-load-help-center-app                                                          -428021 B   (-39.5%)  -120606 B   (-36.9%)
async-load-purchase-modal-wrapper                                                    -25527 B    (-5.5%)    -8245 B    (-5.7%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...     -25345 B    (-5.6%)    -8179 B    (-5.9%)
async-load-calypso-lib-store-sandbox-helper                                          -25311 B   (-45.4%)    -8077 B   (-45.5%)
async-load-calypso-layout-masterbar-checkout                                         -25311 B   (-24.8%)    -8077 B   (-22.4%)
async-load-calypso-components-jetpack-portal-nav                                     -25311 B   (-33.4%)    -8077 B   (-36.8%)
async-load-calypso-blocks-support-article-dialog-dialog                              -25311 B   (-17.7%)    -8077 B   (-18.3%)
async-load-calypso-blocks-jitm-templates-home-task                                   -25311 B   (-32.1%)    -8077 B   (-30.2%)
async-load-automattic-help-center                                                    -25179 B    (-4.2%)    -7584 B    (-4.0%)
async-load-calypso-layout-command-palette                                            -24524 B    (-9.5%)    -7844 B   (-10.4%)
async-load-signup-steps-page-picker                                                  -15025 B    (-3.2%)    -5161 B    (-3.6%)
async-load-design-blocks                                                             -12449 B    (-0.6%)    -3444 B    (-0.5%)
async-load-signup-steps-website-content                                              -11145 B    (-7.9%)    -3565 B    (-7.5%)
async-load-signup-steps-woocommerce-install-step-store-address                       -11049 B   (-10.8%)    -3510 B   (-10.2%)
async-load-signup-steps-woocommerce-install-confirm                                  -10992 B   (-12.6%)    -3500 B   (-12.3%)
async-load-signup-steps-woocommerce-install-transfer                                 -10946 B   (-16.9%)    -3487 B   (-16.4%)
async-load-signup-steps-woocommerce-install-step-business-info                       -10946 B    (-9.1%)    -3487 B    (-8.6%)
async-load-signup-steps-store-features                                               -10946 B   (-15.2%)    -3487 B   (-14.9%)
async-load-signup-steps-starting-point                                               -10946 B   (-17.4%)    -3487 B   (-16.9%)
async-load-signup-steps-social-profiles                                              -10946 B   (-19.0%)    -3487 B   (-18.3%)
async-load-signup-steps-site-picker                                                  -10946 B    (-5.8%)    -3487 B    (-5.7%)
async-load-signup-steps-site-or-domain                                               -10946 B   (-17.4%)    -3487 B   (-17.0%)
async-load-signup-steps-site-options                                                 -10946 B   (-16.1%)    -3487 B   (-15.7%)
async-load-signup-steps-site                                                         -10946 B   (-14.6%)    -3487 B   (-14.5%)
async-load-signup-steps-rewind-were-backing                                          -10946 B   (-20.6%)    -3487 B   (-19.8%)
async-load-signup-steps-rewind-form-creds                                            -10946 B   (-10.8%)    -3487 B   (-11.0%)
async-load-signup-steps-new-or-existing-site                                         -10946 B   (-13.8%)    -3487 B   (-13.6%)
async-load-signup-steps-intent                                                       -10946 B   (-16.7%)    -3487 B   (-16.1%)
async-load-signup-steps-hosting-decider                                              -10946 B   (-20.4%)    -3487 B   (-19.2%)
async-load-signup-steps-emails                                                       -10946 B   (-11.8%)    -3487 B   (-11.6%)
async-load-signup-steps-difm-site-picker                                             -10946 B    (-5.8%)    -3487 B    (-5.7%)
async-load-signup-steps-design-picker                                                -10946 B   (-13.3%)    -3487 B   (-12.8%)
async-load-signup-steps-creds-permission                                             -10946 B   (-12.5%)    -3487 B   (-12.3%)
async-load-signup-steps-creds-confirm                                                -10946 B   (-13.2%)    -3487 B   (-13.0%)
async-load-signup-steps-courses                                                      -10946 B   (-17.3%)    -3487 B   (-16.6%)
async-load-signup-steps-clone-start                                                  -10946 B   (-18.8%)    -3487 B   (-18.1%)
async-load-signup-steps-clone-ready                                                  -10946 B   (-13.1%)    -3487 B   (-13.3%)
async-load-signup-steps-clone-point                                                  -10946 B    (-6.9%)    -3487 B    (-7.3%)
async-load-signup-steps-clone-destination                                            -10946 B   (-17.3%)    -3487 B   (-17.0%)
async-load-signup-steps-clone-credentials                                            -10946 B   (-10.5%)    -3487 B   (-10.8%)
async-load-signup-steps-clone-cloning                                                -10946 B   (-18.9%)    -3487 B   (-18.3%)
async-load-signup-steps-user                                                         -10843 B    (-1.5%)    -3477 B    (-1.7%)
async-load-signup-steps-domains                                                      -10257 B    (-0.7%)    -3259 B    (-0.8%)
async-load-design                                                                     -9848 B    (-0.6%)    -3545 B    (-0.9%)
async-load-signup-steps-plans-theme-preselected                                       -9786 B    (-2.0%)    -3744 B    (-2.4%)
async-load-signup-steps-plans                                                         -9786 B    (-2.0%)    -3746 B    (-2.4%)
async-load-v-2-sites-list                                                             +3612 B    (+1.3%)     +197 B    (+0.3%)
async-load-calypso-blocks-cookie-banner                                               -3590 B   (-17.0%)    -1170 B   (-16.8%)
async-load-calypso-components-global-notices                                          -3184 B   (-44.5%)     -926 B   (-37.7%)
async-load-calypso-my-sites-stats-pages-subscribers                                   +2258 B    (+1.3%)     +401 B    (+0.7%)
async-load-calypso-dashboard-sites-add-new-site                                       -1131 B    (-6.9%)     -205 B    (-3.4%)
async-load-staging-site-sync-modal                                                     +810 B    (+0.2%)     +655 B    (+0.5%)
async-load-calypso-layout-guided-tours-component                                       +787 B    (+1.2%)     +231 B    (+1.3%)
async-load-calypso-reader-sidebar                                                      -450 B    (-0.4%)      -73 B    (-0.2%)
async-load-calypso-my-sites-current-site-notice                                        -450 B    (-0.8%)      -79 B    (-0.4%)
async-load-calypso-blocks-jitm-templates-sidebar-banner                                -450 B    (-0.9%)      -77 B    (-0.4%)
async-load-calypso-blocks-jitm-templates-notice                                        -450 B    (-0.9%)      -78 B    (-0.5%)
async-load-calypso-blocks-jitm-templates-default                                       -450 B    (-0.9%)      -77 B    (-0.4%)
async-load-calypso-components-web-preview-component                                    -385 B    (-0.1%)     -120 B    (-0.1%)
async-load-comment-block-editor                                                        +260 B    (+0.0%)     +691 B    (+0.1%)
async-load-calypso-reader-site-subscriptions-manager-pending-subscriptions-ma...       +248 B    (+0.4%)      +28 B    (+0.2%)
async-load-calypso-reader-site-subscriptions-manager-comment-subscriptions-ma...       +248 B    (+0.4%)      +28 B    (+0.2%)
async-load-calypso-jetpack-cloud-sections-sidebar-navigation-manage-selected-...       +196 B    (+0.2%)     +540 B    (+1.4%)
async-load-automattic-global-styles-src-components-global-styles-variations            +196 B    (+0.0%)     +657 B    (+0.1%)
async-load-calypso-reader-site-subscription                                            -194 B    (-1.1%)      -78 B    (-1.3%)
async-load-design-wordpress-components-gallery                                         +144 B    (+0.0%)     +963 B    (+0.5%)
async-load-calypso-blocks-support-article-dialog                                       -144 B    (-7.2%)      -29 B    (-3.3%)
async-load-calypso-blocks-jitm                                                         -144 B    (-0.9%)      -43 B    (-0.8%)
async-load-design-playground                                                           +130 B    (+0.0%)     -306 B    (-0.1%)
async-load-calypso-blocks-calendar-popover                                             +130 B    (+0.1%)     +697 B    (+1.7%)
async-load-calypso-post-editor-media-modal                                              +85 B    (+0.0%)      +27 B    (+0.0%)
async-load-calypso-my-sites-stats-pages-realtime-chart                                  +74 B    (+0.0%)     +393 B    (+0.3%)
async-load-calypso-my-sites-stats-components-line-chart                                 +74 B    (+0.0%)     +393 B    (+0.3%)
async-load-calypso-my-sites-stats-pages-realtime                                        +64 B    (+1.8%)      +21 B    (+1.5%)
async-load-automattic-components                                                        -50 B    (-0.0%)       -7 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.

@p-jackson p-jackson force-pushed the DOTDASH-242-methods-for-configing-help-center branch from 62c99cb to 5f83833 Compare August 8, 2025 01:53
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug DOTDASH-242-methods-for-configing-help-center on your sandbox.

@p-jackson p-jackson marked this pull request as ready for review August 8, 2025 02:12
@p-jackson p-jackson requested a review from a team as a code owner August 8, 2025 02:12
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 8, 2025
@@ -0,0 +1,10 @@
import HelpCenter from '@automattic/help-center'; // eslint-disable-line no-restricted-imports
Copy link
Contributor

@fushar fushar Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we move these rules directly to our .eslintrc? I found it pretty weird that only HC import restrictions are being inlined in the components 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm happily importing from this package perhaps we should just allow it in the linter. But I'm not super happy that we allow it tbh 😅 Looking at what the help center depends on, it pulls in a bunch of calypso and onboarding code. Things we wouldn't normally want to include in HD. I would say that we to port the help center over to using core components.

But given that the help center is embedded in wp-admin, I guess that means it must be fairly portable right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concern about adding it to the .eslintrc might send the unintended message that it's fine to import it as-is when it should be done asynchronously.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've allowed allowed @automattic/help-center in the eslint config—but not @automattic/data-stores.

The help center data store isn't actually that bad to use. It's how we're able to share state between HD and wp-admin/gutenberg for example, making it feel like "one product". So I think that's ok.
The issue with @automattic/data-stores though is that there are stores we really don't want folks to use. All the site/domain/user/onboarding related stores, we want people to use React Query instead.

My concern about adding it to the .eslintrc might send the unintended message that it's fine to import it as-is when it should be done asynchronously.

This is true, but I don't think many people will be tempted to load the help-center package directly. The one they'll be most tempted to use is data-stores (since that's how they show hide the help center). That's the one where we want to direct them to use the app/help-center hook instead.

@@ -0,0 +1 @@
@import '@automattic/calypso-color-schemes/root-only';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: What was missing from the HC when this file was not imported?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting question, I didn't even try that.
For the HD use case, if there was a way to force it to use the default color scheme that would actually be better 😮

Copy link
Member Author

@p-jackson p-jackson Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short story is that most everything works pretty well. It is mostly just missing some colours.

CleanShot 2025-08-08 at 20 39 02@2x

The help content itself looks no different without the scss, except for the table of contents at the top

CleanShot 2025-08-08 at 20 40 29@2x

This popup menu in live chat is busted without the scss

CleanShot 2025-08-08 at 20 41 05@2x

But I bet that menu could be improved so that it doesn't have a hard dependency on the scss file.

So it looks like the scss file is more than just for Calypso colour schemes and actually contains real component styling info.

The package readme says that root-only is just for getting the CSS variables defined at :root.

CleanShot 2025-08-08 at 20 45 38@2x

Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants