-
Notifications
You must be signed in to change notification settings - Fork 297
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 GatheringDataNotification
to use a newly refactored version of the BannerNotification
component.
#9071
Comments
AC ✔️ |
IB ✔️ |
QA Update ❌Question > I have noticed that on dev environment multiple 'view-notifications' event for even -category ""mainDashboard_gathering-data-notification" are getting trigger when notification render on main dashboard. On latest environment multiple events are not getting trigger. I checked this on entity dashboard and only 1 event is getting trigger on entity dashboard. Issue > On clicking 'See more services' loader not appears and user navigate to settings>services tab after few seconds. On latest environment loader appears. Dev environment Recording.1310.mp4Latest environment Recording.1311.mp4 |
@jimmymadon I’d like to highlight that in the latest environment, notifications about data gathering or zero data do not get permanently dismissed and reappear if we open the dashboard in a new tab. Additionally, clicking on the 'See more Services' CTA or the 'Remind me later' CTA does not create a record of Recording.1313.mp4 |
@jimmymadon One more scenario - 1> Set up SK without Analytics. |
@mohitwp Regarding Notification Dismissal I think the Gathering Data Notification and Zero Data Notification should be dismissed for 24 hours and only appear again after this duration. Clicking on any CTA within should trigger the dismissal AFAIK. This wasn't the behaviour in the past since we cached the dismissal in browser storage instead of the database. But I would like @aaemnnosttv to confirm this here. As far as GA event tracking and loading state is concerned, I'll try to create a follow up PR. |
@jimmymadon the issue here is that these notifications are essentially specific to the connected property but the dismissals aren't. So once the dismissal is set for one property, even if we change the property to another, it's perhaps expected that the notifications would be shown again because the context has changed. In this specific case, I don't think it's a big deal but ideally we should have these kinds of dismissals specific to the property. Can we see about addressing this in a follow-up? |
I missed @mohitwp 's previous comment about dismissals not happening in my last reply. He's correct in that both actions (primary/secondary|dismiss) should dismiss the notification (not just secondary/dismiss) as you can see in the current implementation. site-kit-wp/assets/js/components/notifications/BannerNotification/index.js Lines 196 to 215 in 7c1e93d
|
This was definitely a bug previously which the refactor now "fixes".
Yes - it is. We now store dismissals in the DB instead of just in browser session storage.
This is the existing behaviour as well today (unless we open a new tab which is the bug that I have mentioned above). After discussing with @aaemnnosttv, this is fine and we don't have to change this. The notification should reappear again in 24 hours.
This has been fixed in a follow up PR.
Unfortunately, the way we dismiss notifications now immediately removes it from the queue. We will have to rethink this properly. I have created a follow up PR that just improves the speed with which we navigate to the settings tab. This shouldn't block the release though I feel. I will discuss this with @eugene-manuilov or another engineer and either create a follow up PR quickly tomorrow or another issue for the next release. c.c @aaemnnosttv |
QA Update ✅
Note 1> For the loader issue. I created a new ticket - #9225 cc @wpdarren |
On closer inspection, the follow-up changes in #9222 here should be reverted as it risks breaking the tracked event + dismissal. I'm opening a quick PR to do this now. |
Feature Description
This issue focuses on creating a new
Notification
component that will be the 'non-bloated' version of theBannerNotification
component. This component will be composed using other smaller components and hooks for dismissal, event tracking, etc. as per the PoC branch.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
GatheringDataNotification
to use a new component, that "composes" individual pieces of logic within<BannerNotification>
using smaller components. This includes:Implementation Brief
GatheringDataNotification
to use the new Notifications datastore #8976 to be merged and refer to the POC branch where mentioned.assets/js/components/notifications
, create a newnotification
component folder. Within a newindex
file similar to withinBannerNotification
/ PoC branch:Notification
component.useHasBeenViewed
anduseNotificationEvents
as well as theViewedStateObserver
component.Dismiss
andCTA
components that have their own related props. Follow the pattern in the POC to built these as props by creating agetNotificationComponentProps()
function.Notification
component:Dismiss
component will take care of:dismiss
anddismissExpires
props and theonDismiss
event within the component.CTA
component will take care of:label
andlink
props and theonCTAClick
event within the component.BannerNotification
as is for now.GatheringDataNotification
, add the props for the newNotification
,Dismiss
andCTA
components. Follow the pattern in the POC for the refactoredZeroDataNotification
to simply pass the appropriate props and render the above components.Test Coverage
QA Brief
See more services
button and ensure the link takes the user to the correct tab as before. Test the confirm-notification GA event is fired correctly. Ensure the notification is correctly dismissed - a newwp_googlesitekitpersistent_dismissed_items
record will appear inwp_usermeta
in the database.Maybe later
button and ensure the notification is dismissed again in the database and thedismiss-notification
GA event is correctly fired.SetupSuccessBannerNotification
is active - they should take precedence over the Gathering Data notification.Changelog entry
The text was updated successfully, but these errors were encountered: