Skip to content

Commit

Permalink
Rename RRM dismissal key to be legacy.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Jan 10, 2025
1 parent 2406bda commit 0889c1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { CORE_MODULES } from '../../../../googlesitekit/modules/datastore/consta
import {
ERROR_CODE_NON_HTTPS_SITE,
READER_REVENUE_MANAGER_MODULE_SLUG,
READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY,
LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY,
} from '../../datastore/constants';
import { VIEW_CONTEXT_MAIN_DASHBOARD } from '../../../../googlesitekit/constants';
import useActivateModuleCallback from '../../../../hooks/useActivateModuleCallback';
Expand Down Expand Up @@ -373,7 +373,7 @@ describe( 'ReaderRevenueManagerSetupCTABanner', () => {

it( 'is not active when the banner was dismissed with the legacy dismissal key', async () => {
registry.dispatch( CORE_USER ).receiveGetDismissedPrompts( {
[ READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY ]: {
[ LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY ]: {
expires: Date.now() / 1000 + WEEK_IN_SECONDS,
count: 1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const PUBLICATION_ONBOARDING_STATES = {
export const UI_KEY_READER_REVENUE_MANAGER_SHOW_PUBLICATION_APPROVED_NOTIFICATION =
'READER_REVENUE_MANAGER_SHOW_PUBLICATION_APPROVED_NOTIFICATION';

export const READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY =
export const LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY =
'rrm_module_setup_banner_dismissed_key';

export const READER_REVENUE_MANAGER_SETUP_FORM =
Expand Down
4 changes: 2 additions & 2 deletions assets/js/modules/reader-revenue-manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
MODULES_READER_REVENUE_MANAGER,
ERROR_CODE_NON_HTTPS_SITE,
READER_REVENUE_MANAGER_MODULE_SLUG,
READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY,
LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY,
} from './datastore/constants';
import { SetupMain } from './components/setup';
import { SettingsEdit, SettingsView } from './components/settings';
Expand Down Expand Up @@ -97,7 +97,7 @@ export const NOTIFICATIONS = {
// to use the `notification ID` as the dismissal key, is dismissed.
await resolveSelect( CORE_USER ).getDismissedPrompts();
const isDismissed = select( CORE_USER ).isPromptDismissed(
READER_REVENUE_MANAGER_SETUP_BANNER_DISMISSED_KEY
LEGACY_RRM_SETUP_BANNER_DISMISSED_KEY
);

const canActivateRRMModule = await resolveSelect(
Expand Down

0 comments on commit 0889c1b

Please sign in to comment.