Skip to content
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

chore: remove featureSwitchRefactor flag #5329

Merged
merged 6 commits into from
Nov 14, 2023

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Nov 13, 2023

Cleanup. This change has been rolled out to significant number of customers already, and we have another parallel version behind a flag.

Copy link

vercel bot commented Nov 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2023 10:38am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Nov 14, 2023 10:38am

@@ -96,7 +96,11 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = (
};

const ensureActiveStrategies: Middleware = (next) => {
if (!config.hasStrategies || config.hasEnabledStrategies) {
if (
newState === false ||
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other conditions should never be met with newState===false, but adding this makes it more consistent with our actual business logic

refetchFeature();
if (callback) callback();
};
const handleToggle = (newState: boolean, onRollback: () => void) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using new FeatureSwitch here allows us to remove legacy implementation not only from the table.

@Tymek Tymek marked this pull request as ready for review November 14, 2023 12:03
@Tymek Tymek merged commit fd3a7f1 into main Nov 14, 2023
13 checks passed
@Tymek Tymek deleted the chore/remove-featureSwitchRefactor-flag branch November 14, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants