jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

WordPress.com: Add the Help Center App ✨

Open alshakero opened this issue 3 weeks ago • 4 comments

Proposed changes:

This enqueues one of four bundles from widgets.wp.com. It chooses the bundle based on the context:

  • help-center-gutenberg.min.js: for GB editor in a connected site.
  • help-center-wp-admin: for wp-admin in a connected site.
  • help-center-wp-admin-disconnected.js: for wp-admin in a disconnected site.
  • help-center-gutenberg-disconnected: for GB editor in a disconnected site.

It also adds 12 new end points that proxy Atomic requests to wpcom. These endpoints are copied from ETK almost verbatim and have been battle tested for months/years.

Other information:

  • [x] Have you written new tests for your changes, if applicable? No, but I will move tests from ETK in a follow up.
  • [x] Have you checked the E2E test CI results, and verified that your changes do not break them?
  • [x] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

There have been many discussions around moving the Help Center to Jetpack. But the most recent one is: p1718801409878749-slack-C0347E545HR

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

Simple sites

  1. cd into projects/packages/jetpack-mu-wpcom.
  2. Sync using pnpm run build-production-js && jetpack rsync mu-wpcom-plugin wpcom-sandbox:~/public_html/wp-content/mu-plugins/jetpack-mu-wpcom-plugin/sun
  3. Go to the editor on a sandboxed site and smoke test the Help Center.
  4. Go to /wp-admin on a sandboxed site and smoke test the Help Center.
  5. Verify that it's loaded from Jetpack by checking the path of the help-center bundle in the Network tab of the DevTools.

Connected Atomic site

  1. cd into projects/packages/jetpack-mu-wpcom.
  2. Sync jetpack-mu-wpcom with your WoA site using this command jetpack rsync mu-wpcom-plugin wpcom-atomic:htdocs/wp-content/plugins/jetpack-mu-wpcom-plugin-dev. Assuming you have an ssh host pointing to a WoA site.
  3. Important: Edit ~/htdocs/wp-config.php and add define( 'JETPACK_AUTOLOAD_DEV', true );.
  4. Important: Edit ~/htdocs/wp-config.php and add define( 'JETPACK_MU_WPCOM_LOAD_VIA_BETA_PLUGIN', true );
  5. Go to the editor and smoke test the Help Center.
  6. Go to /wp-admin and smoke test the Help Center.
  7. Verify that it's loaded from Jetpack by checking the path of the help-center bundle in the Network tab of the DevTools.

Disconnected Atomic site

  1. Disconnect a JP site by going to /_cli and running jetpack disconnect blog.
  2. Go to /wp-admin/post-new.php.
  3. Click the Help Center.
  4. It should take you to wp.com/help.
  5. Repeat in wp-admin.
  6. It should take you to wp.com/help.
  7. Reconnect your site by going to https://jptools.wordpress.com/debug/?url=YOUR_SITE and click "Restore User Connection".

alshakero avatar Jun 27 '24 17:06 alshakero