google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.22k stars 278 forks source link

Add datastore infrastructure to dismiss notifications. #8974

Closed jimmymadon closed 1 month ago

jimmymadon commented 2 months ago

Feature Description

This issue focuses on adding an action and a selector as wrappers to the dismissed-items partial functions to dismiss notifications within core/notifications.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Wait for #8973 to be merged so the datastore has been scaffolded.

QA Brief

*Smoke test the plugin, mainly the dashboard to check for any new console errors.

QA: Eng

Changelog entry

eugene-manuilov commented 1 month ago

AC + IB ✔️, but the estimate is too high, I will reduce it to 7 since that is more than enough for this task.

jimmymadon commented 1 month ago

@eugene-manuilov Yes ok - I think the real estimate here was probably slightly more than 3 (making it a 7). So thats why I just went up one level like we do for all issues.

mohitwp commented 1 month ago

QA Update ✅

https://github.com/user-attachments/assets/275779ab-5828-4611-851a-6170331e5512 https://github.com/user-attachments/assets/d4cd0df8-d27e-41d4-a5a6-fe6f7e84963e https://github.com/user-attachments/assets/d8d99255-a45f-43fb-8250-644d0df4c685 https://github.com/user-attachments/assets/96d1d8b2-928d-4ccd-bb51-9b10b97ea66f https://github.com/user-attachments/assets/97e22dd3-9ca6-4dcf-8ccf-db0bcb35651c
10upsimon commented 1 month ago

ENG:QA Update ✅

See details below. I did have one observation that I synced with @jimmymadon on where a notice ID was still marked as expired even after the expiry time unless the page was reloaded or another notifications API request was made. It turns out this is intended behaviour as we never want a notice to show again (even if dismissed) on the same page view session.

https://github.com/user-attachments/assets/85fec1e4-d0b1-48ee-a478-23653be76d34