Skip to content

Implement the top-of-list success notice on return #13356

Closed

Description

@techanvil

Feature Description

Setting a feature up sometimes takes the user out of the hub altogether — into a Site Kit setup flow, or off to a Google service — and when they're finished the hub brings them back (#13338). Landing back on a list that looks much as it did before leaves them to work out for themselves whether what they went off to do actually worked.

This issue adds the confirmation they come back to: a success notice at the top of the list, on the tab they're returned to, telling them what they now have and where they can manage it. It's the same notice the hub already shows when a feature is set up without the user leaving the page (#13346), saying the same thing — in a second placement, because by the time the user is back the feature is set up and its card is gone from the list.

The notice belongs to the visit they returned in. Dismissing it, reloading, or coming back later leaves the hub in its ordinary state. And it's only shown when the feature really is set up, so a setup the user started and abandoned confirms nothing.

For reference, see the Success detection & removal and Returning to the hub sections in the design doc, and the success notice design in Figma.


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

Acceptance criteria

Implementation Brief

  • In pending-setup flow added by Implement the shared setup-flow mechanism + the return to the hub #13338:

    • consumePendingSetup() is called exactly once on FeatureDiscoveryApp mount and stored in core/feature-discovery session state via receivePendingSetup().
    • getPendingSetup() is then the source of truth for whether the hub visit is a return-from-setup visit.
  • In assets/js/googlesitekit/notifications/constants.js:

    • Reuse NOTIFICATION_AREAS.FEATURE_DISCOVERY_WHATS_NEW_TOP for the What's new tab area (as introduced by Surface the auto-updates CTA notice in the hub #13323).
    • Add a new area constant for All services and features, NOTIFICATION_AREAS.FEATURE_DISCOVERY_ALL_SERVICES_TOP = 'notification-area-feature-discovery-all-services-top'.
    • Add notification IDs for top-of-list setup success in each area, e.g. FEATURE_DISCOVERY_SETUP_SUCCESS_WHATS_NEW_NOTIFICATION and FEATURE_DISCOVERY_SETUP_SUCCESS_ALL_SERVICES_NOTIFICATION.
  • In assets/js/components/feature-discovery/whats-new/WhatsNewTab.tsx (Build the "What's new?" tab #13321/Surface the auto-updates CTA notice in the hub #13323):

    • Ensure the existing top notification slot uses NOTIFICATION_AREAS.FEATURE_DISCOVERY_WHATS_NEW_TOP with NOTIFICATION_GROUPS.SETUP_CTAS.
  • In assets/js/components/feature-discovery/all-services/AllServicesTab.tsx (Build the "All services and features" tab + goal groups #13328):

    • Mount a top notification slot above the feature list using NOTIFICATION_AREAS.FEATURE_DISCOVERY_ALL_SERVICES_TOP and NOTIFICATION_GROUPS.SETUP_CTAS.
  • Create assets/js/components/feature-discovery/FeatureDiscoverySetupSuccessNotification.tsx — the registered notification for the shared top-of-tab slot:

    • Props: { id, Notification }
    • Read pendingSetup using getPendingSetup selector and use slug = pendingSetup?.featureSlug; return null if not set.
    • onDismiss: dispatch receivePendingSetup( null ) in core/feature-discovery so the notice is shown once in the returned visit only.
    • Render <Notification><FeatureSuccessNotice slug={ slug } onDismiss={ onDismiss } /></Notification> — reuse the in-place notice built in Implement in-place success detection & notice #13346 unchanged (same title/description/CTA/dismiss from the feature's successNotice), wrapped in the framework's Notification HOC for view tracking, modelled on ModuleSetupSuccessNotification.
  • In assets/js/googlesitekit/notifications/register-defaults.js, register two top-of-list success notifications (same component/settings, different areaSlug):

    • What's new registration: areaSlug: NOTIFICATION_AREAS.FEATURE_DISCOVERY_WHATS_NEW_TOP, groupID: NOTIFICATION_GROUPS.SETUP_CTAS, priority: PRIORITY.SETUP_CTA_HIGH, viewContexts: [ VIEW_CONTEXT_FEATURE_DISCOVERY ].
    • All services registration: areaSlug: NOTIFICATION_AREAS.FEATURE_DISCOVERY_ALL_SERVICES_TOP, groupID: NOTIFICATION_GROUPS.SETUP_CTAS, priority: PRIORITY.SETUP_CTA_HIGH, viewContexts: [ VIEW_CONTEXT_FEATURE_DISCOVERY ].
    • Use one shared checkRequirements callback that reads pendingSetup = select( CORE_FEATURE_DISCOVERY ).getPendingSetup() and returns false when absent.
    • From pendingSetup.featureSlug, resolve feature = select( CORE_FEATURE_DISCOVERY ).getFeature( featureSlug ); return false when missing.
    • Before evaluating connection state, wait for state that can affect isFeatureConnected:
      • await resolveSelect( CORE_MODULES ).getModules().
      • Where feature.setup.moduleSlug exists, get the module via select( CORE_MODULES ).getModule( feature.setup.moduleSlug ); if it has a storeName and that store exposes getSettings, await resolveSelect( module.storeName ).getSettings().
      • await resolveSelect( CORE_SITE ).getSiteInfo() for feature checks that rely on site-level state (e.g. Key Metrics completion).
    • Finally, require select( CORE_FEATURE_DISCOVERY ).isFeatureConnected( featureSlug ) === true; otherwise return false. This preserves the "abandoned setup confirms nothing" rule.
    • Keep the existing auto-updates notice registration in the What's new area at lower precedence (SETUP_CTA_LOW), so the success notice wins that slot until dismissed, after which auto-updates can occupy it again.

Test Coverage

  • Add FeatureDiscoverySetupSuccessNotification.test.tsx: renders FeatureSuccessNotice when getPendingSetup() returns a feature slug, renders nothing when pending setup is missing, and dismissing calls receivePendingSetup( null ).
  • Extend register-defaults.test.js for both registrations (What's new area and All services area):
    • checkRequirements returns false for no pending setup or unknown feature slug.
    • checkRequirements waits for required resolution (getModules, plus module store settings/site info where applicable) before evaluating.
    • checkRequirements returns true only when isFeatureConnected( featureSlug ) === true; returns false when unresolved/false.
    • On What's new, success notice precedence over auto-updates is preserved by priority and group/area alignment.
  • Extend WhatsNewTab.test.tsx to confirm it mounts NOTIFICATION_AREAS.FEATURE_DISCOVERY_WHATS_NEW_TOP with NOTIFICATION_GROUPS.SETUP_CTAS.
  • Extend AllServicesTab.test.tsx (Build the "All services and features" tab + goal groups #13328) to confirm it mounts NOTIFICATION_AREAS.FEATURE_DISCOVERY_ALL_SERVICES_TOP with NOTIFICATION_GROUPS.SETUP_CTAS.

QA Brief

Changelog entry

  • Add success notice when using new Feature Discovery Hub setup.

Activity

  1. added
    P0
    Team M
    Type: Enhancement
    and removed on Aug 18, 2026
  2. hussain-t commented on Sep 17, 2026

    @hussain-t
    Collaborator

    @techanvil, following on from your review on #13323: #13323 gives the auto-updates notice an area of its own, FEATURE_DISCOVERY_WHATS_NEW_TOP, mounted on What's new? only. So this issue needs its own area for All services and features and a success notice registered for both, rather than the shared FEATURE_DISCOVERY_TOP it has now. The design doc describes the same shared slot, so that needs updating too.

  3. self-assigned this
    on Sep 29, 2026
  4. techanvil commented on Sep 29, 2026

    @techanvil
    CollaboratorAuthor

    Hi @ankitrox, thanks for the IB. A few points:

    • As per Hussain's comment above, the notification will need to be registered for FEATURE_DISCOVERY_WHATS_NEW_TOP, and we'll need to add a new notification area for the "All services and features" tab.
    • As discussed, consumePendingSetup() will be called on FeatureDiscoveryApp mount, so we don't need any changes to getPendingSetupReturnURL() here. We might be able to simplify things and call getPendingSetup() directly in the notification's checkRequirements() callback.
    • checkRequirements() may need to wait for some additional state to resolve, e.g. module settings.
  5. 2 remaining items

  6. techanvil commented on Oct 2, 2026

    @techanvil
    CollaboratorAuthor

    Thanks @ankitrox! That LGTM.

    IB ✅

  7. removed their assignment
    on Oct 2, 2026
  8. removed their assignment
    on Oct 27, 2026
  9. assigned and unassigned on Oct 28, 2026
  10. self-assigned this
    on Nov 2, 2026
  11. wpdarren commented on Nov 3, 2026

    @wpdarren
    Collaborator

    QA Update: ✅

    Verified:

    • A success notice is shown when returning to the hub upon completion of the setup.
      • Analytics, AdSense, Ads, and SiwG should all work as expected now.
      • I also tested Ad Blocking Recovery and RRM newsletter. The others have not been implemented yet.
    • The notice is shown in the tab you're returned to.
    • The auto-updates notice can be shown in the "What's new" tab when the success notice is shown in the "All services" tab.
    Screenshots Image Image Image Image Image Image Image
  12. removed their assignment
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Team MType: Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions