-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current selection can pull metrics list from previous answer #10034
Comments
@zutigrm IB LGTM ✅ This one took a while for me to get my head around. Given that we're both very close to the form snapshot approach, let's aim to keep this issue amongst us if possible. |
QA Update ⚠I noticed a regression which is better explained through video. Please refer to the attached video. 10034.test.wrong.mov |
@tofumatt this one is back with you for Merge Review given that it's targeted against main for release 1.146.0. Thanks! |
QA Update ⚠Thanks @zutigrm . Tested the main regression I noticed before and this is now working as expected. Changing of site purpose is also displaying the modal with the correct metrics. Tested a few of those site purpose and not only what is on the video attached. ✅ 10034.new.-.01.mov🚨 That said I want to raise 2 other items. These are possibly out of scope for this ticket. ITEM 1: ⚠ ITEM 2: ⚠
A video is attached for reference for both issues. 10034.issues.mov |
@kelvinballoo Thanks, I have opened a new issue #10182 to define handling of For item 2 I also raised this with Sigal, to see if we want to include some message instead of showing empty list, etc |
QA update ✅Thanks @zutigrm . Noted on that. Moving ticket to approval since the main regression is now working as expected. Changing of site purpose is also displaying the modal with the correct metrics. 10034.new.-.01.mov |
Bug Description
ACR Bug bash ticket in Asana can be found here. The second part of this ticket can be found in Asana here.
When tailored metrics site purpose answer is edited, if for example currently saved answer is
Sell products
, then you choosePublish a blog
, and then go toProvide services
and click on theApply changes
CTA current metrics selection is not pulling the current selection.Screen.Recording.2025-01-14.at.15.22.49.mov
What changing the answer to the "What is the main purpose of the site?" question in the Settings page, the list of current metrics changes unexpectedly while the modal is saving.
For example when changing from "Sell products" to "Publish a blog", the modal opens up with this list of current metrics:
When the "Update metrics selection" CTA is clicked the list of current metrics is updated to the following while the selection is being saved:
Changing the answer again in order to show the modal, the current metrics are now as expected (i.e. the "New tailored metrics" list in the first modal):
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
suggested
listUpdate metrics selection
CTA is clickedImplementation Brief
assets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.js
CORE_USER
datastore usinggetSavedUserInputSettings
selector, for the existingsavedPurpose
savedPurpose[ 0 ]
argument ingetAnswerBasedMetrics
site-kit-wp/assets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.js
Line 102 in 944cad1
savedPurpose?.purpose?.values?.[ 0 ]
assets/js/components/user-input/UserInputPreview.js
savedPurpose
and using it ingetAnswerBasedMetrics
selector forcurrentMetrics
site-kit-wp/assets/js/components/user-input/UserInputPreview.js
Line 149 in 944cad1
savedPurposeSnapshot
and source the value fromUSER_INPUT_QUESTIONS_PURPOSE
key of theFORM_USER_INPUT_QUESTION_SNAPSHOT
form like it was before for now modifiedsavedPurpose
site-kit-wp/assets/js/components/user-input/UserInputPreview.js
Lines 131 to 133 in 944cad1
site-kit-wp/assets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.js
Lines 63 to 88 in 944cad1
includeConversionTailoredMetrics
and add it as a new selector, sayshouldIncludeConversionTailoredMetrics
inassets/js/modules/analytics-4/datastore/conversion-reporting.js
so it can be re-used in both filesFORM_USER_INPUT_QUESTION_SNAPSHOT
form value should remain in other parts of the codebase, as it is primary used for accurately reseting the focus after modal changes as most reliable value.Test Coverage
assets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.stories.js
stories by usingsetUserInputSetting
action to change site purposeQA Brief
conversionReporting
feature flag enabledapply
CTAChangelog entry
The text was updated successfully, but these errors were encountered: