Closed 10upsimon closed 1 month ago
AC ✔️
IB ✔️
conversionReporting
feature flag is not enabled.conversionReporting
feature flag is enabled.conversionReporting
feature flag limit is upgraded now to 8 metric items. Error prevent from adding more than 8 metric tiles, and messaging in selection panel reflect this new limit
Feature Description
With the introduction of Analytics Conversion reporting Key Metrics Widgets, comes the need to increase the total allowable selected KMW's to be 8, as opposed to the existing 4. This issue addresses this need.
The additional 4 metrics are not necessarily required to be ACR metrics, and 8 regular News Key Metrics tiles may also be selected.
VRT and other tests should also be updated as a result of said change, including KMW selection panel VRT scenarios for <= 4 and >= 4 selected metric scenarios.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
conversionReporting
feature flagImplementation Brief
includes/Core/Key_Metrics/REST_Key_Metrics_Controller.php
core/user/data/key-metrics
CREATABLE
route, increase$num_widgets > 4
conditional check to 8 andwidgetSlugs[maxItems]
to 8 in restargs
assets/js/components/KeyMetrics/constants.js
MAX_SELECTED_METRICS_COUNT
to 8assets/js/googlesitekit/widgets/register-defaults.js
AddMetricCTATile
metric tiles, depending if total number of selected widgets is 2 or 3.keyMetricsAddMetric{Third|Fourth|Fifth}
, they should show only if:5
or more selected metricsAddMetricCTATile
in case total number of selected metrics is5
AddMetricCTATile
in case total number of selected metrics is6
AddMetricCTATile
in case total number of selected metrics is7
assets/sass/components/key-metrics/_googlesitekit-key-metrics-widgets.scss
.googlesitekit-widget-area--mainDashboardKeyMetricsPrimary .googlesitekit-widget-area-widgets
as a parent selector.AddMetricCTATile
are present, only 1 should be visible, it doesn't need to be solved with CSS, perhaps using breakpoints as additional conditional check in each newAddMetricCTATile
might be more straightforward.Test Coverage
tests/phpunit/integration/Core/Key_Metrics/REST_Key_Metrics_ControllerTest.php
to reflect the change in max allowed widget slugs whenconversionReporting
feature flag is enabled.assets/js/components/KeyMetrics/MetricsSelectionPanel/index.test.js
- update/expand on test cases that are testing for 4 metrics limit to use 8 metrics as limit, and include test case that includes more than 4 key metrics selected, whenconversionReporting
feature flag is enabledQA Brief
conversionReporting
feature flagChangelog entry