:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(flags): add Type column to feature flags list (#61458)
ruby childs0f980d1a197b
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex da7839b9b1f0..255e8f2ecbbf 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -4883,9 +4883,9 @@ snapshots:scenes-app-feature-flags--feature-flag-not-found--light:hash: v1.k794b7964.e784cb2f06f9bfcbc6743df7815cbf7c815da053481b08baecb4a088910f3afa.9OxM372yUO63hbW3CfWOXwnUJD3dTv8EKpc-J3i9HOoscenes-app-feature-flags--feature-flags-list--dark:- hash: v1.k794b7964.5ad67a530f4fd9dece77e0d132cd0def3a8ab2e043b05e25c31d79a2d2eccda5.orssD24mqErPMp3PmiYNM9UJNror3yKoN8L8qY_CIQg+ hash: v1.k794b7964.2730a9e4846c16869c821c34dcf59d7fb86ee63a3fc91857cf19b72face208b3.OgQAw3la22Mh824WdrYvhRwGI-FayVzs61pVUwE6oboscenes-app-feature-flags--feature-flags-list--light:- hash: v1.k794b7964.433b55d4b908553bd3e5128fb13ca8edb6d6f142fd4103a0bb89bba772c8cbc5.tCKa7paABYG2BW5NxwcHE8QUmDKCeR1UEMmw5N3RoyQ+ hash: v1.k794b7964.9f31458f9371ccf1f6ba09cd3728a71c1b1d496b951cc942d6a173d10fa5786d.KAGRvF0AJDFLtof4mRa3aEXUcIc_B0eHSqpDoTHvKwsscenes-app-feature-flags--new-feature-flag--dark:hash: v1.k794b7964.b8f6e0b677fa753d25fd9710066d8864cce28c2b8f17e96abd343d91ad72e95c.JX-Y63wT7ojk44kJmYVE9jeRnPRmyMqhkUytg1Opfjoscenes-app-feature-flags--new-feature-flag--light:diff --git a/frontend/src/scenes/feature-flags/FeatureFlags.tsx b/frontend/src/scenes/feature-flags/FeatureFlags.tsxindex 1ad553541d08..bda13a186d69 100644--- a/frontend/src/scenes/feature-flags/FeatureFlags.tsx+++ b/frontend/src/scenes/feature-flags/FeatureFlags.tsx@@ -58,7 +58,7 @@ import {import { ApprovalsPromoBanner } from './ApprovalsPromoBanner'import { BulkDeleteResultsModal } from './BulkDeleteResultsModal'import { FeatureFlagFiltersSection } from './FeatureFlagFilters'-import { FLAGS_PER_PAGE, FeatureFlagsTab, featureFlagsLogic } from './featureFlagsLogic'+import { FLAGS_PER_PAGE, FeatureFlagsTab, featureFlagsLogic, flagMatchesType } from './featureFlagsLogic'import { flagSelectionLogic } from './flagSelectionLogic'import { OverlayForNewFeatureFlagMenu } from './NewFeatureFlagMenu'import ProjectsGrid from './projects-grid/ProjectsGrid'@@ -403,6 +403,34 @@ export function OverviewTab({)},},+ {+ title: 'Type',+ width: 120,+ render: function RenderType(_, featureFlag: FeatureFlagType) {+ const labels: string[] = []+ if (flagMatchesType(featureFlag, 'remote_config')) {+ labels.push('Remote config')+ }+ if (flagMatchesType(featureFlag, 'experiment')) {+ labels.push('Experiment')+ }+ if (flagMatchesType(featureFlag, 'multivariant')) {+ labels.push('Multiple variants')+ }+ if (labels.length === 0) {+ labels.push('Boolean')+ }+ return (+ <div className="flex flex-wrap gap-1">+ {labels.map((label) => (+ <LemonTag key={label} type="default" className="whitespace-nowrap">+ {label}+ </LemonTag>+ ))}+ </div>+ )+ },+ },{title: 'Tags',dataIndex: 'tags' as keyof FeatureFlagType,diff --git a/frontend/src/scenes/feature-flags/__mocks__/feature_flags.json b/frontend/src/scenes/feature-flags/__mocks__/feature_flags.jsonindex f81408705e35..3327c0dbe786 100644--- a/frontend/src/scenes/feature-flags/__mocks__/feature_flags.json+++ b/frontend/src/scenes/feature-flags/__mocks__/feature_flags.json@@ -216,6 +216,45 @@},"created_at": "2022-02-08T16:51:27.696618Z","updated_at": "2022-02-08T16:51:27.696618Z"+ },+ {+ "id": 1801,+ "name": "",+ "key": "signup-cta-experiment",+ "filters": {+ "groups": [+ {+ "properties": [],+ "rollout_percentage": 100+ }+ ],+ "multivariate": {+ "variants": [+ {+ "key": "control",+ "name": "",+ "rollout_percentage": 50+ },+ {+ "key": "test",+ "name": "",+ "rollout_percentage": 50+ }+ ]+ }+ },+ "deleted": false,+ "active": true,+ "experiment_set": [42],+ "created_by": {+ "id": 6352,+ "uuid": "cf25089d-71f1-4f70-9d0b-7577e47d78c1",+ "distinct_id": "8ed346b4-01e9-44e2-b5a1-286cb131a400",+ "first_name": "Cameron",+ "email": "[email protected]"+ },+ "created_at": "2022-02-08T20:54:04.344072Z",+ "updated_at": "2022-02-08T20:54:04.344072Z"}]}