Closed jimmymadon closed 2 months ago
Moving this to the backlog until #8976, which is marked as blocking this issue, is completed. That way we can mirror the approach used in #8976 for other migrations/refactoring.
AC ✔️
IB ✔️
@zutigrm
For priority, I would suggest using
400
as base number.
Since Errors are higher priority than the other notifications, I would suggest we use 150
. GatheringData
and ZeroData
have priorities 300 and 310. The other banners (about 9 other Banners will come above them taking us to priority 210 approx (each banner increments by 10 - so 290, 280, 270, etc...). There aren't many Errors or notifications above the UnsatisfiedScopesAlert
- so we will have many empty slots above and below this notification once all of them are registered.
As mentioned in the stand up, I will probably pick this up this week itself so I can ensure the order is correct. I will also add these priority values into our spreadsheet when completing it.
c.c. @eugene-manuilov
@jimmymadon Thanks, makes sense
Since these issues combine the registration and design, I will bump up the estimate to 15 here in line with our points experiment as this would unlikely be a 7 in "normal" scenarios. As seen in other issues, these issues do require proper CR and QA + any time for fixes in case the issue fails QA.
@jimmymadon Please find my observations below
Issue 3 : Alignment of unsatisfied scope alert is not correct on dev environment.
QA Update ❌
- Tested on dev environment.
@jimmymadon Please find my observations below
- Issue 1: Zero and data-gathering notifications are appearing below the success notification and other notifications, such as the 'Enable Enhanced Measurement' banner notice.
This should now be fixed.
- Issue 2: Zero data notifications appear only once and do not reappear after reloading the page or opening the dashboard in a new tab.
For me, the ZeroDataNotification
does appear on page reload. However, it does not appear when we open the dashboard in a new tab. I will add this to the ACs of #9227 as the cause of the inconsistent behaviour is the same here.
Issue 3 : Alignment of unsatisfied scope alert is not correct on dev environment.
This should now be fixed as well.
UnsatisfiedScopesAlert
appear before gathering or zero data notifications.@jimmymadon Regarding issue number 2, I’ve observed that the "zero data" notification appears upon reload if both Analytics and SC are connected. However, if only SC is connected and is in a zero data state, the notification appears only once. It does not reappear upon reload or if we log in from another browser or open the dashboard in a new tab. I will add this scenario under #9227. Same issue exist on latest environment also.
cc @aaemnnosttv @wpdarren
PASS CASES
Feature Description
This issue is the first issue to refactor an "Error" notification in Site Kit. It should refactor the
UnsatisfiedScopesAlert
so that it uses the new datastore infrastructure to register and queue the notification. It should also use newer lighter "layout" and "common" components that replace the bloatedBannerNotification
component as per the pattern introduced in #9071.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
UnsatisfiedScopesAlert
component should be refactored so that it is registered and rendered (queued) using the newcore/notifications
datastore.ErrorNotifications
) but only via the genericgetQueuedNotifications
selector.BannerNotification
component. Instead, it should be rendered using the newNotification
component wrapper and a simpler "layout" component that solely encapsulates its structure and design.Implementation Brief
assets/js/components/notifications/UnsatisfiedScopesAlert.js
assets/js/components/notifications/GatheringDataNotification.js
for the exampleBannerNotification
componentid
andNotification
Notification
component passed as the propassets/js/googlesitekit/notifications/components/common/
to assemble the notification using the existing props used to forBannerNotification
assets/js/googlesitekit/notifications/components/common/ActionsCTALinkDismiss.js
to acceptisDismissal
prop which would conditionally render dismiss button, so it can be used as part of this notification which is not dismissible.assets/js/googlesitekit/notifications/components/layout/
so other simple layout notification can use it. It can be calledNotificationWithNoSVG
for exampleassets/js/googlesitekit/notifications/register-defaults.js
checkRequirements
transfer the existing checks inassets/js/components/notifications/ErrorNotifications.js
400
as base number, starting from this one. So all error style notifications can use it, by incrementing on this base number for later higher priority ones.UnsatisfiedScopesAlert
from theassets/js/components/notifications/ErrorNotifications.js
Test Coverage
assets/js/components/notifications/GatheringDataNotification.stories.js
as an exampleQA Brief
UnsatisfiedScopesAlert
by reducing the number of satisfied scopes.wp-usermeta
table'swp_googlesitekit_auth_scopes
meta-key row. Set meta value where the webmasters scope has been deleted:Changelog entry