Skip to content

Add dashboard notification for users who abandoned express setup #13009

Description

@hussain-t

Feature Description

When a user leaves the RRM express setup incomplete, show a notification at the top of the Site Kit dashboard prompting them to resume the setup. It reads the abandoned CTAs from the RRM user settings and routes back into the express flow.

For reference, see the Resuming abandoned setup section in the design doc. See Figma design.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new notification shows at the top of the dashboard, behind the rrmExpressSetup flag.
  • It shows when the user has an incomplete newsletter signup RRM express setup (read via the new RRM user setting introduced in #13007), and is hidden otherwise.
    • To determine if the setup was incomplete, the user setting is to be compared with the list of configured CTAs for the publication.
  • The copy matches the Figma design:
    • Title: "You’re just a few steps away from collecting reader emails!"
    • Description: "It looks like you haven't finished setting up your newsletter sign-up form. Resume the setup to complete it and publish it to your site."
    • Primary CTA: "Show me".
    • Secondary CTA: "Got it".
  • The primary CTA ("Show me") resumes the express setup, routing to ?expressSetup=true&cta=<cta> for the abandoned CTA (e.g. newsletter-signup).
  • The secondary CTA ("Got it") dismisses the notification.

Implementation Brief

  • In assets/js/modules/reader-revenue-manager/components/dashboard/ and assets/js/modules/reader-revenue-manager/notifications/:
    • Add a new RRM dashboard-top notification component (eg. ResumeRRMExpressSetup) for abandoned express setup and register it alongside the existing RRM dashboard notifications.
    • Add a dedicated notification ID in assets/js/modules/reader-revenue-manager/constants.js and register it in assets/js/modules/reader-revenue-manager/notifications/index.js with NOTIFICATION_AREAS.DASHBOARD_TOP and VIEW_CONTEXT_MAIN_DASHBOARD.
    • Gate the notification behind the rrmExpressSetup flag in the notification requirement logic so it is never queued when the flag is disabled.
    • Register it in the same setup-CTA notification group as the other RRM setup entry points, with higher priority than the generic RRM setup CTA banner, so the resume notification wins when both could otherwise qualify.
    • Build the notification with an existing dashboard-top notification layout that supports explicit primary and dismiss labels, e.g. NoticeNotification, so the copy can match the design without introducing custom dismissal behavior.
    • Render the Figma copy verbatim:
      • Title: "You’re just a few steps away from collecting reader emails!"
      • Description: "It looks like you haven't finished setting up your newsletter sign-up form. Resume the setup to complete it and publish it to your site."
      • Primary CTA: "Show me"
      • Secondary CTA: "Got it"
    • Read the RRM user setting via getUserRRMSettings selector (Add REST controller and datastore infrastructure for RRM user settings #13008).
    • Consume lastActionedExpressSetups from that setting.
    • Determine whether setup was abandoned by comparing the stored CTA keys in lastActionedExpressSetups against the configured CTA list for the current RRM publication:
      • Resolve the current RRM settings/publication data before evaluating.
      • Treat a CTA as resumable only when it has a stored timestamp and no matching configured CTA exists on the publication.
    • Scope the initial UI behavior to the newsletter sign-up flow, but keep the CTA lookup/matching logic keyed by CTA type.
    • Route the primary CTA back into express setup with ?expressSetup=true&cta=<cta> for the abandoned CTA.
    • If the persisted CTA key and the setup route slug are not identical, add an explicit mapping at the notification layer instead of assuming the stored key can be passed through unchanged.
    • Use the existing Site Kit location/navigation flow for module setup entry so OAuth and the additional RRM write-scope handling remain owned by the express setup flow rather than reimplemented in the notification.
    • Use normal notification dismissal through the notifications store for the "Got it" action.
    • Keep the activation rules in checkRequirements.

Test Coverage

  • Add tests for ResumeRRMExpressSetup notification and cover all the cases.
  • Add stories for ResumeRRMExpressSetup notification in storybook.

QA Brief

  • Set up Site Kit and enable Reader Revenue Manager.
  • Enable the rrmExpressSetup feature flag.
  • On the Dashboard no abandoned setup notification should appear.
  • In the developer console run:
await googlesitekit.data.dispatch("core/user").removeDismissedItems( 'initial-setup-notification-timeout' )
await googlesitekit.data
  .dispatch("modules/reader-revenue-manager")
  .saveUserSettings({ lastActionedExpressSetups: { 'newsletter-signup': 1784964854 } });
  • Refresh, the notice should appear (other notices may need to be dismissed first).
  • Disable the rrmExpressSetup feature flag, the notice should no longer appear.
  • Re-enable the flag and return to the dashboard.
  • Clicking Show me should navigate to /wp-admin/admin.php?page=googlesitekit-dashboard&slug=reader-revenue-manager&reAuth=true&expressSetup=true&cta=newsletter-signup, with the cta parameter.
  • Clicking Got it should dismiss the notice and it should not re-appear on refresh.
  • Reset or sign in as a different admin so that the notice is no longer dismissed.
  • In the developer console run:
await googlesitekit.data.dispatch("core/user").removeDismissedItems( 'initial-setup-notification-timeout' )
  • In WP CLI, run the following to simulate a CTA being configured (there is no other method to set configured CTAs yet):
wp eval '(new \Google\Site_Kit\Modules\Reader_Revenue_Manager\Settings(new \Google\Site_Kit\Core\Storage\Options(\Google\Site_Kit\Plugin::instance()->context())))->merge(["configuredCTAs"=>["qa-newsletter"=>"newsletter-signup"]]);'
  • The notice should no longer appear.

Changelog entry

  • Add a dashboard notification prompting users to resume an abandoned Reader Revenue Manager express setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions