google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.22k stars 278 forks source link

Add the “New” badges to the Selection Panel #8170

Open techanvil opened 5 months ago

techanvil commented 5 months ago

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.

Test Coverage

QA Brief

Changelog entry

tofumatt commented 3 months ago

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 🤔

techanvil commented 1 month ago

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 configuredAudiences once they have been successfully saved in the enableAudienceGroup() action

It further implies we should do the same thing once configuredAudiences has been saved as part of the setup for a secondary user. This is being specced in https://github.com/google/site-kit-wp/issues/8130, as a result I've added that issue as a dependency for this one.

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:

techanvil commented 4 weeks ago

Thanks @benbowler. The IB LGTM :white_check_mark:

Please note, I made a small tweak to remove the reference to enableAudienceGroup() for the secondary users aspect, as I don't think we will end up using this action for secondary users, rather we'll extract part of it to a new action and use that.