-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(flags): add flag persistence as a default setting across the org (…
…#27527) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7da80e0
commit 4ba47b8
Showing
64 changed files
with
405 additions
and
4 deletions.
There are no files selected for viewing
Binary file modified
BIN
+130 Bytes
(100%)
frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/replay-player-success--recent-recordings--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-9 Bytes
(100%)
frontend/__snapshots__/replay-player-success--recent-recordings--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+13 Bytes
(100%)
frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-39 Bytes
(100%)
frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.2 KB
(100%)
.../__snapshots__/scenes-other-org-member-invites--current-user-is-admin--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.18 KB
(100%)
...__snapshots__/scenes-other-org-member-invites--current-user-is-admin--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.2 KB
(100%)
...__snapshots__/scenes-other-org-member-invites--current-user-is-member--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.18 KB
(100%)
..._snapshots__/scenes-other-org-member-invites--current-user-is-member--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.2 KB
(100%)
.../__snapshots__/scenes-other-org-member-invites--current-user-is-owner--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.18 KB
(100%)
...__snapshots__/scenes-other-org-member-invites--current-user-is-owner--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.29 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-organization--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.33 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-organization--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.7 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-project--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+19.6 KB
(100%)
...pshots__/scenes-other-settings--settings-project-with-replay-features--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+19.5 KB
(100%)
...shots__/scenes-other-settings--settings-project-with-replay-features--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
...apshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.7 KB
(100%)
...pshots__/scenes-other-settings--settings-session-timeout-all-options--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
...shots__/scenes-other-settings--settings-session-timeout-password-only--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.7 KB
(100%)
...hots__/scenes-other-settings--settings-session-timeout-password-only--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
..._/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.7 KB
(100%)
.../scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
..._/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.7 KB
(100%)
.../scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.9 KB
(100%)
...s__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png
Oops, something went wrong.
Binary file modified
BIN
+18.7 KB
(100%)
...__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png
Oops, something went wrong.
Binary file modified
BIN
+18.9 KB
(100%)
..._snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png
Oops, something went wrong.
Binary file modified
BIN
+18.7 KB
(100%)
...snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png
Oops, something went wrong.
Binary file modified
BIN
+1.58 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-user--dark.png
Oops, something went wrong.
Binary file modified
BIN
+1.56 KB
(100%)
frontend/__snapshots__/scenes-other-settings--settings-user--light.png
Oops, something went wrong.
Binary file modified
BIN
+945 Bytes
(100%)
frontend/__snapshots__/scenes-other-settings--settings-web-vitals--dark.png
Oops, something went wrong.
Binary file modified
BIN
+1011 Bytes
(100%)
frontend/__snapshots__/scenes-other-settings--settings-web-vitals--light.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { LemonDialog, LemonSwitch, Link } from '@posthog/lemon-ui' | ||
import { useActions, useValues } from 'kea' | ||
import { teamLogic } from 'scenes/teamLogic' | ||
|
||
export type FeatureFlagSettingsProps = { | ||
inModal?: boolean | ||
} | ||
|
||
export function FeatureFlagSettings({ inModal = false }: FeatureFlagSettingsProps): JSX.Element { | ||
const { updateCurrentTeam } = useActions(teamLogic) | ||
const { currentTeam } = useValues(teamLogic) | ||
|
||
return ( | ||
<div className="space-y-4"> | ||
<div className="space-y-2"> | ||
<LemonSwitch | ||
data-attr="default-flag-persistence-switch" | ||
onChange={(checked) => { | ||
updateCurrentTeam({ | ||
flags_persistence_default: checked, | ||
}) | ||
}} | ||
label="Enable flag persistence by default" | ||
bordered={!inModal} | ||
fullWidth={inModal} | ||
labelClassName={inModal ? 'text-base font-semibold' : ''} | ||
checked={!!currentTeam?.flags_persistence_default} | ||
/> | ||
|
||
<p> | ||
When enabled, all new feature flags will have persistence enabled by default. This ensures | ||
consistent user experiences across authentication steps. Learn more in our{' '} | ||
<Link | ||
to="https://posthog.com/docs/feature-flags/creating-feature-flags#persisting-feature-flags-across-authentication-steps" | ||
target="_blank" | ||
> | ||
documentation | ||
</Link> | ||
. | ||
</p> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export function openFeatureFlagSettingsDialog(): void { | ||
LemonDialog.open({ | ||
title: 'Feature flag settings', | ||
content: <FeatureFlagSettings inModal />, | ||
width: 600, | ||
primaryButton: { | ||
children: 'Done', | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
frontend/src/scenes/settings/environment/FeatureFlagSettings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Link } from '@posthog/lemon-ui' | ||
import { FeatureFlagSettings as BasicFeatureFlagSettings } from 'scenes/feature-flags/FeatureFlagSettings' | ||
import { urls } from 'scenes/urls' | ||
|
||
export function FeatureFlagSettings(): JSX.Element { | ||
return ( | ||
<> | ||
<p> | ||
Configure default behavior for feature flags. Flags can be managed on the{' '} | ||
<Link to={urls.featureFlags()}>feature flags page</Link>. | ||
</p> | ||
|
||
<BasicFeatureFlagSettings /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.