google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 291 forks source link

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

Closed wpdarren closed 6 days ago

wpdarren commented 4 weeks ago

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

Implementation Brief

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

Test Coverage

QA Brief

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

Changelog entry

nfmohit commented 3 weeks ago

IB ✅

mohitwp commented 2 weeks ago

QA Update ⚠

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
techanvil commented 2 weeks ago

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.

mohitwp commented 2 weeks ago

QA Update ✅

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