Register new widget with highest priority to render the notification in the key metrics widget area
Feature Description
As part of the ongoing work within the ACR epic is the need to surface subtle notification style banner within the KMW widget area, but not replacing said KMW cards.
Refer to the Subtle banner notification for detected events section of the design doc
The below screenshot shows an example of said inline banner being rendered between the widget area title and the widget area contents:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Register a new widget to the key metrics widget area
- It should be having highest priority
- It should be displayed as full width widget
- For now it can render
null, this will be replaced by notification in #9371
Implementation Brief
- [ ] Update
assets/js/googlesitekit/widgets/register-defaults.js- Register new widget under
AREA_MAIN_DASHBOARD_KEY_METRICS_PRIMARYwidget area - You can use
keyMetricsEventDetectionCalloutNotificationfor the widget slug - For
widthusewidgetsAPI.WIDGET_WIDTHS.FULL - For
priorityuse0 - For
modulesincludeanalytics-4 - In
isActivecheck, ifconversionReportingfeature flag is disabled, return early. And you can also returnfalseby default for now - Use
nullfor component, this will be added in #9371
- Register new widget under
Test Coverage
- No updates needed
QA Brief
- No QA needed as there is no user-facing change here.
Changelog entry
- N/A
@10upsimon @zutigrm how about registering a new full width widget with the highest priority that will render that notification instead of introducing a new property to the widgets API? Adding new subHeader feels excessive since we already have subTitle there.
@eugene-manuilov That's a good point, thanks. With new changes to the layout, to expand selection to 8 items which also adjusts some styling to allow for KMW taking proper sizes, this would work as intended. I will update dependency and modify the approach.
Thanks, @zutigrm. AC ✔️
@zutigrm IB ✅ moving to EB
Moved to Approval since there is nothing to QA here.
Moving it back to execution, since it breaks the dashboard (when conversionReporting feature flag is enabled), it seems Component prop has to contain component, null is throwing invariant error. I will quickly replace this with WidgetNull and send it to CR
cc: @eugene-manuilov @tofumatt
Thanks, merged. Moving back to Approval.