Remove zeroDataStates feature flag and unused code
See original GitHub issueFeature 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 whenzeroDataStates === false
should be removed.
Implementation Brief
- Remove
zeroDataStates
fromfeature-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 thezeroDataStates
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 withzeroDataStates
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.
- 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
zeroDataStates
feature flag is gone from the tester plugin as well
Changelog entry
- Remove zeroDataStates feature flag and unused code.
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
Cleaning Up Unused Flags - DevCycle Docs
Failing to remove feature flags and their variables at the appropriate time causes cluttered code. Another risk of technical debt with feature ...
Read more >How to Manage Outdated Feature Flags - Optimizely
Not cleaning up feature flags can introduce risk to your code base. Learn how Feature Flag Removal Day can lead to better feature...
Read more >Remove `adsenseSetupV2` feature flag and phase out old code
This issue is about removing the adsenseSetupV2 feature flag at some point, ... This will also allow us to delete a bunch of...
Read more >Reducing feature flag tech debt - Medium
One way to minimize the tedium above is to write code that anticipates the future requirement of removing the feature flag and its...
Read more >Deleting feature flags - CloudBees Documentation
Removing unused feature flags helps maintain cleaner code and reduce technical debt. You can optionally integrate with Jira and configure additional cleanup ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That makes sense - thanks @techanvil
QA Update ✅
Verified