-
Notifications
You must be signed in to change notification settings - Fork 293
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 GatheringDataNotification
to use the new Notifications datastore
#8976
Closed
13 tasks done
Labels
Comments
jimmymadon
added
Type: Enhancement
Improvement of an existing feature
Team S
Issues for Squad 1
labels
Jul 8, 2024
tofumatt
changed the title
Refactor the GatheringDataNotification to use the new Notifications datastore
Refactor Jul 23, 2024
GatheringDataNotification
to use the new Notifications datastore
This was referenced Jul 23, 2024
AC ✔️ |
IB ✔️ |
18 tasks
10 tasks
6 tasks
QA Update ❌
@jimmymadon Recording.1304.mp4 |
18 tasks
@eugene-manuilov Assigning you here since you did the original CR/MR for this issue. So it will make sense to do the follow up PR as well. Thanks! |
QA Update ✅
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature Description
This issue is the first of many issues that will "use" the new datastore infrastructure to queue notifications while also creating a new
Notification
component that will be reused by other notifications.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
GatheringDataNotification
should be refactored and rendered (queued) using the newcore/notifications
datastore. This means that the component should not be called directly but via the genericgetQueuedNotifications
selector.GatheringDataNotification
should be extracted from theZeroDataStateNotifications
component and moved to thecheckRequirements
callback when registering this notification.Implementation Brief
assets/js/components/notifications/ZeroDataStateNotifications.js
:searchConsoleGatheringData
andanalyticsGatheringData
to thecheckRequirements(registry)
callback function when registering thegathering-data-notification
notification withinassets/js/googlesitekit/notifications/register-defaults.js
. The callback should return true only if eithersearchConsoleGatheringData
oranalyticsGatheringData
are true.gatheringDataTitle
and thegatheringDataWaitTimeInHours
to theGatheringDataNotification
component. This will include the code to computesearchConsoleGatheringData
oranalyticsGatheringData
. This means that theGatheringDataNotification
will not have any props anymore.searchConsoleZeroData
andanalyticsZeroData
to theassets/js/components/notifications/ZeroDataStateNotifications/ZeroDataNotification.js
component.assets/js/components/notifications/ZeroDataStateNotifications.js
eventually.assets/js/components/notifications/Notifications.js
similar to the PoC.viewContext
andareaSlug
.getQueuedNotifications(viewContext)
selector to fetch the queue of notifications. Check if the first notification in the queue has the sameareaSlug
as the prop passed, if it does, render this notification'sComponent
, otherwise do not render anything. Do notassets/js/googlesitekit/notifications/register-defaults.js
:GatheringDataNotification
component to theComponent
setting of thegathering-data-notification
notification. Currently, setisDismissible
to false as all the dismissal logic is still going to be handled by the react component itself.assets/js/components/notifications/BannerNotifications.js
:ZeroDataStateNotifications
withZeroDataStateNotification
.Notifications
component passing theareaSlug
asNOTIFICATION_AREAS.BANNERS_ABOVE_NAV
and the viewContext to beVIEW_CONTEXT_MAIN_DASHBOARD
if the dashboard is normal orVIEW_CONTEXT_MAIN_DASHBOARD_VIEW_ONLY
if the dashboard is view only.Test Coverage
QA Brief
Ideally - WAIT for #8977 to be merged and then QA both the issues together as they are exactly the same pattern in code.
SetupSuccessBannerNotification
is active - they should take precedence over the Gathering and Zero Data notifications.Changelog entry
The text was updated successfully, but these errors were encountered: