-
Notifications
You must be signed in to change notification settings - Fork 286
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
Clear the "temporarily hidden" state for an audience when it's removed from the audience selection #8877
Comments
Hi @benbowler, thanks for drafting this IB. A couple of points:
We don't actually have an
This point makes me think that, seeing as we're adding a new REST endpoint for the deletion, we might as well allow that endpoint to handle multiple items so we can batch these into a single request. WDYT? |
Thanks @techanvil, I've updated this to use |
Thanks @benbowler! IB LGTM. I've bumped the estimate up a level to allow for extra time modelling the scenarios in testing, and because we've generally been underestimating Audience Segmentation issues. IB ✅ |
QA Update
|
Hey @kelvinballoo! Thanks for flagging these defects. They are both valid concerns, but are outside the scope of this issue. Please can you raise issues for them? |
QA Update ✅Thanks for checking @techanvil . As for this issue, it's good to go to Approval. Happy path: temporarily.hide.working.as.expected.movUnhappy path: |
Feature Description
If an audience has zero data and has been temporarily hidden, and the audience is subsequently removed from the audience selection, the "temporarily hidden" state should be cleared.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Updates to Dismissed Item Infra
includes/Core/Dismissals/REST_Dismissals_Controller.php
, create a new rest endpoint:'core/user/data/dismissed-items'
WP_REST_Server::DELETABLE
remove
method onDismissed_Items
to remove the dismissed items by slug. Use slug parameter validation and return the updated dismissed items (use the existing create route for reference).assets/js/googlesitekit/datastore/user/dismissed-items.js
:removeDismissedItems
, which takes an array of slugs and resolves using a new fetch store, which usesAPI.set
using theDELETE
method, within it'scontrollerCallback
to delete the requested dismissed items.site-kit-wp/assets/js/googlesitekit/modules/datastore/sharing-settings.js
Lines 90 to 98 in b67e9a1
Audience Selection Updates
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSelectionPanel/Footer.js
, within thesaveSettings
callbackgetDismissedItems
selector..filter
to find any dismissed items where the slug starts withaudience-tile-
removeDismissedItems
action.Test Coverage
tests/phpunit/integration/Core/Dismissals/REST_Dismissals_ControllerTest.php
andassets/js/googlesitekit/datastore/user/dismissed-items.test.js
QA Brief
Happy path
Unhappy path
.*/wp-json/google-site-kit/v1/core/user/data/dismissed-items.*
(.*)
POST
500
Changelog entry
The text was updated successfully, but these errors were encountered: