From e10376fa5037a98f122feb8f12a8c71615f1a7d8 Mon Sep 17 00:00:00 2001 From: moon Date: Tue, 15 Oct 2024 12:08:24 -0700 Subject: [PATCH 1/5] Update disclaimer copy --- client/jetpack-connect/authorize.js | 1 + client/jetpack-connect/disclaimer.jsx | 78 ++++++++++++++++++--------- 2 files changed, 53 insertions(+), 26 deletions(-) diff --git a/client/jetpack-connect/authorize.js b/client/jetpack-connect/authorize.js index e80d99fd1723f..6f8d6c45ed3e4 100644 --- a/client/jetpack-connect/authorize.js +++ b/client/jetpack-connect/authorize.js @@ -1067,6 +1067,7 @@ export class JetpackAuthorize extends Component { siteName={ decodeEntities( authQuery.blogname ) } companyName={ this.getCompanyName() } from={ authQuery.from } + isWooCoreProfiler={ this.isWooCoreProfiler() } /> { ! config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) && (
diff --git a/client/jetpack-connect/disclaimer.jsx b/client/jetpack-connect/disclaimer.jsx index 456c63f900bae..aa74de9966695 100644 --- a/client/jetpack-connect/disclaimer.jsx +++ b/client/jetpack-connect/disclaimer.jsx @@ -1,3 +1,4 @@ +import config from '@automattic/calypso-config'; import { localizeUrl } from '@automattic/i18n-utils'; import { localize } from 'i18n-calypso'; import PropTypes from 'prop-types'; @@ -10,6 +11,7 @@ class JetpackConnectDisclaimer extends PureComponent { companyName: PropTypes.string, siteName: PropTypes.string.isRequired, from: PropTypes.string, + isWooCoreProfiler: PropTypes.bool, }; handleClickDisclaimer = () => { @@ -17,7 +19,14 @@ class JetpackConnectDisclaimer extends PureComponent { }; render() { - const { companyName = 'WordPress.com', siteName, from, translate } = this.props; + const { + companyName = 'WordPress.com', + isWooCoreProfiler = false, + siteName, + from, + translate, + } = this.props; + let text; const detailsLink = ( ); - const text = - from === 'my-jetpack' - ? translate( - 'By clicking {{strong}}Approve{{/strong}}, you agree to {{detailsLink}}sync your site‘s data{{/detailsLink}} with us.', - { - components: { - strong: , - detailsLink, - }, - } - ) - : translate( - 'By connecting your site, you agree to {{detailsLink}}share details{{/detailsLink}} between %(companyName)s and %(siteName)s.', - { - components: { - detailsLink, - }, - args: { - companyName, - siteName, - }, - comment: - '`companyName` is the site domain receiving the data (typically WordPress.com), and `siteName` is the site domain sharing the data.', - } - ); + if ( isWooCoreProfiler && config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) ) { + text = translate( + 'By connecting your account, you agree to {{detailsLink}}share details{{/detailsLink}} between %(companyName)s and %(siteName)s. This connection does not add any additional plugins or change the way you run your store.', + { + components: { + detailsLink, + }, + args: { + companyName, + siteName, + }, + comment: + '`companyName` is the site domain receiving the data (typically WordPress.com), and `siteName` is the site domain sharing the data.', + } + ); + } else { + text = + from === 'my-jetpack' + ? translate( + 'By clicking {{strong}}Approve{{/strong}}, you agree to {{detailsLink}}sync your site‘s data{{/detailsLink}} with us.', + { + components: { + strong: , + detailsLink, + }, + } + ) + : translate( + 'By connecting your site, you agree to {{detailsLink}}share details{{/detailsLink}} between %(companyName)s and %(siteName)s.', + { + components: { + detailsLink, + }, + args: { + companyName, + siteName, + }, + comment: + '`companyName` is the site domain receiving the data (typically WordPress.com), and `siteName` is the site domain sharing the data.', + } + ); + } return

{ text }

; } From 09a04f37c39bf6f745600d10385e35aaa85f1c92 Mon Sep 17 00:00:00 2001 From: moon Date: Tue, 15 Oct 2024 15:25:07 -0700 Subject: [PATCH 2/5] Move TOS text --- client/jetpack-connect/authorize.js | 36 ++++++++++++++++++----------- client/jetpack-connect/style.scss | 2 +- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/client/jetpack-connect/authorize.js b/client/jetpack-connect/authorize.js index 6f8d6c45ed3e4..084b8b78c1b41 100644 --- a/client/jetpack-connect/authorize.js +++ b/client/jetpack-connect/authorize.js @@ -1058,24 +1058,34 @@ export class JetpackAuthorize extends Component { { translate( 'Sign in as a different user' ) } -
- { this.renderStateAction() } - { ! config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) && ( + { ! config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) && ( +
+ { this.renderStateAction() } - ) } - - { ! config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) && ( +
{ ' ' } { translate( 'Jetpack powered' ) }
- ) } -
+
+ ) } + + { config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) && ( +
+ + { this.renderStateAction() } +
+ ) }
{ authQuery.installedExtSuccess && } diff --git a/client/jetpack-connect/style.scss b/client/jetpack-connect/style.scss index 6b46817414a4b..78cc594115d9d 100644 --- a/client/jetpack-connect/style.scss +++ b/client/jetpack-connect/style.scss @@ -1220,7 +1220,7 @@ $colophon-height: 50px; // wpcomColophon element at the bottom } .jetpack-connect__tos-link { - margin: 24px auto 70px; + margin: 24px auto; } } From 61e37da6619ca64fa9250faec62da774d9f40089 Mon Sep 17 00:00:00 2001 From: moon Date: Wed, 16 Oct 2024 14:56:34 -0700 Subject: [PATCH 3/5] Update disclaimer copy --- client/jetpack-connect/disclaimer.jsx | 38 +++++++++++++++++++++------ client/jetpack-connect/style.scss | 4 +++ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/client/jetpack-connect/disclaimer.jsx b/client/jetpack-connect/disclaimer.jsx index aa74de9966695..d7c0e3902c84a 100644 --- a/client/jetpack-connect/disclaimer.jsx +++ b/client/jetpack-connect/disclaimer.jsx @@ -39,18 +39,40 @@ class JetpackConnectDisclaimer extends PureComponent { ); if ( isWooCoreProfiler && config.isEnabled( 'woocommerce/core-profiler-passwordless-auth' ) ) { + const termsOfServiceLink = ( + { + this.props.recordTracksEvent( 'calypso_jpc_disclaimer_tos_link_click', { + ...this.props, + } ); + } } + /> + ); + const syncDataLink = ( + { + this.props.recordTracksEvent( 'calypso_jpc_disclaimer_sync_data_link_click', { + ...this.props, + } ); + } } + /> + ); + text = translate( - 'By connecting your account, you agree to {{detailsLink}}share details{{/detailsLink}} between %(companyName)s and %(siteName)s. This connection does not add any additional plugins or change the way you run your store.', + "By clicking Connect your account, you agree to our {{termsOfServiceLink}}Terms of Service{{/termsOfServiceLink}} and to {{syncDataLink}}sync your site's data{{/syncDataLink}} with us.", { components: { - detailsLink, - }, - args: { - companyName, - siteName, + termsOfServiceLink, + syncDataLink, }, - comment: - '`companyName` is the site domain receiving the data (typically WordPress.com), and `siteName` is the site domain sharing the data.', } ); } else { diff --git a/client/jetpack-connect/style.scss b/client/jetpack-connect/style.scss index 78cc594115d9d..6a2bcc952fbce 100644 --- a/client/jetpack-connect/style.scss +++ b/client/jetpack-connect/style.scss @@ -1221,6 +1221,10 @@ $colophon-height: 50px; // wpcomColophon element at the bottom .jetpack-connect__tos-link { margin: 24px auto; + text-align: left; + a { + line-height: inherit; + } } } From 08835e4dfc81d21680a418546075e647cedae929 Mon Sep 17 00:00:00 2001 From: Moon Date: Fri, 18 Oct 2024 10:09:30 -0700 Subject: [PATCH 4/5] Update client/jetpack-connect/disclaimer.jsx Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com> --- client/jetpack-connect/disclaimer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/jetpack-connect/disclaimer.jsx b/client/jetpack-connect/disclaimer.jsx index d7c0e3902c84a..94c013dae9168 100644 --- a/client/jetpack-connect/disclaimer.jsx +++ b/client/jetpack-connect/disclaimer.jsx @@ -67,7 +67,7 @@ class JetpackConnectDisclaimer extends PureComponent { ); text = translate( - "By clicking Connect your account, you agree to our {{termsOfServiceLink}}Terms of Service{{/termsOfServiceLink}} and to {{syncDataLink}}sync your site's data{{/syncDataLink}} with us.", + "By clicking Connect your account, you agree to our {{termsOfServiceLink}}Terms of Service{{/termsOfServiceLink}} and to {{syncDataLink}}sync your site’s data{{/syncDataLink}} with us.", { components: { termsOfServiceLink, From b1d23f146a08fd42f31e70e5ea1e9231ebef552c Mon Sep 17 00:00:00 2001 From: moon Date: Fri, 18 Oct 2024 10:48:33 -0700 Subject: [PATCH 5/5] Lint fixes --- client/jetpack-connect/disclaimer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/jetpack-connect/disclaimer.jsx b/client/jetpack-connect/disclaimer.jsx index 94c013dae9168..ac9280480e9bc 100644 --- a/client/jetpack-connect/disclaimer.jsx +++ b/client/jetpack-connect/disclaimer.jsx @@ -67,7 +67,7 @@ class JetpackConnectDisclaimer extends PureComponent { ); text = translate( - "By clicking Connect your account, you agree to our {{termsOfServiceLink}}Terms of Service{{/termsOfServiceLink}} and to {{syncDataLink}}sync your site’s data{{/syncDataLink}} with us.", + 'By clicking Connect your account, you agree to our {{termsOfServiceLink}}Terms of Service{{/termsOfServiceLink}} and to {{syncDataLink}}sync your site’s data{{/syncDataLink}} with us.', { components: { termsOfServiceLink,