Closed zutigrm closed 2 days ago
Also every other metric item that was selected from any other group while the selection panel is open.
@zutigrm The effective selection as defined originally is independent of state changes in the panel so this part of its definition above should be removed.
Staged
metrics list
- Everything that user have selected within the currently active group will be temporarily kept here, once group is switched, or save button clicked, this list will be transferred over to the
Effective selection
metrics list, andStaged
list is reset (emptied).
This might be more clearly defined as "Unstaged" as this list is only necessary to temporarily hold deselected metrics that were toggled on the current metrics view. It is then reset when the selection changes from a different view, or the edit metrics session is closed. It's unnecessary to mention transferring this list since it is only concerned with temporary holding unselected metrics. Only Selected
metrics are relevant for saving which are already clearly defined separately. I think this may have been confused by referring to this set before as [any metrics which were selected regardless of the current state] but that's not necessary.
The Selected
group would be more accurate to think of as Staged
meaning those that will be saved on confirmation. It's probably more clear to understand them as Selected
as already mentioned though, as that is hopefully more explicit and should be less open to misinterpretation :)
@aaemnnosttv
The effective selection as defined originally is independent of state changes in the panel so this part of its definition above should be removed.
Initially, it will reflect what is on the dashboard - meaning it will be collected from the selector that either retrieves selection from manual input, or tailored metrics that are being shown. But afterwards, this list should include a total list of everything that is going to be used for rendering the Current selection
tab. Basically this list will be used for sourcing the metric items under the Current selection
group tab. It doesn't have much of an usage/doesn't serve a purpose if it is only static reflecting the initial dashboard selection, since once panel is opened, user will make selections, and those items that were selected, and temporaty stored in Unstaged
list will be transferred over to the Effective
list - which is rendering all the items that were added under Current selection
group, and then determines which metric items should be shown as checked
by checking if each metric item slug from Effective
list is located in Selected
list. That way we keep the list containing all the items that are both checked
and unchecked
, so they are properly showin in CUrrent selection
.
This might be more clearly defined as "Unstaged" as this list is only necessary to temporarily hold deselected metrics that were toggled on the current metrics view.
Good point, updated
It is then reset when the selection changes from a different view, or the edit metrics session is closed. It's unnecessary to mention transferring this list since it is only concerned with temporary holding unselected metrics
Techically this list will hold selected metrics, as the final choice from the currently active group, and then on tab switch, etc, those should be pushed to the Effective list so they would be shown under Current selection
per above comment
Thanks @zutigrm – apologies I wasn't able to get back to this sooner. It seems there may be some confusion still about some aspects of the behavior here so I've synced with @10upsimon and he'll take over the remaining review and approval.
@zutigrm after syncing with @aaemnnosttv and having another sync with you, we are indeed all on the same page with regards to requirements. AC is ✅ and moving this over to IB.
@zutigrm I assigned this to you for IB following our recent sync.
Returned it from IBR to update IB to sync with some changes made during the execution of 9378
For the IBR reviewer: Assign this issue to me once it pass IBR, since it is an extension of the issue I worked on and will be easier for me to continue working on it here
@zutigrm IB LGTM ✅ Moving to EB and assigning to you.
Most of the items are working fine. I have a couple of issues to flag however:
ITEM A: ⚠ Whenever I am closing the selection panel and then reopening it again, it doesn't start with a clean slate of the current selection.
ITEM B: ⚠ When I have metrics selected and I turn on the feature flag for Conversion reporting, I can see the message 'no metric was selected yet' when actually there are metrics.
ITEM C: ⚠ When feature flag is off, the error message flags max selection as 4. Is that as expected? Or should we move it to 8?
ITEM D: ⚠
This can be tackled as a separate ticket. When I check on iPad 10 safari, I see some inconsistencies. Documented below.
ITEM E: ⚠
Referring to the last part of the QAB:
Groups that have no metrics - Generating leads and selling products, will only show when events are detected. On GA4 property with no conversion events, these two groups will not be visible
Other than that, most things have been verified good:
Current selection is reflecting the KMW from dashboard ✅
When unchecked, the items from Current selection group do not disappear but are unchecked. ✅
For each group other than Current selection, the group is properly reflecting the number of selected items in that group. ✅
Selecting items from Current selection also checks under their each respective group. Saving the metrics works like before. ✅
Selecting less than 2 or more than 8 metrics throws an error. ✅
On mobile, groups are horizontally scrollable. ✅
Also, items 4-11 from https://github.com/google/site-kit-wp/issues/9378 were tested good as well: ITEM 4:Checkbox is 18 x 18 ✅
ITEM 5: Checkboxes are vertically aligned ✅
ITEM 6 : Covered above in main issue. ✅
ITEM 7: Font is 14 px ✅
ITEM 8: Font is 12px on mobile. ✅
ITEM 9: Alignment is as expected. ✅
ITEM 10: The message sticks to the bottom of the panel and doesn't move from group to group. ✅
ITEM 11: Settings font weight is 400. ✅
Thanks @kelvinballoo
ITEM C: ⚠ When feature flag is off, the error message flags max selection as 4. Is that as expected? Or should we move it to 8?
This is correct, max selection of 8 items is part of conversion reporting feature, max selection of 4 items is the existing limit until feature is released
ITEM D: ⚠
This can be tackled as a separate ticket. When I check on iPad 10 safari, I see some inconsistencies. Documented below.
Can you please open a new issue for this and ping me with it, I will include it in the epic and get it moving through definition
ITEM E: ⚠ Referring to the last part of the QAB: Groups that have no metrics - Generating leads and selling products, will only show when events are detected. On GA4 property with no conversion events, these two groups will not be visible
Is there an easy way to test the conversion items? I don't have any site for that. Or it's not required at this point and will be tested under another ticket?
Yes, there is a test website, please ping me on slack so I can add you and send you the link
Rest of the items A & B are fixed in a follow up
ITEM A has been verified good. The clean slate is now working. ✅
ITEM B has been verified good. Switching feature flag is not bringing an empty selection panel. ✅
Other than that, most things have been verified good:
Current selection is reflecting the KMW from dashboard ✅
When unchecked, the items from Current selection group do not disappear but are unchecked. ✅
For each group other than Current selection, the group is properly reflecting the number of selected items in that group. ✅
Selecting items from Current selection also checks under their each respective group. Saving the metrics works like before. ✅
Selecting less than 2 or more than 8 metrics throws an error. ✅
On mobile, groups are horizontally scrollable. ✅
Also, items 4-11 from https://github.com/google/site-kit-wp/issues/9378 were tested good as well: ITEM 4:Checkbox is 18 x 18 ✅
ITEM 5: Checkboxes are vertically aligned ✅
ITEM 6 : Covered above in main issue. ✅
ITEM 7: Font is 14 px ✅
ITEM 8: Font is 12px on mobile. ✅
ITEM 9: Alignment is as expected. ✅
ITEM 10: The message sticks to the bottom of the panel and doesn't move from group to group. ✅
ITEM 11: Settings font weight is 400. ✅
Moving ticket to approval and everything is working as expected.
For ITEM E - The new groups 'Generating leads' and 'Selling products' are showing up when these events are detected and it's working as expected. ✅
ITEM A has been verified good. The clean slate is now working. ✅
ITEM B has been verified good. Switching feature flag is not bringing an empty selection panel. ✅
Other than that, most things have been verified good:
Current selection is reflecting the KMW from dashboard ✅
When unchecked, the items from Current selection group do not disappear but are unchecked. ✅
For each group other than Current selection, the group is properly reflecting the number of selected items in that group. ✅
Selecting items from Current selection also checks under their each respective group. Saving the metrics works like before. ✅
Selecting less than 2 or more than 8 metrics throws an error. ✅
On mobile, groups are horizontally scrollable. ✅
Also, items 4-11 from https://github.com/google/site-kit-wp/issues/9378 were tested good as well: ITEM 4:Checkbox is 18 x 18 ✅
ITEM 5: Checkboxes are vertically aligned ✅
ITEM 6 : Covered above in main issue. ✅
ITEM 7: Font is 14 px ✅
ITEM 8: Font is 12px on mobile. ✅
ITEM 9: Alignment is as expected. ✅
ITEM 10: The message sticks to the bottom of the panel and doesn't move from group to group. ✅
ITEM 11: Settings font weight is 400. ✅
Feature Description
Metric selection logic will need some logic updates. Currently metrics are categorised in available and saved lists, but the new changes to the selection panel will require storing metrics in the
current selection
group which should include all selected items. Items should be persisted across groups, and show as checked/unchecked opposed to the current implementation where items switch lists based on the saved items.On high overview, new form lists should be created, so final lists would look like this:
KEY_METRICS_SELECTION_FORM
- This is the list containing only the active/final selection, which is used to determine which metric items are in the checked state, and also for saving the metrics to the database.KEY_METRICS_CURRENT_SELECTION_FORM
- The current selection, which initially reflects the selection from the dashboard, and then aggregates all other metric items that were checked during the “panel session” transferred over from the list.KEY_METRICS_STAGED_SELECTION_FORM
- This list will be populated with active selection within the currently active “group panel session”, and will be transferred over to the KEY_METRICS_CURRENT_SELECTION_FORM list after that session is finished. And the list will be emptied, so it can be restarted for the next session.This logic should reflect in
ChipTabGroup
component which should have all the groups and selection working correctly and style of the selection panel is matching the Figma designCheck Changes to the saved metric items and persisting the current selection of the design doc
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Current selection
group, in the selection panel are reflecting current selection consisting of both checked and unchecked items. To achieve this, they should be defined in 3 lists:Effective selection
metrics listSelected
metrics listCurrent selection
one as well.KEY_METRICS_SELECTION_FORM
form key.Unstaged
metrics listEffective selection
metrics list, andUnstaged
list is reset (emptied).Effective
selection are always present, regardless of checked stateChipTabGroup
component,Current selection
is populated correctly, and all metric items across the groups are reflecting the "checked" status if present inCurrent selection
. At this stage the new selection panel layout (key metrics specificSelectionPanelItems
implemented in 9378) is fully functional and matching new styles and included in the dashboard instead ofSelectionPanelItems
generic component whenconversionReporting
feature flag is enabledImplementation Brief
assets/js/components/KeyMetrics/MetricsSelectionPanel/index.js
onSideSheetOpen
callbackKEY_METRICS_SELECTION_FORM
include additional form keyEFFECTIVE_SELECTION
that should also receivesavedViewableMetrics
for the initials itemsassets/js/components/KeyMetrics/MetricsSelectionPanel/MetricItem.js
KEY_METRICS_SELECTION_FORM
https://github.com/google/site-kit-wp/blob/b021e955ebf7bc3e95137e8f64c41ae6e9f3dce2/assets/js/components/KeyMetrics/MetricsSelectionPanel/MetricItem.js#L77-L83 add new form keyUNSTAGED_SELECTION
, using the same approach as existingKEY_METRICS_SELECTED
, to store and filter only checked items. This should be conditionally done if the feature flag is enabledassets/js/components/KeyMetrics/ChipTabGroup/index.js
componentactiveMetricItems
to include all items fromEFFECTIVE_SELECTION
form key ofKEY_METRICS_SELECTION_FORM
form if theisActive
group is same ascurrentSelectionGroup.SLUG
.onClick
callback where active group is switched, collect the items fromUNSTAGED_SELECTION
form,KEY_METRICS_SELECTED
key and push them to the current array inEFFECTIVE_SELECTION
form keyUNSTAGED_SELECTION
form key to an empty arrayselectedCounts[ KEY_METRICS_CURRENT_SELECTION_GROUP_SLUG ]
(under todo comment) should be updated to collect the selected items fromEFFECTIVE_SELECTION
and filter by items that have their slugs present inKEY_METRICS_SELECTED
. Resulting count of these items should be used as final number.assets/js/components/KeyMetrics/MetricsSelectionPanel/MetricItems.js
assets/js/components/KeyMetrics/MetricsSelectionPanel/SelectionPanelItems.js
component if feature flag is enabled, otherwise render the existing generic selection panelassets/js/components/KeyMetrics/ChipTabGroup/index.stories.js
on the props, etc.Test Coverage
QA Brief
A note for QA to verify issues that were raised under https://github.com/google/site-kit-wp/issues/9378
Top earning pages
metrics name will not be changed as part of this issue, and checkbox neither. These will be run by Sigal, and then opened as a separate issueconversionReporting
feature flag enabledCurrent selection
is reflecting the KMW from dashboardCurrent selection
group do not disappearCurrent selection
is properly reflecting the number of selected items in that groupCurrent selection
should also be checked under their each respective groupChangelog entry