-
Notifications
You must be signed in to change notification settings - Fork 284
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
Refactor the UnsatisfiedScopesAlert to use the new Notifications datastore and layout components #8978
Comments
AC ✔️ |
IB ✔️ |
Since Errors are higher priority than the other notifications, I would suggest we use 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. |
QA Update ❌
@jimmymadon Please find my observations below
Recording.1362.mp4Issue 3 : Alignment of unsatisfied scope alert is not correct on dev environment. |
This should now be fixed.
For me, the
This should now be fixed as well. |
QA Update ✅
@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. Recording.1371.mp4PASS 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
The text was updated successfully, but these errors were encountered: