site-kit-wp
site-kit-wp copied to clipboard
Remove zeroDataStates feature flag and unused code
Feature Description
Once the zeroDataStates feature is complete and rolled out to 100% of eligible sites, we can safely remove the feature flag and remove the old code that no longer runs.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- All usage of
zeroDataStatesfeature flag should be removed, and any code that runs whenzeroDataStates === falseshould be removed.
Implementation Brief
- Remove
zeroDataStatesfromfeature-flags.json - Search for the
zeroDataStatesstring within the code base and review code where it is present. Any logic/component which was rendered conditionally when thezeroDataStatesfeature was enabled should be rendered unconditionally now. Any code which was rendered when the feature flag was disabled should be removed. - Use of the
useFeaturehook withzeroDataStatesas a parameter should be removed. - Review stories where the
zeroDataStatesfeature is enabled via the story's parameters to remove the parameter.- Legacy
Gathering datastories must be removed.
- Legacy
Test Coverage
- Update VRT images and E2E tests if necessary.
QA Brief
- Set up a site with forced zero data for modules
- Ensure that this branch doesn't differ from the released plugin
- Ensure that no new warnings are raised in the console
- Check that the
zeroDataStatesfeature flag is gone from the tester plugin as well
Changelog entry
Hi @techanvil and @aaemnnosttv just checking if this is still blocked and that @techanvil is still planning on working on this?
@FlicHollis this one is still blocked, pending the execution of 5047. I was still planning on working on the IB, as I did the IB for 5047 and the process will be something of a continuation, but someone else could do it too.
That makes sense - thanks @techanvil
IB ✔️
QA Update ❌
@makiost
I found few issues :
Issue 1: Bracket ) character in the ‘All Traffic’ widget on develop branch. Evan confirmed that it is due to this PR.

Issue 2: Notices for gathering and zero state are no longer appearing on develop branch.
https://user-images.githubusercontent.com/94359491/188116654-c7bfa24e-c9e0-430a-8100-ffbef164fd49.mp4
https://user-images.githubusercontent.com/94359491/188116703-0b1dc6ed-c7fe-410a-9b31-a959e299c585.mp4
@mohitwp Addressed the issues you pointed out in a new pr 👍
@makiost is this ready for review again? I see it's still with you in Execution.
@aaemnnosttv All the fixes from QA are done, I just need to update one E2E test for it to be complete. Since the gathering data notifications are no longer hidden behind a feature flag, the notifications test fails, due to the gathering data notification being showed instead of the expected test notification.
QA Update ✅
Verified
- Verified for the site which is in default gathering state.
- Verified for the site which is in forced gathering or zero state.
- Verified on main branch.
- On main branch 'Zero data state' feature flag not showing under tester plugin and zero data both state 'gathering and zero' working fine.
- No console errors.
- Also, CTA for both gathering and zero data state are now appearing.
- CTA appearing on both main,entity and WP dashboard.



