-
Notifications
You must be signed in to change notification settings - Fork 279
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! ✅ |
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
Changelog entry
The text was updated successfully, but these errors were encountered: