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

feat(flags): add flag persistence as a default setting across the org #27527

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

dmarticus
Copy link
Contributor

Problem

Many customers have been asking for the ability to enable flag persistence as a default behavior in our app, since they use flags in experiments and sometimes forget to check the box, which inevitably leads to the experiments being messed up. See #27514 for more context.

This PR implements #27514.

Changes

  • adds a feature flags org-wide settings page with a checkbox to enable flag persistence by default
  • adds a migration to the teams table to support this field
  • adds logic to the feature flags page to apply/not apply the "persist flags through authentication steps" checkbox, depending what the org-wide settings say

Does this work well for both Cloud and self-hosted?

Yawp

How did you test this code?

Manually tested it, see: https://www.loom.com/share/71d59c74f179498e91ef44299d5f6ad4

@dmarticus dmarticus requested a review from a team January 14, 2025 23:49
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

28 snapshot changes in total. 0 added, 28 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@@ -315,7 +318,7 @@ export const featureFlagLogic = kea<featureFlagLogicType>([
},
},
})),
reducers({
reducers(() => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Mostly asking out of curiosity, was this a necessary diff/ did it fix something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, unnecessary diff. Will remove.

Copy link
Contributor

@havenbarnes havenbarnes left a comment

Choose a reason for hiding this comment

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

Sweeeeeeet

Copy link
Contributor

github-actions bot commented Jan 15, 2025

Size Change: 0 B

Total Size: 1.13 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.13 MB

compressed-size-action

@dmarticus dmarticus enabled auto-merge (squash) January 15, 2025 16:17
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.

3 participants