-
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
Handling Other
site purpose answer for tailored metrics
#10182
Comments
@zutigrm, please, update IB to solve AC requirements.
Instead of checking the site purpose, we need to check whether there are any suggestions available. If at least one suggestions is available, then add that group, otherwise not. |
Thanks @eugene-manuilov IB updated |
@zutigrm, I believe you added add this for the case when |
I reversed the initial approach, to accommodate for AC change, specifically this point:
So when |
No, that should be anything else's recommendations, not the default 4 metrics. |
IB ✔ |
Feature Description
When
Other
is selected as site purpose for tailored metrics, hideSuggested
tab in selection panelAlso when switching between
other
and rest of site purpose answers in KMW admin settings, the confirm change modal should list correct metrics - empty for current or new, depending if we are editing from, or toother
answerOriginally raised in this comment
While testing around I spotted a bug when user input is used, selecting
other
as site purpose will throw console error -complete setup
will not execute on last step. This should be included here as wellDo not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
suggested
group is hidden in the selection panel, when there is no valuable recommendation to show.other
.other
to anything else.other
answer throws no console error during setup.Implementation Brief
assets/js/components/user-input/util/constants.js
USER_INPUT_PURPOSE_TO_CONVERSION_EVENTS_MAPPING
addother
to the object, with value of empty arrayassets/js/components/KeyMetrics/ChipTabGroup/index.js
dynamicGroups
is defined, beforeKEY_METRICS_GROUP_SUGGESTED
is added to the array, besides checking forisUserInputCompleted
, check also ifanswerBasedMetrics
(which is already defined), is not empty arrayassets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.js
currentMetrics
is defined, beforegetAnswerBasedMetrics
is returned, check ifsavedPurpose?.purpose?.values?.[ 0 ]
isother
, and return metrics usinggetKeyMetrics
selector fromCORE_USER
datastoresite-kit-wp/assets/js/components/KeyMetrics/ConfirmSitePurposeChangeModal.js
Lines 185 to 188 in 2547eae
currentMetrics !== undefined
Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: