site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Ensure the Site Kit setup notification is not shown when the Welcome modal is present.

Open techanvil opened this issue 1 month ago • 3 comments

Feature Description

Ensure the Site Kit setup notification is not shown when the Welcome modal is present.

See the Site Kit setup success notification section in the Design Doc.


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

Acceptance criteria

  • The existing “Congrats on completing the setup for Site Kit!” setup success notification is not shown when the user lands on the dashboard from the initial setup flow and sees the Welcome modal.
  • If the user disconnects and reconnects Site Kit, having already seen and dismissed the Welcome modal, the existing setup success notification is shown.
  • These changes are gated behind the setupFlowRefresh feature flag.

Implementation Brief

See the implementation guide in the Design Doc for guidelines on how to implement this issue.

  • [ ] Update assets/js/components/key-metrics-setup/KeyMetricsSetupApp.js
    • [ ] Update the submitChanges callback so that the notification query param is always set, regardless of !isInitialSetupFlow.
  • [ ] Update the ModuleSetupSuccessNotification notification's checkRequirements function in assets/js/googlesitekit/notifications/register-defaults.js
    • [ ] Check if the modal has been dismissed using isItemDismissed with the tour version slug ("welcome-modal-with-tour")
    • [ ] If setupFlowRefresh is enabled AND the welcome modal has NOT been dismissed, return false
  • [ ] Update assets/js/components/WelcomeModal.tsx
    • [ ] In the dismissModal callback, unset the "notification" and "slug" query params so that refreshing after dismissal does not cause the success notification to appear

Test Coverage

  • Update the KeyMetricsSetupApp tests since setting the query param is no longer conditional to setupFlowRefresh

QA Brief

Changelog entry

techanvil avatar Nov 22 '25 15:11 techanvil

Hey @abdelmalekkkkk, thanks for drafting this IB.

One small detail - we don't want to set the slug query param in KeyMetricsSetupApp when isInitialSetupFlow is true, only the notification param. This is because we want to show the site setup success notification when reconnecting, not the Analytics module success notification.

techanvil avatar Dec 11 '25 00:12 techanvil

Thanks @techanvil. I updated the IB accordingly.

abdelmalekkkkk avatar Dec 11 '25 14:12 abdelmalekkkkk

Thanks @abdelmalekkkkk, that's great. LGTM!

IB ✅

techanvil avatar Dec 15 '25 11:12 techanvil