diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/LegacySplashContent.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/LegacySplashContent.js new file mode 100644 index 00000000000..5633d22917c --- /dev/null +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/LegacySplashContent.js @@ -0,0 +1,157 @@ +/** + * LegacySplashContent component. + * + * Site Kit by Google, Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * External dependencies + */ +import PropTypes from 'prop-types'; + +/** + * WordPress dependencies + */ +import { createInterpolateElement } from '@wordpress/element'; +import { __, sprintf } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import ActivateAnalyticsNotice from '@/js/components/setup/ActivateAnalyticsNotice'; +import CompatibilityChecks from '@/js/components/setup/CompatibilityChecks'; +import Link from '@/js/components/Link'; +import P from '@/js/components/Typography/P'; +import WelcomeSVG from '@/svg/graphics/welcome.svg'; +import WelcomeAnalyticsSVG from '@/svg/graphics/welcome-analytics.svg'; +import Typography from '@/js/components/Typography'; +import { Cell, Row } from '@/js/material-components'; +import { DISCONNECTED_REASON_CONNECTED_URL_MISMATCH } from '@/js/googlesitekit/datastore/user/constants'; + +export default function LegacySplashContent( { + analyticsModuleActive, + analyticsModuleAvailable, + children, + connectedProxyURL, + description, + disconnectedReason, + getHelpURL, + homeURL, + secondAdminLearnMoreLink, + showLearnMoreLink, + title, +} ) { + const cellDetailsProp = analyticsModuleActive + ? { smSize: 4, mdSize: 8, lgSize: 6 } + : { smSize: 4, mdSize: 8, lgSize: 8 }; + + return ( + + + { analyticsModuleActive && ( + + ) } + { ! analyticsModuleActive && ( + + ) } + + + + + { title } + + +

+ { ! showLearnMoreLink && description } + + { showLearnMoreLink && + createInterpolateElement( + sprintf( + /* translators: 1: The description. 2: The learn more link. */ + __( + '%1$s %2$s', + 'google-site-kit' + ), + description, + __( 'Learn more', 'google-site-kit' ) + ), + { + Link: ( + + ), + } + ) } +

+ { getHelpURL && ( + + { __( 'Get help', 'google-site-kit' ) } + + ) } + { DISCONNECTED_REASON_CONNECTED_URL_MISMATCH === + disconnectedReason && + connectedProxyURL !== homeURL && ( +

+ { sprintf( + /* translators: %s: Previous Connected Proxy URL */ + __( '— Old URL: %s', 'google-site-kit' ), + connectedProxyURL + ) } +
+ { sprintf( + /* translators: %s: Connected Proxy URL */ + __( '— New URL: %s', 'google-site-kit' ), + homeURL + ) } +

+ ) } + + { analyticsModuleAvailable && ! analyticsModuleActive && ( + + ) } + + { children } +
+
+ ); +} + +LegacySplashContent.propTypes = { + analyticsModuleActive: PropTypes.bool, + analyticsModuleAvailable: PropTypes.bool, + children: PropTypes.func, + connectedProxyURL: PropTypes.oneOfType( [ + PropTypes.string, + PropTypes.bool, + ] ), + description: PropTypes.string, + disconnectedReason: PropTypes.string, + getHelpURL: PropTypes.string, + homeURL: PropTypes.string, + secondAdminLearnMoreLink: PropTypes.string, + title: PropTypes.string.isRequired, +}; diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/SetupFlowSVG.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/SetupFlowSVG.js new file mode 100644 index 00000000000..2baca6d33da --- /dev/null +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/SetupFlowSVG.js @@ -0,0 +1,48 @@ +/** + * SetupFlowSVG component. + * + * Site Kit by Google, Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * WordPress dependencies + */ +import { lazy, Suspense } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import PreviewBlock from '@/js/components/PreviewBlock'; +import MediaErrorHandler from '@/js/components/MediaErrorHandler'; + +const LazySVGComponent = lazy( () => + import( '../../../../svg/graphics/splash-screenshot.svg' ) +); + +export default function SetupFlowSVG() { + return ( + }> + + + + + ); +} diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/Splash.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/Splash.js index c092c2e5a15..a39987c329b 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/Splash.js +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/Splash.js @@ -24,7 +24,6 @@ import punycode from 'punycode'; /** * WordPress dependencies */ -import { createInterpolateElement } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; import { getQueryArg } from '@wordpress/url'; @@ -32,23 +31,21 @@ import { getQueryArg } from '@wordpress/url'; * Internal dependencies */ import { useSelect } from 'googlesitekit-data'; -import WelcomeSVG from '@/svg/graphics/welcome.svg'; -import WelcomeAnalyticsSVG from '@/svg/graphics/welcome-analytics.svg'; -import Link from '@/js/components/Link'; -import ActivateAnalyticsNotice from '@/js/components/setup/ActivateAnalyticsNotice'; -import CompatibilityChecks from '@/js/components/setup/CompatibilityChecks'; +import { useFeature } from '@/js/hooks/useFeature'; +import LegacySplashContent from '@/js/components/setup/SetupUsingProxyWithSignIn/LegacySplashContent'; +import SplashContent from '@/js/components/setup/SetupUsingProxyWithSignIn/SplashContent'; import { CORE_MODULES } from '@/js/googlesitekit/modules/datastore/constants'; import { CORE_SITE } from '@/js/googlesitekit/datastore/site/constants'; import { CORE_USER, DISCONNECTED_REASON_CONNECTED_URL_MISMATCH, } from '@/js/googlesitekit/datastore/user/constants'; -import { Cell, Grid, Row } from '@/js/material-components'; +import { Grid } from '@/js/material-components'; import { MODULE_SLUG_ANALYTICS_4 } from '@/js/modules/analytics-4/constants'; -import Typography from '@/js/components/Typography'; -import P from '@/js/components/Typography/P'; export default function Splash( { children } ) { + const setupFlowRefreshEnabled = useFeature( 'setupFlowRefresh' ); + const analyticsModuleAvailable = useSelect( ( select ) => select( CORE_MODULES ).isModuleAvailable( MODULE_SLUG_ANALYTICS_4 ) ); @@ -75,10 +72,6 @@ export default function Splash( { children } ) { select( CORE_SITE ).getDocumentationLinkURL( 'url-has-changed' ) ); - const cellDetailsProp = analyticsModuleActive - ? { smSize: 4, mdSize: 8, lgSize: 6 } - : { smSize: 4, mdSize: 8, lgSize: 8 }; - let title; let description; let showLearnMoreLink = false; @@ -114,6 +107,8 @@ export default function Splash( { children } ) { 'google-site-kit' ); showLearnMoreLink = true; + } else if ( setupFlowRefreshEnabled ) { + title = __( 'Let’s get started!', 'google-site-kit' ); } else { title = __( 'Set up Site Kit', 'google-site-kit' ); description = __( @@ -122,97 +117,33 @@ export default function Splash( { children } ) { ); } - return ( -
- - - - { analyticsModuleActive && ( - - ) } - { ! analyticsModuleActive && ( - - ) } - - - - - { title } - - -

- { ! showLearnMoreLink && description } + const classname = setupFlowRefreshEnabled + ? 'googlesitekit-splash' + : 'googlesitekit-setup__splash'; - { showLearnMoreLink && - createInterpolateElement( - sprintf( - /* translators: 1: The description. 2: The learn more link. */ - __( - '%1$s %2$s', - 'google-site-kit' - ), - description, - __( 'Learn more', 'google-site-kit' ) - ), - { - Link: ( - - ), - } - ) } -

- { getHelpURL && ( - - { __( 'Get help', 'google-site-kit' ) } - - ) } - { DISCONNECTED_REASON_CONNECTED_URL_MISMATCH === - disconnectedReason && - connectedProxyURL !== homeURL && ( -

- { sprintf( - /* translators: %s: Previous Connected Proxy URL */ - __( - '— Old URL: %s', - 'google-site-kit' - ), - connectedProxyURL - ) } -
- { sprintf( - /* translators: %s: Connected Proxy URL */ - __( - '— New URL: %s', - 'google-site-kit' - ), - homeURL - ) } -

- ) } + const SplashComponent = setupFlowRefreshEnabled + ? SplashContent + : LegacySplashContent; - { analyticsModuleAvailable && - ! analyticsModuleActive && ( - - ) } + const splashProps = { + analyticsModuleActive, + secondAdminLearnMoreLink, + homeURL, + analyticsModuleAvailable, + disconnectedReason, + title, + description, + getHelpURL, + connectedProxyURL, + showLearnMoreLink, + }; - { children } -
-
+ return ( +
+ + + { children } +
); diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/SplashContent.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/SplashContent.js new file mode 100644 index 00000000000..34b95cf5127 --- /dev/null +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/SplashContent.js @@ -0,0 +1,216 @@ +/** + * SplashContent component. + * + * Site Kit by Google, Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * External dependencies + */ +import PropTypes from 'prop-types'; + +/** + * WordPress dependencies + */ +import { createInterpolateElement, useCallback } from '@wordpress/element'; +import { __, sprintf } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import Checkbox from '@/js/googlesitekit/components-gm2/Checkbox'; +import CompatibilityChecks from '@/js/components/setup/CompatibilityChecks'; +import Link from '@/js/components/Link'; +import P from '@/js/components/Typography/P'; +import SplashScreenshotSVG from './SetupFlowSVG'; +import SplashBackground from '@/svg/graphics/splash-graphic.svg'; +import Typography from '@/js/components/Typography'; +import useFormValue from '@/js/hooks/useFormValue'; +import { + ANALYTICS_NOTICE_CHECKBOX, + ANALYTICS_NOTICE_FORM_NAME, +} from '@/js/components/setup/constants'; +import { Cell, Row } from '@/js/material-components'; +import { CORE_FORMS } from '@/js/googlesitekit/datastore/forms/constants'; +import { DISCONNECTED_REASON_CONNECTED_URL_MISMATCH } from '@/js/googlesitekit/datastore/user/constants'; +import { useDispatch } from '@/js/googlesitekit-data'; + +export default function SplashContent( { + analyticsModuleActive, + analyticsModuleAvailable, + children, + connectedProxyURL, + description, + disconnectedReason, + getHelpURL, + homeURL, + secondAdminLearnMoreLink, + showLearnMoreLink, + title, +} ) { + const { setValues } = useDispatch( CORE_FORMS ); + + const checked = useFormValue( + ANALYTICS_NOTICE_FORM_NAME, + ANALYTICS_NOTICE_CHECKBOX + ); + + const handleOnChange = useCallback( + ( event ) => { + setValues( ANALYTICS_NOTICE_FORM_NAME, { + [ ANALYTICS_NOTICE_CHECKBOX ]: event.target.checked, + } ); + }, + [ setValues ] + ); + + const cellDetailsProp = analyticsModuleActive + ? { smSize: 4, mdSize: 6, lgSize: 6 } + : { smSize: 4, mdSize: 7, lgSize: 6 }; + + return ( + + + +
+ +
+
+ + + + { title } + + + { ( showLearnMoreLink || description ) && ( +

+ { ! showLearnMoreLink && description } + + { showLearnMoreLink && + createInterpolateElement( + sprintf( + /* translators: 1: The description. 2: The learn more link. */ + __( + '%1$s %2$s', + 'google-site-kit' + ), + description, + __( 'Learn more', 'google-site-kit' ) + ), + { + Link: ( + + ), + } + ) } +

+ ) } + + { getHelpURL && ( + + { __( 'Get help', 'google-site-kit' ) } + + ) } + + { DISCONNECTED_REASON_CONNECTED_URL_MISMATCH === + disconnectedReason && + connectedProxyURL !== homeURL && ( +

+ { sprintf( + /* translators: %s: Previous Connected Proxy URL */ + __( '— Old URL: %s', 'google-site-kit' ), + connectedProxyURL + ) } +
+ { sprintf( + /* translators: %s: Connected Proxy URL */ + __( '— New URL: %s', 'google-site-kit' ), + homeURL + ) } +

+ ) } + + { analyticsModuleAvailable && ! analyticsModuleActive && ( +
+ ', + 'google-site-kit' + ), + { + LearnMoreLink: ( + + { __( + 'Learn more', + 'google-site-kit' + ) } + + ), + } + ) } + checked={ checked } + onChange={ handleOnChange } + value="1" + > + { __( + 'Get visitor insights by connecting Google Analytics as part of setup', + 'google-site-kit' + ) } + +
+ ) } + + { children } +
+
+ ); +} + +SplashContent.propTypes = { + analyticsModuleActive: PropTypes.bool, + analyticsModuleAvailable: PropTypes.bool, + children: PropTypes.func, + connectedProxyURL: PropTypes.oneOfType( [ + PropTypes.string, + PropTypes.bool, + ] ), + description: PropTypes.string, + disconnectedReason: PropTypes.string, + getHelpURL: PropTypes.string, + homeURL: PropTypes.string, + secondAdminLearnMoreLink: PropTypes.string, + showLearnMoreLink: PropTypes.bool, + title: PropTypes.string.isRequired, +}; diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/__snapshots__/index.test.js.snap b/assets/js/components/setup/SetupUsingProxyWithSignIn/__snapshots__/index.test.js.snap index 86b221281e0..e6abda9fda1 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/__snapshots__/index.test.js.snap +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/__snapshots__/index.test.js.snap @@ -728,3 +728,1154 @@ exports[`SetupUsingProxyWithSignIn should render the setup page, including the A `; + +exports[`SetupUsingProxyWithSignIn with the \`setupFlowRefresh\` feature flag enabled should not render the Analytics checkbox when the Analytics module is already active 1`] = ` +
+
+
+
+ +
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+

+ Let’s get started! +

+
+
+
+ +
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+`; + +exports[`SetupUsingProxyWithSignIn with the \`setupFlowRefresh\` feature flag enabled should render the setup page correctly 1`] = ` +
+
+
+
+ +
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+

+ Let’s get started! +

+
+
+
+ +
+ + + +
+
+
+
+ +
+ To get better insights about your site, Site Kit will update your Analytics account, for example by enabling enhanced measurement. + + + Learn more + + + + + +
+
+
+
+
+
+
+ +
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+`; + +exports[`SetupUsingProxyWithSignIn with the \`setupFlowRefresh\` feature flag enabled should render the setup page with the Analytics checkbox when the Analytics module is inactive 1`] = ` +
+
+
+
+ +
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+

+ Let’s get started! +

+
+
+
+ +
+ + + +
+
+
+
+ +
+ To get better insights about your site, Site Kit will update your Analytics account, for example by enabling enhanced measurement. + + + Learn more + + + + + +
+
+
+
+
+
+
+ +
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/index-setupFlowRefresh.stories.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/index-setupFlowRefresh.stories.js new file mode 100644 index 00000000000..3bd466e0e9e --- /dev/null +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/index-setupFlowRefresh.stories.js @@ -0,0 +1,283 @@ +/** + * SetupUsingProxyWithSignIn Component Stories. + * + * Site Kit by Google, Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * External dependencies + */ +import { withQuery } from '@storybook/addon-queryparams'; + +/** + * Internal dependencies + */ +import SetupUsingProxyWithSignIn from '@/js/components/setup/SetupUsingProxyWithSignIn'; +import { + CORE_USER, + DISCONNECTED_REASON_CONNECTED_URL_MISMATCH, + PERMISSION_READ_SHARED_MODULE_DATA, + PERMISSION_AUTHENTICATE, +} from '@/js/googlesitekit/datastore/user/constants'; +import { + provideSiteConnection, + provideUserAuthentication, + provideModules, + provideUserCapabilities, + provideSiteInfo, +} from '../../../../../tests/js/utils'; +import { MODULE_SLUG_SEARCH_CONSOLE } from '@/js/modules/search-console/constants'; +import { MODULE_SLUG_ANALYTICS_4 } from '@/js/modules/analytics-4/constants'; +import WithRegistrySetup from '../../../../../tests/js/WithRegistrySetup'; +import { getMetaCapabilityPropertyName } from '@/js/googlesitekit/datastore/util/permissions'; +import { Provider as ViewContextProvider } from '@/js/components/Root/ViewContextContext'; +import { VIEW_CONTEXT_MAIN_DASHBOARD } from '@/js/googlesitekit/constants'; + +function Template() { + return ( + + + + ); +} + +export const Default = Template.bind( {} ); +Default.storyName = 'Default'; +Default.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: false, + } ); + + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: false, + connected: false, + }, + ] ); + }, +}; +Default.scenario = {}; + +export const DefaultWithStagingEnvironmentWarning = Template.bind( {} ); +DefaultWithStagingEnvironmentWarning.storyName = + 'Default - Staging environment warning'; +DefaultWithStagingEnvironmentWarning.args = { + setupRegistry: ( registry ) => { + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: false, + connected: false, + }, + ] ); + }, +}; +DefaultWithStagingEnvironmentWarning.scenario = {}; + +export const DefaultWithDashboardSharing = Template.bind( {} ); +DefaultWithDashboardSharing.storyName = + 'Default - with Dashboard Sharing enabled and available'; +DefaultWithDashboardSharing.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: true, + hasMultipleAdmins: true, + } ); + + const commonModuleCapabilities = { + [ getMetaCapabilityPropertyName( + PERMISSION_READ_SHARED_MODULE_DATA, + MODULE_SLUG_SEARCH_CONSOLE + ) ]: true, + }; + provideUserCapabilities( registry, { + [ PERMISSION_AUTHENTICATE ]: true, + ...commonModuleCapabilities, + } ); + + provideModules( registry, [ + { slug: MODULE_SLUG_SEARCH_CONSOLE, active: true, connected: true }, + ] ); + }, +}; +DefaultWithDashboardSharing.scenario = {}; + +export const DefaultWithDashboardSharingOneAdmin = Template.bind( {} ); +DefaultWithDashboardSharingOneAdmin.storyName = + 'Default - with Dashboard Sharing enabled and available but there is only one admin'; +DefaultWithDashboardSharingOneAdmin.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: true, + hasMultipleAdmins: false, + } ); + + const commonModuleCapabilities = { + [ getMetaCapabilityPropertyName( + PERMISSION_READ_SHARED_MODULE_DATA, + MODULE_SLUG_SEARCH_CONSOLE + ) ]: true, + }; + provideUserCapabilities( registry, { + [ PERMISSION_AUTHENTICATE ]: true, + ...commonModuleCapabilities, + } ); + + provideModules( registry, [ + { slug: MODULE_SLUG_SEARCH_CONSOLE, active: true, connected: true }, + ] ); + }, +}; +DefaultWithDashboardSharingOneAdmin.scenario = {}; + +export const Connected = Template.bind( {} ); +Connected.storyName = 'Connected'; +Connected.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: true, + } ); + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: false, + connected: false, + }, + ] ); + }, +}; +Connected.scenario = {}; + +export const DisconnectedURLChanged = Template.bind( {} ); +DisconnectedURLChanged.storyName = 'Disconnected - URL changed'; +DisconnectedURLChanged.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: false, + } ); + provideUserAuthentication( registry, { + authenticated: false, + disconnectedReason: DISCONNECTED_REASON_CONNECTED_URL_MISMATCH, + connectedProxyURL: 'https://example.org', + } ); + }, +}; +DisconnectedURLChanged.scenario = {}; + +export const RevokedAccess = Template.bind( {} ); +RevokedAccess.storyName = 'Revoked access'; +RevokedAccess.args = { + setupRegistry: ( registry ) => { + provideSiteInfo( registry ); + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: false, + } ); + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: false, + connected: false, + }, + ] ); + }, +}; +RevokedAccess.parameters = { + query: { + googlesitekit_context: 'revoked', + }, +}; +RevokedAccess.scenario = {}; + +export const ResetSuccess = Template.bind( {} ); +ResetSuccess.storyName = 'Reset success'; +ResetSuccess.args = { + setupRegistry: ( registry ) => { + provideSiteInfo( registry ); + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: false, + } ); + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: false, + connected: false, + }, + ] ); + }, +}; +ResetSuccess.parameters = { + query: { + googlesitekit_context: '', + notification: 'reset_success', + }, +}; +ResetSuccess.scenario = {}; + +export const WithAnalyticsActive = Template.bind( {} ); +WithAnalyticsActive.storyName = 'With Analytics active'; +WithAnalyticsActive.args = { + setupRegistry: ( registry ) => { + provideSiteConnection( registry, { + hasConnectedAdmins: false, + resettable: false, + } ); + + provideModules( registry, [ + { + slug: MODULE_SLUG_ANALYTICS_4, + active: true, + connected: false, + }, + ] ); + }, +}; +WithAnalyticsActive.scenario = {}; + +export default { + title: 'Setup / Using Proxy With Sign-in and setupFlowRefresh enabled', + decorators: [ + withQuery, + ( Story, { args } ) => { + function setupRegistry( registry ) { + registry + .dispatch( CORE_USER ) + .receiveGetTracking( { enabled: false } ); + + // Call story-specific setup. + if ( typeof args?.setupRegistry === 'function' ) { + args.setupRegistry( registry ); + } + } + + return ( + + + + ); + }, + ], + parameters: { + padding: 0, + query: { googlesitekit_context: '', notification: '' }, + features: [ 'setupFlowRefresh' ], + }, +}; diff --git a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js index 7e5bc30c612..67c2916cf0b 100644 --- a/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js +++ b/assets/js/components/setup/SetupUsingProxyWithSignIn/index.test.js @@ -24,8 +24,6 @@ import { provideUserInfo, provideUserCapabilities, muteFetch, - act, - waitForDefaultTimeouts, } from '../../../../../tests/js/test-utils'; import coreModulesFixture from '@/js/googlesitekit/modules/datastore/__fixtures__'; import { CORE_MODULES } from '@/js/googlesitekit/modules/datastore/constants'; @@ -64,7 +62,7 @@ describe( 'SetupUsingProxyWithSignIn', () => { } ); it( 'should render the setup page, including the Activate Analytics notice', async () => { - const { container, getByText } = render( + const { container, getByText, waitForRegistry } = render( , { registry, @@ -72,13 +70,13 @@ describe( 'SetupUsingProxyWithSignIn', () => { } ); + await waitForRegistry(); + expect( container ).toMatchSnapshot(); expect( getByText( /Connect Google Analytics as part of your setup/ ) ).toBeInTheDocument(); - - await act( waitForDefaultTimeouts ); } ); it( 'should not render the Activate Analytics notice when the Analytics module is not available', async () => { @@ -90,7 +88,7 @@ describe( 'SetupUsingProxyWithSignIn', () => { ) ); - const { waitForRegistry, container, queryByText } = render( + const { container, waitForRegistry, queryByText } = render( , { registry, @@ -106,4 +104,87 @@ describe( 'SetupUsingProxyWithSignIn', () => { queryByText( /Connect Google Analytics as part of your setup/ ) ).not.toBeInTheDocument(); } ); + + describe( 'with the `setupFlowRefresh` feature flag enabled', () => { + it( 'should render the setup page correctly', async () => { + const { container, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_SPLASH, + features: [ 'setupFlowRefresh' ], + } + ); + + await waitForRegistry(); + + expect( container ).toMatchSnapshot(); + } ); + + it( 'should render the setup page with the Analytics checkbox when the Analytics module is inactive', async () => { + registry.dispatch( CORE_MODULES ).receiveGetModules( + coreModulesFixture.map( ( module ) => { + if ( MODULE_SLUG_ANALYTICS_4 === module.slug ) { + return { + ...module, + active: false, + }; + } + return module; + } ) + ); + + const { container, getByText, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_SPLASH, + features: [ 'setupFlowRefresh' ], + } + ); + + await waitForRegistry(); + + expect( container ).toMatchSnapshot(); + + expect( + getByText( + /Get visitor insights by connecting Google Analytics as part of setup/ + ) + ).toBeInTheDocument(); + } ); + + it( 'should not render the Analytics checkbox when the Analytics module is already active', async () => { + registry.dispatch( CORE_MODULES ).receiveGetModules( + coreModulesFixture.map( ( module ) => { + if ( MODULE_SLUG_ANALYTICS_4 === module.slug ) { + return { + ...module, + active: true, + }; + } + return module; + } ) + ); + + const { container, queryByText, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_SPLASH, + features: [ 'setupFlowRefresh' ], + } + ); + + await waitForRegistry(); + + expect( container ).toMatchSnapshot(); + + expect( + queryByText( + /Get visitor insights by connecting Google Analytics as part of setup/ + ) + ).not.toBeInTheDocument(); + } ); + } ); } ); diff --git a/assets/sass/admin.scss b/assets/sass/admin.scss index 1212a102808..2b17f1d5954 100644 --- a/assets/sass/admin.scss +++ b/assets/sass/admin.scss @@ -175,6 +175,7 @@ // Setup @import "components/setup/googlesitekit-setup"; +@import "components/setup/googlesitekit-splash"; @import "components/setup/googlesitekit-setup-module"; @import "components/setup/googlesitekit-adsense-connect-cta"; diff --git a/assets/sass/components/setup/_googlesitekit-setup.scss b/assets/sass/components/setup/_googlesitekit-setup.scss index 74a9f746ba2..4344ec4fddb 100644 --- a/assets/sass/components/setup/_googlesitekit-setup.scss +++ b/assets/sass/components/setup/_googlesitekit-setup.scss @@ -23,6 +23,10 @@ @include googlesitekit-inner-padding; padding-top: 10px; + .googlesitekit-layout { + overflow: hidden; + } + .googlesitekit-opt-in { margin-bottom: 8px; margin-top: 8px; diff --git a/assets/sass/components/setup/_googlesitekit-splash.scss b/assets/sass/components/setup/_googlesitekit-splash.scss new file mode 100644 index 00000000000..fcb326ffe1d --- /dev/null +++ b/assets/sass/components/setup/_googlesitekit-splash.scss @@ -0,0 +1,135 @@ +/** + * Splash styles. + * + * Site Kit by Google, Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.googlesitekit-plugin { + + .googlesitekit-splash { + @include googlesitekit-inner-padding; + overflow: hidden; + + @media (min-width: $bp-tablet) { + padding-bottom: 0; + padding-right: 0; + + .googlesitekit-layout { + overflow: hidden; + } + + & > .mdc-layout-grid { + padding-bottom: 0; + padding-right: 0; + } + } + + .googlesitekit-setup__title { + color: $c-surfaces-on-surface; + } + + .googlesitekit-setup__description { + margin-top: 24px; + } + + .mdc-form-field { + align-items: flex-start; + } + + .googlesitekit-setup__analytics-opt-in-wrapper { + margin-top: 24px; + + .mdc-checkbox { + margin-top: -10px; + } + + .mdc-checkbox__content { + display: flex; + flex-direction: column; + gap: $cta-gap-phone; + } + + .mdc-checkbox__description { + color: $c-surfaces-on-background-variant; + font-size: $fs-label-sm; + } + + &::after { + background-color: $c-silver; + content: ""; + display: block; + height: 1px; + margin: $grid-gap-desktop 0; + } + } + + .googlesitekit-opt-in { + label { + color: $c-surfaces-on-background-variant; + + span { + display: inline; + } + } + + .mdc-checkbox { + margin-top: -13px; + } + } + + .googlesitekit-setup__splash-graphic-background { + position: absolute; + right: 0; + z-index: 10; + } + + .googlesitekit-setup__splash-graphic-screenshot { + height: 100%; + width: 100%; + + @media (max-width: $bp-desktop) { + max-height: 511px; + } + + svg { + margin: 0 4%; + position: relative; + top: 30px; + z-index: 11; + + @media (max-width: $bp-desktop) { + left: 0; + } + } + } + + .googlesitekit-setup__icon { + position: relative; + + @media (max-width: $bp-desktop) { + align-items: center; + display: flex; + margin-bottom: $grid-gap-desktop; + overflow: hidden; + } + } + + @media (max-width: $bp-mobileOnly) { + .googlesitekit-setup__content { + padding: 0; + } + } + } +} diff --git a/assets/svg/graphics/splash-graphic.svg b/assets/svg/graphics/splash-graphic.svg new file mode 100644 index 00000000000..e16294f3f25 --- /dev/null +++ b/assets/svg/graphics/splash-graphic.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/svg/graphics/splash-screenshot.svg b/assets/svg/graphics/splash-screenshot.svg new file mode 100644 index 00000000000..ace2f28db8b --- /dev/null +++ b/assets/svg/graphics/splash-screenshot.svg @@ -0,0 +1 @@ + diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_0_small.png new file mode 100644 index 00000000000..8714b179367 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_1_medium.png new file mode 100644 index 00000000000..fc7140c47f2 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_2_large.png new file mode 100644 index 00000000000..594f1147860 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Connected_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_0_small.png new file mode 100644 index 00000000000..a00d5da1d72 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_1_medium.png new file mode 100644 index 00000000000..0eb61745d62 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_2_large.png new file mode 100644 index 00000000000..48dcb707aff Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_Staging_environment_warning_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_0_small.png new file mode 100644 index 00000000000..2db632dace6 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_1_medium.png new file mode 100644 index 00000000000..0b24460595c Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_2_large.png new file mode 100644 index 00000000000..74b28b2665e Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_0_small.png new file mode 100644 index 00000000000..cf3d705e370 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_1_medium.png new file mode 100644 index 00000000000..6764e195bde Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_2_large.png new file mode 100644 index 00000000000..28f78bc7791 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_-_with_Dashboard_Sharing_enabled_and_available_but_there_is_only_one_admin_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_0_small.png new file mode 100644 index 00000000000..50552d2be47 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_1_medium.png new file mode 100644 index 00000000000..8a9a3919cd2 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_2_large.png new file mode 100644 index 00000000000..a36d333a240 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Default_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_0_small.png new file mode 100644 index 00000000000..b48d461a658 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_1_medium.png new file mode 100644 index 00000000000..7dcce865eaf Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_2_large.png new file mode 100644 index 00000000000..eacac427311 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Disconnected_-_URL_changed_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_0_small.png new file mode 100644 index 00000000000..60f9a24f43d Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_1_medium.png new file mode 100644 index 00000000000..3461d93249b Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_2_large.png new file mode 100644 index 00000000000..f326d8886b3 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Reset_success_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_0_small.png new file mode 100644 index 00000000000..2b70cb58981 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_1_medium.png new file mode 100644 index 00000000000..07002b608eb Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_2_large.png new file mode 100644 index 00000000000..fca46e0518b Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_Revoked_access_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_0_small.png new file mode 100644 index 00000000000..0dd52882a92 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_1_medium.png new file mode 100644 index 00000000000..0b77354b54f Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_2_large.png new file mode 100644 index 00000000000..b6688038aef Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Setup___Using_Proxy_With_Sign-in_and_setupFlowRefresh_enabled_With_Analytics_active_0_document_2_large.png differ