-
Notifications
You must be signed in to change notification settings - Fork 293
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
Prevent Selection Panel Info Notice from disappearing until two audiences are selected #8909
Comments
@techanvil Just to quickly confirm, what happens if the user unselects one of the audiences after they've selected two? Should the notice reappear? If not, the IB will need to be updated to address that behaviour. I'll write my IBR feedback based on your response, thank you! |
Thanks @nfmohit - I should have been more explicit in the AC. The not should indeed not reappear - I've updated the AC accordingly. |
Thank you for the confirmation and amendment, @techanvil ! @benbowler Thank you for the IB. Let's update it to make sure the notice doesn't reappear when the user reduces their selection to one audience. We may be able to use a local state in conjunction with a Also, could you also instruct to remove the |
Thank you for the update, @benbowler . I think 3 as an estimate is quite steep here just in case an unexpected side-effect comes up. Do you think it might be worth increasing it by a notch just so we're safe? |
Good point, updated @nfmohit |
Thanks @benbowler ! IB LGTM 👍 ✅ |
QA Update ✅
Recording.1274.mp4 |
Feature Description
In its initial implementation, the Selection Panel Info Notice will disappear when the user opens the Selection Panel with a single selected audience, and unchecks that audience.
This is not ideal, as the notice is intended to encourage the user to add a second audience to the selection, so it would be better to keep the notice visible until they have at least two audiences selected.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/AddGroupNotice.js
:selectionChanges
const, instead use thegetValue
selector to get the selected audiences passingAUDIENCE_SELECTION_FORM, AUDIENCE_SELECTED
- this will return the list of currently selected audiences - call thisselectedAudiences
.useState
calledtwoOrMoreAudiencesSelected
defaulting tofalse
.useEffect
watching changes onselectedAudiences
:selectedAudiences
is not an array, return early.selectedAudiences.length > 1
, settwoOrMoreAudiencesSelected
= trueisDismissed || twoOrMoreAudiencesSelected
.AUDIENCE_SELECTION_CHANGED
form key and everywhere it's used/updated.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: