diff --git a/.github/workflows/js-css-lint-test.yml b/.github/workflows/js-css-lint-test.yml index 0cc3b79edd8..c586ee6b329 100644 --- a/.github/workflows/js-css-lint-test.yml +++ b/.github/workflows/js-css-lint-test.yml @@ -73,4 +73,19 @@ jobs: - name: JS Lint run: npm run lint:js - name: Jest Tests + id: test-js run: npm run test:js + continue-on-error: true + - name: Jest Tests (Retry Failures 1) + id: test-js-retry-1 + run: npm run test:js -- --onlyFailures + if: steps.test-js.outcome == 'failure' + continue-on-error: true + - name: Jest Tests (Retry Failures 2) + id: test-js-retry-2 + run: npm run test:js -- --onlyFailures + if: steps.test-js-retry-1.outcome == 'failure' + continue-on-error: true + - name: Jest Tests (Retry Failures 3) + run: npm run test:js -- --onlyFailures + if: steps.test-js-retry-2.outcome == 'failure' diff --git a/assets/js/components/KeyMetrics/ConversionReportingDashboardSubtleNotification.js b/assets/js/components/KeyMetrics/ConversionReportingDashboardSubtleNotification.js index e25a8422af4..39dbe45e5e2 100644 --- a/assets/js/components/KeyMetrics/ConversionReportingDashboardSubtleNotification.js +++ b/assets/js/components/KeyMetrics/ConversionReportingDashboardSubtleNotification.js @@ -25,51 +25,27 @@ import PropTypes from 'prop-types'; * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { createInterpolateElement } from '@wordpress/element'; /** * Internal dependencies */ -import { useSelect } from 'googlesitekit-data'; import { Button, SpinnerButton } from 'googlesitekit-components'; import StarFill from '../../../svg/icons/star-fill.svg'; import SubtleNotification from '../../googlesitekit/notifications/components/layout/SubtleNotification'; -import { CORE_SITE } from '../../googlesitekit/datastore/site/constants'; -import Link from '../Link'; export default function ConversionReportingDashboardSubtleNotification( { + description, ctaLabel, handleCTAClick, isSaving = false, onDismiss, dismissCTALabel = __( 'Maybe later', 'google-site-kit' ), } ) { - const documentationURL = useSelect( ( select ) => - select( CORE_SITE ).getDocumentationLinkURL( 'key-metrics' ) - ); - return ( Learn more', - 'google-site-kit' - ), - { - a: ( - - ), - } - ) } + description={ description } dismissCTA={ + + + + + ); +} + +export default whenActive( { moduleName: READER_REVENUE_MANAGER_MODULE_SLUG } )( + RRMIntroductoryOverlayNotification +); diff --git a/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.stories.js b/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.stories.js new file mode 100644 index 00000000000..da9c392cbb5 --- /dev/null +++ b/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.stories.js @@ -0,0 +1,82 @@ +/** + * RRMIntroductoryOverlayNotification 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. + */ + +/** + * Internal dependencies + */ +import { + provideModules, + provideUserInfo, +} from '../../../../../../tests/js/utils'; +import { MODULES_READER_REVENUE_MANAGER } from '../../datastore/constants'; +import { VIEW_CONTEXT_MAIN_DASHBOARD } from '../../../../googlesitekit/constants'; +import { Provider as ViewContextProvider } from '../../../../components/Root/ViewContextContext'; +import RRMIntroductoryOverlayNotification from './RRMIntroductoryOverlayNotification'; +import WithRegistrySetup from '../../../../../../tests/js/WithRegistrySetup'; + +function Template() { + return ; +} + +export const NoPayment = Template.bind( {} ); +NoPayment.storyName = 'Without monetary CTA'; +NoPayment.scenario = {}; +NoPayment.args = { + paymentOption: 'noPayment', +}; + +export const Empty = Template.bind( {} ); +Empty.storyName = 'Without any CTA'; +Empty.scenario = {}; +Empty.args = { + paymentOption: '', +}; + +export default { + title: 'Modules/ReaderRevenueManager/Components/Dashboard/RRMIntroductoryOverlayNotification', + decorators: [ + ( Story, { args } ) => { + const setupRegistry = ( registry ) => { + provideUserInfo( registry ); + provideModules( registry, [ + { + slug: 'reader-revenue-manager', + active: true, + connected: true, + }, + ] ); + + registry + .dispatch( MODULES_READER_REVENUE_MANAGER ) + .receiveGetSettings( { + publicationID: '1234567', + publicationOnboardingState: 'ONBOARDING_COMPLETE', + paymentOption: args.paymentOption, + } ); + }; + + return ( + + + + + + ); + }, + ], +}; diff --git a/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.test.js b/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.test.js new file mode 100644 index 00000000000..acb9ab26ad6 --- /dev/null +++ b/assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.test.js @@ -0,0 +1,178 @@ +/** + * RRMIntroductoryOverlayNotification component tests. + * + * 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 fetchMock from 'fetch-mock'; + +/** + * Internal dependencies + */ +import { + act, + fireEvent, + render, + waitFor, +} from '../../../../../../tests/js/test-utils'; +import { + createTestRegistry, + provideModules, +} from '../../../../../../tests/js/utils'; +import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants'; +import { + MODULES_READER_REVENUE_MANAGER, + READER_REVENUE_MANAGER_MODULE_SLUG, +} from '../../datastore/constants'; +import { VIEW_CONTEXT_MAIN_DASHBOARD } from '../../../../googlesitekit/constants'; +import RRMIntroductoryOverlayNotification, { + RRM_INTRODUCTORY_OVERLAY_NOTIFICATION, +} from './RRMIntroductoryOverlayNotification'; + +describe( 'RRMIntroductoryOverlayNotification', () => { + let registry; + + const dismissItemsEndpoint = new RegExp( + '^/google-site-kit/v1/core/user/data/dismiss-item' + ); + + beforeEach( () => { + registry = createTestRegistry(); + + provideModules( registry, [ + { + slug: READER_REVENUE_MANAGER_MODULE_SLUG, + active: true, + connected: true, + }, + ] ); + + registry + .dispatch( MODULES_READER_REVENUE_MANAGER ) + .receiveGetSettings( { + publicationOnboardingState: 'ONBOARDING_COMPLETE', + publicationID: '123', + paymentOption: 'noPayment', + } ); + + registry.dispatch( CORE_USER ).receiveGetDismissedItems( [] ); + } ); + + it( 'should render an introductory overlay notification when payment option is noPayment', async () => { + const { container, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_MAIN_DASHBOARD, + } + ); + + await waitForRegistry(); + + expect( container ).toHaveTextContent( + 'New! Monetize your content with Reader Revenue Manager' + ); + } ); + + it( 'should render an introductory overlay notification when payment option is empty', async () => { + registry + .dispatch( MODULES_READER_REVENUE_MANAGER ) + .setPaymentOption( '' ); + + const { container, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_MAIN_DASHBOARD, + } + ); + + await waitForRegistry(); + + expect( container ).toHaveTextContent( + 'Complete account setup with Reader Revenue Manager' + ); + } ); + + it( 'should return null when dashboard is not main dashboard', async () => { + const { container, waitForRegistry } = render( + , + { + registry, + viewContext: 'other-context', + } + ); + + await waitForRegistry(); + + expect( container ).toBeEmptyDOMElement(); + } ); + + it( 'should return null when notification is dismissed', async () => { + registry + .dispatch( CORE_USER ) + .receiveGetDismissedItems( [ + RRM_INTRODUCTORY_OVERLAY_NOTIFICATION, + ] ); + + const { container, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_MAIN_DASHBOARD, + } + ); + + await waitForRegistry(); + + expect( container ).toBeEmptyDOMElement(); + } ); + + it( 'should get dismissed when "Explore features" CTA is clicked', async () => { + fetchMock.postOnce( dismissItemsEndpoint, { + body: { + data: { + slug: RRM_INTRODUCTORY_OVERLAY_NOTIFICATION, + expiration: 0, + }, + }, + status: 200, + } ); + + const { getByRole, waitForRegistry } = render( + , + { + registry, + viewContext: VIEW_CONTEXT_MAIN_DASHBOARD, + } + ); + + await waitForRegistry(); + + // eslint-disable-next-line require-await + await act( async () => { + fireEvent.click( + getByRole( 'button', { name: /Explore features/i } ) + ); + } ); + + waitFor( () => { + expect( fetchMock ).toHaveFetched( dismissItemsEndpoint ); + } ); + } ); +} ); diff --git a/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDContributionsNotification.test.js.snap b/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDContributionsNotification.test.js.snap new file mode 100644 index 00000000000..65c71e2af85 --- /dev/null +++ b/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDContributionsNotification.test.js.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProductIDContributionsNotification should render correctly 1`] = ` +
+
+
+
+
+
+ +
+
+

+

+ New! You can now select product IDs to use with your Reader Revenue Manager snippet +

+
+
+ + + + Edit settings + + +
+
+
+
+
+
+`; diff --git a/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDSubscriptionsNotification.test.js.snap b/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDSubscriptionsNotification.test.js.snap new file mode 100644 index 00000000000..23a08fc25d7 --- /dev/null +++ b/assets/js/modules/reader-revenue-manager/components/dashboard/__snapshots__/ProductIDSubscriptionsNotification.test.js.snap @@ -0,0 +1,63 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`ProductIDSubscriptionsNotification should render correctly 1`] = ` +
+
+
+
+
+
+ +
+
+

+

+ To complete your Reader Revenue Manager paywall setup, add your product IDs in settings +

+
+
+ + + + Edit settings + + +
+
+
+
+
+
+`; diff --git a/assets/js/modules/reader-revenue-manager/components/dashboard/index.js b/assets/js/modules/reader-revenue-manager/components/dashboard/index.js index 5c6a23409a6..4e85a0754aa 100644 --- a/assets/js/modules/reader-revenue-manager/components/dashboard/index.js +++ b/assets/js/modules/reader-revenue-manager/components/dashboard/index.js @@ -16,6 +16,9 @@ * limitations under the License. */ +export { default as ProductIDContributionsNotification } from './ProductIDContributionsNotification'; +export { default as ProductIDSubscriptionsNotification } from './ProductIDSubscriptionsNotification'; export { default as PublicationApprovedOverlayNotification } from './PublicationApprovedOverlayNotification'; export { default as ReaderRevenueManagerSetupCTABanner } from './ReaderRevenueManagerSetupCTABanner'; export { default as RRMSetupSuccessSubtleNotification } from './RRMSetupSuccessSubtleNotification'; +export { default as RRMIntroductoryOverlayNotification } from './RRMIntroductoryOverlayNotification'; diff --git a/assets/js/modules/reader-revenue-manager/components/setup/SetupForm.js b/assets/js/modules/reader-revenue-manager/components/setup/SetupForm.js index f852e778b8d..3a587c07015 100644 --- a/assets/js/modules/reader-revenue-manager/components/setup/SetupForm.js +++ b/assets/js/modules/reader-revenue-manager/components/setup/SetupForm.js @@ -56,8 +56,8 @@ export default function SetupForm( { onCompleteSetup } ) { const publicationID = useSelect( ( select ) => select( MODULES_READER_REVENUE_MANAGER ).getPublicationID() ); - const serviceURL = useSelect( ( select ) => - select( MODULES_READER_REVENUE_MANAGER ).getServiceURL() + const createPublicationURL = useSelect( ( select ) => + select( MODULES_READER_REVENUE_MANAGER ).getCreatePublicationLinkURL() ); const { setValues } = useDispatch( CORE_FORMS ); @@ -119,7 +119,11 @@ export default function SetupForm( { onCompleteSetup } ) { - + { __( 'Create new publication', 'google-site-kit' ) }
diff --git a/assets/js/modules/reader-revenue-manager/constants.js b/assets/js/modules/reader-revenue-manager/constants.js index ffb5ca50aac..d58a80bd012 100644 --- a/assets/js/modules/reader-revenue-manager/constants.js +++ b/assets/js/modules/reader-revenue-manager/constants.js @@ -26,3 +26,11 @@ export const SNIPPET_MODES = { per_post: __( 'Specified pages', 'google-site-kit' ), sitewide: __( 'Site wide', 'google-site-kit' ), }; + +export const RRM_SETUP_NOTIFICATION_ID = 'rrm-setup-notification'; +export const RRM_SETUP_SUCCESS_NOTIFICATION_ID = + 'setup-success-notification-rrm'; +export const RRM_PRODUCT_ID_CONTRIBUTIONS_NOTIFICATION_ID = + 'rrm-product-id-contributions-notification'; +export const RRM_PRODUCT_ID_SUBSCRIPTIONS_NOTIFICATION_ID = + 'rrm-product-id-subscriptions-notification'; diff --git a/assets/js/modules/reader-revenue-manager/datastore/service.js b/assets/js/modules/reader-revenue-manager/datastore/service.js index f44ac861c9a..6dae45cd6d9 100644 --- a/assets/js/modules/reader-revenue-manager/datastore/service.js +++ b/assets/js/modules/reader-revenue-manager/datastore/service.js @@ -26,6 +26,7 @@ import { addQueryArgs } from '@wordpress/url'; */ import { createRegistrySelector } from 'googlesitekit-data'; import { CORE_USER } from '../../../googlesitekit/datastore/user/constants'; +import { CORE_SITE } from '../../../googlesitekit/datastore/site/constants'; import { MODULES_READER_REVENUE_MANAGER } from './constants'; const selectors = { @@ -87,6 +88,25 @@ const selectors = { }, } ); } ), + + /** + * Gets the create publication link URL for Reader Revenue Manager. + * + * @since n.e.x.t + * + * @return {string} Create publication link URL. + */ + getCreatePublicationLinkURL: createRegistrySelector( + ( select ) => () => + select( MODULES_READER_REVENUE_MANAGER ).getServiceURL( { + query: { + prefill_canonical_domain: + select( CORE_SITE ).getReferenceSiteURL(), + prefill_lang: select( CORE_SITE ).getSiteLocale(), + app_redirect: 'rrm', + }, + } ) + ), }; const store = { diff --git a/assets/js/modules/reader-revenue-manager/datastore/service.test.js b/assets/js/modules/reader-revenue-manager/datastore/service.test.js index f34f9a3b741..367d85d3bf0 100644 --- a/assets/js/modules/reader-revenue-manager/datastore/service.test.js +++ b/assets/js/modules/reader-revenue-manager/datastore/service.test.js @@ -131,5 +131,27 @@ describe( 'modules/reader-revenue-manager service store', () => { ); } ); } ); + + describe( 'getCreatePublicationLinkURL', () => { + it( 'should return the service URL that navigates to the create publication screen with the correct query params', () => { + const createPublicationLinkURL = registry + .select( MODULES_READER_REVENUE_MANAGER ) + .getCreatePublicationLinkURL(); + + const expectedURL = registry + .select( MODULES_READER_REVENUE_MANAGER ) + .getServiceURL( { + query: { + prefill_canonical_domain: 'https://example.com', + prefill_lang: 'en-US', + app_redirect: 'rrm', + }, + } ); + + expect( + new URL( decodeServiceURL( createPublicationLinkURL ) ) + ).toEqual( new URL( decodeServiceURL( expectedURL ) ) ); + } ); + } ); } ); } ); diff --git a/assets/js/modules/reader-revenue-manager/index.js b/assets/js/modules/reader-revenue-manager/index.js index 196c1f65849..43c37ab70cc 100644 --- a/assets/js/modules/reader-revenue-manager/index.js +++ b/assets/js/modules/reader-revenue-manager/index.js @@ -31,6 +31,7 @@ import { ERROR_CODE_NON_HTTPS_SITE, READER_REVENUE_MANAGER_MODULE_SLUG, LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY, + PUBLICATION_ONBOARDING_STATES, } from './datastore/constants'; import { SetupMain } from './components/setup'; import { SettingsEdit, SettingsView } from './components/settings'; @@ -48,6 +49,14 @@ import { VIEW_CONTEXT_MAIN_DASHBOARD } from '../../googlesitekit/constants'; import { CORE_MODULES } from '../../googlesitekit/modules/datastore/constants'; import { isFeatureEnabled } from '../../features'; import { CORE_USER } from '../../googlesitekit/datastore/user/constants'; +import ProductIDContributionsNotification from './components/dashboard/ProductIDContributionsNotification'; +import { + RRM_PRODUCT_ID_CONTRIBUTIONS_NOTIFICATION_ID, + RRM_PRODUCT_ID_SUBSCRIPTIONS_NOTIFICATION_ID, + RRM_SETUP_NOTIFICATION_ID, + RRM_SETUP_SUCCESS_NOTIFICATION_ID, +} from './constants'; +import ProductIDSubscriptionsNotification from './components/dashboard/ProductIDSubscriptionsNotification'; export { registerStore } from './datastore'; @@ -85,8 +94,39 @@ export const registerModule = ( modules ) => { } ); }; +async function checkRequirementsForProductIDNotification( + { select, resolveSelect }, + requiredPaymentOption +) { + await resolveSelect( MODULES_READER_REVENUE_MANAGER ).getSettings(); + + const publicationOnboardingState = select( + MODULES_READER_REVENUE_MANAGER + ).getPublicationOnboardingState(); + + const paymentOption = select( + MODULES_READER_REVENUE_MANAGER + ).getPaymentOption(); + + const productIDs = select( MODULES_READER_REVENUE_MANAGER ).getProductIDs(); + + const productID = select( MODULES_READER_REVENUE_MANAGER ).getProductID(); + + if ( + publicationOnboardingState === + PUBLICATION_ONBOARDING_STATES.ONBOARDING_COMPLETE && + productIDs.length > 0 && + productID === 'openaccess' && + paymentOption === requiredPaymentOption + ) { + return true; + } + + return false; +} + export const NOTIFICATIONS = { - 'rrm-setup-notification': { + [ RRM_SETUP_NOTIFICATION_ID ]: { Component: ReaderRevenueManagerSetupCTABanner, priority: 50, areaSlug: NOTIFICATION_AREAS.BANNERS_BELOW_NAV, @@ -132,7 +172,7 @@ export const NOTIFICATIONS = { isDismissible: true, dismissRetries: 1, }, - 'setup-success-notification-rrm': { + [ RRM_SETUP_SUCCESS_NOTIFICATION_ID ]: { Component: RRMSetupSuccessSubtleNotification, priority: 10, areaSlug: NOTIFICATION_AREAS.BANNERS_BELOW_NAV, @@ -166,6 +206,38 @@ export const NOTIFICATIONS = { }, isDismissible: false, }, + [ RRM_PRODUCT_ID_CONTRIBUTIONS_NOTIFICATION_ID ]: { + Component: ProductIDContributionsNotification, + priority: 20, + areaSlug: NOTIFICATION_AREAS.BANNERS_BELOW_NAV, + viewContexts: [ VIEW_CONTEXT_MAIN_DASHBOARD ], + isDismissible: true, + checkRequirements: async ( registry ) => { + const isActive = await checkRequirementsForProductIDNotification( + registry, + 'contributions' + ); + + return isActive; + }, + featureFlag: 'rrmModuleV2', + }, + [ RRM_PRODUCT_ID_SUBSCRIPTIONS_NOTIFICATION_ID ]: { + Component: ProductIDSubscriptionsNotification, + priority: 20, + areaSlug: NOTIFICATION_AREAS.BANNERS_BELOW_NAV, + viewContexts: [ VIEW_CONTEXT_MAIN_DASHBOARD ], + isDismissible: true, + checkRequirements: async ( registry ) => { + const isActive = await checkRequirementsForProductIDNotification( + registry, + 'subscriptions' + ); + + return isActive; + }, + featureFlag: 'rrmModuleV2', + }, }; export const registerNotifications = ( notificationsAPI ) => { diff --git a/assets/sass/components/dashboard/_googlesitekit-subtle-notification.scss b/assets/sass/components/dashboard/_googlesitekit-subtle-notification.scss index e2673a22716..89acb501978 100644 --- a/assets/sass/components/dashboard/_googlesitekit-subtle-notification.scss +++ b/assets/sass/components/dashboard/_googlesitekit-subtle-notification.scss @@ -140,4 +140,38 @@ } } } + + &.googlesitekit-subtle-notification--new-feature { + background-color: $c-violet-v-50; + + .googlesitekit-subtle-notification__icon, + .googlesitekit-subtle-notification__content { + color: $c-violet-v-600; + } + + .mdc-button { + + &.googlesitekit-subtle-notification__cta { + @include mdc-button-filled-accessible($c-violet-v-600); + } + } + + /* These styles are inherently at the same specificity as the warning styles above. */ + /* stylelint-disable-next-line no-descending-specificity */ + .mdc-button--tertiary { + + @include mdc-button-ink-color( $c-violet-v-600 ); + + &:hover { + @include mdc-button-filled-accessible( rgba( $c-violet-v-200, 0.6 ) ); + @include mdc-button-ink-color( $c-violet-v-600 ); + } + + &:active, + &:focus { + @include mdc-button-filled-accessible( $c-violet-v-200 ); + @include mdc-button-ink-color( $c-violet-v-600 ); + } + } + } } diff --git a/assets/sass/components/reader-revenue-manager/_googlesitekit-rrm-overlay-notification.scss b/assets/sass/components/reader-revenue-manager/_googlesitekit-rrm-overlay-notification.scss index 83292e96427..ef1c0a60b43 100644 --- a/assets/sass/components/reader-revenue-manager/_googlesitekit-rrm-overlay-notification.scss +++ b/assets/sass/components/reader-revenue-manager/_googlesitekit-rrm-overlay-notification.scss @@ -18,7 +18,7 @@ .googlesitekit-plugin { - .googlesitekit-reader-revenue-manager-publication-approved-notification { + .googlesitekit-reader-revenue-manager-overlay-notification { .mdc-button--raised { font-weight: 500; diff --git a/assets/svg/graphics/reader-revenue-manager-monetize-graphic-desktop.svg b/assets/svg/graphics/reader-revenue-manager-monetize-graphic-desktop.svg new file mode 100644 index 00000000000..bc43e7a397f --- /dev/null +++ b/assets/svg/graphics/reader-revenue-manager-monetize-graphic-desktop.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/svg/graphics/reader-revenue-manager-monetize-graphic-mobile.svg b/assets/svg/graphics/reader-revenue-manager-monetize-graphic-mobile.svg new file mode 100644 index 00000000000..df7c976e37a --- /dev/null +++ b/assets/svg/graphics/reader-revenue-manager-monetize-graphic-mobile.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php index 5fa061ffeaf..63face479c4 100644 --- a/includes/Core/Assets/Assets.php +++ b/includes/Core/Assets/Assets.php @@ -750,6 +750,7 @@ private function get_inline_base_data() { 'isNetworkMode' => $this->context->is_network_mode(), 'timezone' => get_option( 'timezone_string' ), 'siteName' => wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), + 'siteLocale' => $this->context->get_locale(), 'enabledFeatures' => Feature_Flags::get_enabled_features(), 'webStoriesActive' => defined( 'WEBSTORIES_VERSION' ), 'postTypes' => $this->get_post_types(), diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_0_small.png new file mode 100644 index 00000000000..2aed427be5b Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_1_medium.png new file mode 100644 index 00000000000..9cf91d2a1a0 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_2_large.png new file mode 100644 index 00000000000..c7e6330572e Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDContributionsNotification_Default_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_0_small.png new file mode 100644 index 00000000000..b8b1acfe317 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_1_medium.png new file mode 100644 index 00000000000..f8054123dd7 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_2_large.png new file mode 100644 index 00000000000..51d90e2a990 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_ProductIDSubscriptionsNotification_Default_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_0_small.png new file mode 100644 index 00000000000..62555cb7e97 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_1_medium.png new file mode 100644 index 00000000000..fda9b4e0ad7 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_2_large.png new file mode 100644 index 00000000000..1f07cf6cf59 Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_any_CTA_0_document_2_large.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_0_small.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_0_small.png new file mode 100644 index 00000000000..b35614793eb Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_0_small.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_1_medium.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_1_medium.png new file mode 100644 index 00000000000..5a229b71a2d Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_1_medium.png differ diff --git a/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_2_large.png b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_2_large.png new file mode 100644 index 00000000000..23b28e3c33c Binary files /dev/null and b/tests/backstop/reference/google-site-kit_Modules_ReaderRevenueManager_Components_Dashboard_RRMIntroductoryOverlayNotification_Without_monetary_CTA_0_document_2_large.png differ