Open mohitwp opened 3 weeks ago
@mohitwp I have added another Scenario 2 as well with the latest main branch here. You can add any other scenario here too for this notification.
@jimmymadon 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.
AC ✔️
IB ✅
Bug Description
If the zero data notification is not dismissed and the user opens the dashboard in a new tab or window, the zero data state notification does not appear on the first load. The user must refresh the page for the notification to appear. This behavior is observed on both the main and entity dashboards. However, this issue does not occur with the gathering data state notification.
Scenario 1
Steps to reproduce
Screenshots
https://github.com/user-attachments/assets/64238b26-4ac3-453a-8e06-d1f7509a93f8
Scenario 2
Steps to reproduce
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/googlesitekit/notifications/register-defaults.js
hasZeroData
selector is calling another resolvergetReport
, which is not resolved in most of the cases whencheckRequirements
is run, hence banner is not shown in most cases, except for the initial load when report is resolved in the state, but after reload banner will disappear - which shouldn't be the case. So replace https://github.com/google/site-kit-wp/blob/8117ca79f8026064d8fd60d30f860617f597130b/assets/js/googlesitekit/notifications/register-defaults.js#L276 and https://github.com/google/site-kit-wp/blob/8117ca79f8026064d8fd60d30f860617f597130b/assets/js/googlesitekit/notifications/register-defaults.js#L270 with the usage ofisZeroReport
directly, and useresolveSelect
to make a report request directly and wait for it to be resolved.isZeroReport
from the modules.Test Coverage
QA Brief
Changelog entry