site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Remove zeroDataStates feature flag and unused code

Open aaemnnosttv opened this issue 3 years ago • 4 comments

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 zeroDataStates feature flag should be removed, and any code that runs when zeroDataStates === false should be removed.

Implementation Brief

  • Remove zeroDataStates from feature-flags.json
  • Search for the zeroDataStates string within the code base and review code where it is present. Any logic/component which was rendered conditionally when the zeroDataStates feature was enabled should be rendered unconditionally now. Any code which was rendered when the feature flag was disabled should be removed.
  • Use of the useFeature hook with zeroDataStates as a parameter should be removed.
  • Review stories where the zeroDataStates feature is enabled via the story's parameters to remove the parameter.
    • Legacy Gathering data stories must be removed.

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 zeroDataStates feature flag is gone from the tester plugin as well

Changelog entry

aaemnnosttv avatar Apr 28 '22 17:04 aaemnnosttv

Hi @techanvil and @aaemnnosttv just checking if this is still blocked and that @techanvil is still planning on working on this?

FlicHollis avatar May 26 '22 08:05 FlicHollis

@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.

techanvil avatar May 26 '22 09:05 techanvil

That makes sense - thanks @techanvil

FlicHollis avatar May 29 '22 14:05 FlicHollis

IB ✔️

eugene-manuilov avatar Jun 21 '22 12:06 eugene-manuilov

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.

image

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 avatar Sep 02 '22 10:09 mohitwp

@mohitwp Addressed the issues you pointed out in a new pr 👍

maciejost avatar Sep 05 '22 08:09 maciejost

@makiost is this ready for review again? I see it's still with you in Execution.

aaemnnosttv avatar Sep 06 '22 18:09 aaemnnosttv

@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.

maciejost avatar Sep 06 '22 20:09 maciejost

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.

image

image

image

image

mohitwp avatar Sep 07 '22 12:09 mohitwp