-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate messages creating odd UX/UI when 2nd Admin user does not have access to Analytics #7004
Comments
IB ✅ Assigning to @jimmymadon since he's working on #7005 and they're closely related. |
@nfmohit @techanvil @aaemnnosttv While working on preventing requests to fetch properties when the current logged in user doesn't have access to the Analytics account - I realised there are a few places in the code which completely hide the "Universal Analytics" toggle and settings if there are no properties available. I am not sure if this is desirable. I believe we would still want to show the toggle and the settings but they should be disabled like the rest of the settings. I will create a separate issue to fix this. We simply have to differentiate between when the properties aren't available due to no access or because there really aren't any properties available for the selected account. Some small tweaks will be required below: site-kit-wp/assets/js/modules/analytics/components/common/AccountSelect.js Lines 72 to 76 in b5177d3
site-kit-wp/assets/js/modules/analytics/components/settings/SettingsForm.js Lines 142 to 154 in b5177d3
site-kit-wp/assets/js/modules/analytics/components/common/EnableUniversalAnalytics.js Lines 115 to 117 in b5177d3
|
@jimmymadon If the interface would otherwise include the toggle, then that means that UA wasn't already connected, so it wouldn't be possible to enable UA in this situation and the only enhancement to make here would be to show the toggle but in a disabled state. I don't think it would make sense to allow enabling it only to not be able to do anything (no point in toggling it only to reveal disabled controls). I suppose rather than hiding the toggle entirely, we could render it in a disabled OFF state so that it wouldn't introduce loading-related layout shifts. Does that make sense? |
@aaemnnosttv In my testing, if Screen.Recording.2023-05-09.at.15.59.32.mov |
QA Update ✅Verified
When 'ga4Reporting' feature flag is enabled and only GA4 is connected. Recording.332.mp4When 'ga4Reporting' feature flag is enabled and both GA4 and UA is connected. Recording.333.mp4When dashboard view is UA. Recording.334.mp4When 'ga4Reporting' feature flag is not enabled. Recording.335.mp4When 'ga4Reporting' feature flag is not enabled and only GA4 is connected. Recording.336.mp4 |
LGTM 👍 |
Bug Description
Bug found during testing #6224. When you edit Analytics settings as a second admin user who does not have access to the Analytics account/property, a notice appears underneath the drop downs. We now have red error messages appearing within the UI which in my opinion makes for an odd user experience.
From chatting with Tom.
In my opinion, we should remove the red error messages when there are grey warning notices on the settings.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/modules/analytics/components/settings/SettingsForm.js
:getProperties
, check ifhasAnalyticsAccess
ORhasAnalytics4Access
are falsy in addition to theaccountID
check.assets/js/modules/analytics/components/common/AccountSelect.js
:getProperties
, check ifhasModuleAccess
is falsy in addition to theaccountID
check.WebDataStreamSelect.js
andPropertyOrWebDataStreamNotAvailableError.js
:webDataStreams
usinggetMatchingWebDataStreamsByPropertyID
, check ifhasModuleAccess
is not false in addition to theisValidPropertyID( propertyID )
check.Test Coverage
QA Brief
ga4Reporting
feature flag disabled and UA is connected.ga4Reporting
feature flag enabled and only GA4 is connected.ga4Reporting
feature flag enabled and both GA4 and UA are connected.ga4Reporting
feature flag. Also, verify using an account with existing properties rather than only creating a new account / property on a new site.Changelog entry
The text was updated successfully, but these errors were encountered: