Skip to content
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

Help Center: link to support docs if disconnected from JPOP #91630

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

arcangelini
Copy link
Contributor

@arcangelini arcangelini commented Jun 10, 2024

Fixes #91558

Proposed Changes

Add check to Help Center in ETK to determine if user is connected to Jetpack. Then load simplified version if not.

Why are these changes being made?

Help Center relies on a WordPress.com user to do most of its functions. For Atomic and Jetpack only users this means they need to be connected to WordPress.com in order for it to work. To prevent loading a useless Help Center and save on loading times we have decided it would be best to make Help Center a button that opens the support docs if the user is not connected.

Testing Instructions

  1. Download the ETK plugin and install it on an atomic site.
  2. Go to /wp-admin and the post editor to make sure the help center is functioning as normal.
  3. Disconnect from Jetpack. I did this by using the /_cli and running jetpack disconnect user ##USER_ID## --force. Be aware that this will remove your SSH key connection to the site if you have it setup.
  4. Go to /wp-admin and the post editor to see the Help Center open a new tab to the support docs.
  5. Reconnect Jetpack

@arcangelini arcangelini self-assigned this Jun 10, 2024
@arcangelini arcangelini requested a review from a team June 10, 2024 08:55
@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 Jun 10, 2024
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Jun 10, 2024

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

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

  • editing-toolkit

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/help-center-disconnected-jpop on your sandbox.

@heavyweight
Copy link
Contributor

Tested and everything is looking good!

@arcangelini arcangelini merged commit 3b05501 into trunk Jun 11, 2024
12 checks passed
@arcangelini arcangelini deleted the update/help-center-disconnected-jpop branch June 11, 2024 13:00
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jun 11, 2024
Comment on lines +289 to +292
public function is_jetpack_connected() {
$user_id = get_current_user_id();
return ( new Connection_Manager( 'jetpack' ) )->is_user_connected( $user_id );
}
Copy link
Member

Choose a reason for hiding this comment

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

This check should be only done in Atomic site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Help Center: Redirect to Calypso if Jetpack is disconnected
4 participants