-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add the “New” badges to the Selection Panel #8170
Comments
Looks like this is also blocked by a tile like #8136 being implemented, because adding a relatively concrete IB here isn't possible until those components are implemented so we know where they'll go. I looked through all of the issues to see if anything was moved along enough to add a good IB here but not yet, so I've added #8136 as another blocker to making the IB 🤔 |
Hey @benbowler, while reviewing the IB here I've realised I left an important detail out of the AC. The "New" badges should only appear for audiences which have been created subsequent to the initial setup for the current user. The implication is we should expire the corresponding "New" badge items for the list of audiences in It further implies we should do the same thing once Apologies for the lack of clarity in the AC. I've amended it accordingly - please take a look. Further to the above, here are a couple of additional points for this IB:
|
Thanks @benbowler. The IB LGTM ✅ Please note, I made a small tweak to remove the reference to |
Note that I've further updated the IB in response to the observations made here, #9096 (comment), as the generic Selection Panel should indeed not know anything about audiences. |
…l-badge Add new badges to Audience Selection Panel
QA Update
|
@kelvinballoo Added a new section in the QAB, please let me know if that works for you, thanks! |
QA Update
|
QA Update ✅Noted on item 2 that we are only checking on the badge inside the selection panel. I've set up a thread in Slack to check if it's being handled or should in fact be. Item 1 was tested good with the new script for the 28 day scenario and it's working fine: 28.days.script.works.720p.movOther than that, the rest was verified good ✅
|
Feature Description
Add the "New" badge to new audiences in the Selection Panel.
See selection panel, audience creation > "New" badges", and "New" badges in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Note: This should make use of the "expirable items" API introduced via #8168.
assets/js/components/SelectionPanel/SelectionPanelItem.js
andassets/js/components/SelectionBox.js
, add abadge
prop of typePropTypes.node
.SelectionPanelItem
, passbadge
as a prop toSelectionBox
.SelectionBox
, passbadge
to theCheckbox
after thetitle
prop.assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/AudienceItem.js
:hasExpirableItem
selector, passing theaudience-selection-panel-expirable-new-badge-${slug}
as the expirable item slug.isExpirableItemActive
selector, passing theaudience-selection-panel-expirable-new-badge-${slug}
as the expirable item slug.NewBadge
instance as thebadge
prop forSelectionPanelItem
if the badge has not been seen by the user before, or it has not yet expired.useEffect
in this component which calls thesetExpirableItemTimers
action, only if the user has never seen New badge before, and the title is not either of the pre-defined audiences , with the following object:WEEK_IN_SECONDS
fromassets/js/util/index.js
assets/js/modules/analytics-4/datastore/audiences.js
, once theconfiguredAudiences
are successfully saved, dispatch ansetExpirableItemTimers
action for everyconfiguredAudiences
using the slug, and passing a value of 0, which will expire these items immediately.This prevents new badges from being shown for all audiences immediately after user setup.
configuredAudiences
is saved for the secondary user setup.assets/sass/components/global/_googlesitekit-selection-panel.scss
.Test Coverage
QA Brief
audienceSegmentation
feature flag from the tester plugin.To see "New" badges with the Site Kit audiences
To test expiration of "New" badges
Changelog entry
The text was updated successfully, but these errors were encountered: