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

As a second admin, banners still show even after disabling the feature

Open wpdarren opened this issue 1 year ago • 4 comments

Bug Description

Created from bug bash. Asana ticket can be found here.

As a second admin, banners still show even after disabling the feature.

Image

Steps to reproduce

  1. Setup AS as an admin
  2. Switch to a secondary admin account, got to the settings and disable the feature
  3. When you go back to the dashboard you still see the setup banner and subtle success notification even though the widget area is now hidden.

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

Acceptance criteria

  • Given that the Intro Popup/Banner has not been dismissed for a secondary user:
    • If the user toggles the "Display visitor groups in the dashboard" setting off, the popup/banner should no longer show up on the dashboard.
    • Toggling the setting on again should restore the popup/banner.
  • The Setup Success Banner should not appear at all for a secondary user, however this will be addressed via https://github.com/google/site-kit-wp/issues/9482.

Implementation Brief

  • [ ] In the AudienceSegmentationIntroductoryOverlayNotification component, retrieve the isAudienceSegmentationWidgetHidden value. Add a check for isAudienceSegmentationWidgetHidden === false to the condition that determines if the notification should be displayed:

https://github.com/google/site-kit-wp/blob/dfcc37f37c0672470309e63f6f0d02b7598e4e86/assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationIntroductoryOverlayNotification.js#L110-L113

Test Coverage

  • Add a test case to the JS tests for the component, and fix its story/VRT.

QA Brief

  • Follow the steps to reproduce, and confirm the Intro Popup/Banner does not appear.
  • Toggle the feature back on, and return to the dashboard. The Intro Popup/Banner should reappear.

Note that, as per the AC, the Setup Success Banner will be addressed separately via #9482.

Changelog entry

  • Fix an issue that caused the visitor groups overlay notification to appear unexpectedly.

wpdarren avatar Oct 09 '24 08:10 wpdarren

IB ✅

nfmohit avatar Oct 14 '24 19:10 nfmohit

QA Update ⚠

  • Tested on dev environment.
  • Tested on both secondary admin dashboard and view only dashboard.
  • Verified that issue is resolve now for secondary admin.
  • Verified that when secondary admin disable the feature then widgets and banner do not appear on main dashboard.
  • Note : I created separate ticket https://github.com/google/site-kit-wp/issues/9541 for the notification showing under admin settings.

Question

@techanvil I've noticed that the banner and widgets still appear on the view-only dashboard, even after both the secondary and primary admins disable the feature. Is this expected behaviour? My understanding is that if the primary admin who shared the modules disables the feature, the banner should no longer appear on the view-only dashboard.

Here’s the sequence I observed:

  1. The primary admin sets up and shares the Analytics module with the secondary admin and the view-only dashboard.
  2. The secondary admin disables the feature under settings.
  3. The banner stops appearing on the main dashboard for the secondary admin.
  4. The primary admin also disables the feature under settings.
  5. When logging in as a view-only user, the banner and widgets still show on the view-only dashboard.
  6. Could you please share your thoughts on this?

https://github.com/user-attachments/assets/500ca4e6-aebb-4ea4-bfc0-9b98856b9c54

PASS CASE

https://github.com/user-attachments/assets/162b5af6-8d22-4980-b9a5-49f22895def3

mohitwp avatar Oct 21 '24 13:10 mohitwp

Hi @mohitwp, thanks for checking in on this.

The "Display visitor groups in the dashboard" setting is per-user, not a global setting, so the behaviour you are seeing is as expected.

In fact, at the moment it's not possible for a view-only user to toggle the setting at all, as they don't have access to the Settings screen, this is a known shortcoming in the UX that we will address at some point but it's as expected for the time being.

techanvil avatar Oct 21 '24 14:10 techanvil

QA Update ✅

  • Tested on dev environment.
  • Tested on both secondary admin dashboard and view only dashboard.
  • Verified that issue is resolve now for secondary admin.
  • Verified that when secondary admin disable the feature then widgets and banner do not appear on main dashboard.
  • Note : I created separate ticket https://github.com/google/site-kit-wp/issues/9541 for the notification showing under admin settings.

https://github.com/user-attachments/assets/162b5af6-8d22-4980-b9a5-49f22895def3

mohitwp avatar Oct 21 '24 14:10 mohitwp