-
Notifications
You must be signed in to change notification settings - Fork 286
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
Show the Introductory Popup / Banner to view-only users and secondary admins #8172
Comments
Hi @ankitrox, thanks for drafting this IB. Here are a few points:
Lines 182 to 201 in 51452f6
|
Hi @techanvil , Thanks for reviewing the IB. I've addressed the feedback points mentioned in the comments and updated the IB. Assigning this to you for re-review. |
Thanks @ankitrox. The main body of the IB is looking good (although it needed a tweak for formatting, please review). I have though realised the Test Coverage section is written in a way that would encourage more spying on implementation details. We don't really want to test whether Also, although it does look like we're in the process of setting a precedent of testing whether an action has been dispatched by spying on it, we should still try to stick with our more usual approach where we can. As such the more conventional approach would be to mock the For example here are a couple of existing tests for dismissing a UI item: Lines 436 to 466 in 817317d
site-kit-wp/assets/js/modules/adsense/components/dashboard/AdSenseConnectCTAWidget.test.js Lines 113 to 125 in 817317d
To be honest, we don't usually specify the test coverage in an IB in such detail. I would suggest simply specifying that we provide test coverage for the relevant behaviour, and leave the details to implementation time. |
Hi @techanvil Assigning this to you to re-review the test coverage section. Thanks again! |
That's great, thanks @ankitrox. The IB LGTM! ✅ |
The PR #9239 is ready, but this issue will be parked in execution till #8130 gets merged. Once #8130 is merged, need to do following checks before moving it to CR.
|
QA Update
|
QA Update ❌
Issue : Popup/Banner appearing on entity dashboard for secondary admin which is not expected. Recording.1420.mp4Note : For the issue reported above I created a separate ticket #9411 |
Thank you @mohitwp I've created a follow-up PR #9416 to address the issue you have reported. @techanvil Can you please look review the PR if you have bandwidth? I have not assigned you directly in case you are already occupied with something else. |
Thanks @ankitrox! I'll get that PR reviewed 👍 |
Reviewed and merged, back to you for another pass @mohitwp. |
QA Update
|
Hi @mohitwp, thanks for spotting that. It does not appear to be related to the changes in this issue, please can you raise a new one for it? |
QA Update ✅
Recording.1439.mp4 |
Feature Description
Show the Introductory Popup / Banner to view-only users and secondary admins to introduce the feature once it has been set up.
See dashboard sharing and secondary admins in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Rendering the banner/popup is handled here. It will be visible when the Audience Segmentation feature is enabled.
audienceSegmentationSetupCompleted
in Analytics settings being introduced in Implement the secondary user setup #8130.In
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationIntroductoryOverlayNotification.js
getContextScrollTop
fromassets/js/util/scroll.js
.scrollToWidgetAndDismissNotification
for scrolling and dismissing the notification.dismissNotification
.context
asgooglesitekit-widget-area--mainDashboardTrafficPrimary
andbreakpoint
usinguseBreakpoint
hook togetContextScrollTop
.As the
getContextScrollTop
is now being used to get the position for widgets and widget areas as well as widget context elements, rename this function togetNavigationalScrollTop
and update all its usages indicating it's a general purpose utility for use in scrolling to an area which is within the remit of the dashboard navigation, below the header.Test Coverage
AudienceSegmentationIntroductoryOverlayNotification
component to test the scroll behaviour.AudienceSegmentationIntroductoryOverlayNotification
component to test the dismissal behaviour.AudienceSegmentationIntroductoryOverlayNotification
to include a new scenario dependent onaudienceSegmentationSetupCompleted
flag.QA Brief
For secondary admins.
Enable the audience segmentation feature and complete the setup with primary admin account.
Create an another admin account and login with that account. Pop up notification must be visible for the secondary admin user.
For view only user
Enable the audience segmentation feature and complete the setup with primary admin account.
Create a view only user account and provide it the view only access using
Sharing Settings
in Site Kit. Note that we will need to provide view only access to Analytics module so that view-only user has access to the Audience Segmentation feature.Login with view only user's account and go to Site Kit dashboard, there should be the pop-up notification appearing for the user.
Changelog entry
The text was updated successfully, but these errors were encountered: