jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Add needsUserConnection function to check user connection status to shared extension utils package

Open oskosk opened this issue 6 months ago • 3 comments

Introduces a new utility function needsUserConnection in the shared-extension-utils package. This function helps determine if a user connection is required based on two conditions:

  1. The current user is not connected
  2. The site is not a simple site

Proposed changes:

  • Adds needsUserConnection function in needs-user-connection.js
  • Imports and uses isCurrentUserConnected and isSimpleSite utility functions

Other information:

  • [ ] Have you written new tests for your changes, if applicable?
  • [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
  • [ ] 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

None, but see how we needed something like this again in https://github.com/Automattic/jetpack/pull/39064

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

No

Testing instructions:

  • Go to '..'

oskosk avatar Aug 26 '24 14:08 oskosk