diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx index 4a5c5ff24c9e6..5788e4685b77d 100644 --- a/frontend/src/layout/navigation-3000/navigationLogic.tsx +++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx @@ -427,6 +427,13 @@ export const navigation3000Logic = kea([ icon: , to: urls.projectApps(), }, + { + identifier: Scene.Pipeline, + label: 'Data pipeline new', + icon: , + to: urls.pipeline(), + featureFlag: FEATURE_FLAGS.PIPELINE_UI, + }, ].filter(isNotNil), ] }, diff --git a/frontend/src/scenes/pipeline/Destinations.tsx b/frontend/src/scenes/pipeline/Destinations.tsx index 7cfe7da38ba21..bb4e674cef9ff 100644 --- a/frontend/src/scenes/pipeline/Destinations.tsx +++ b/frontend/src/scenes/pipeline/Destinations.tsx @@ -10,9 +10,11 @@ import { } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction' +import { FEATURE_FLAGS } from 'lib/constants' import { More } from 'lib/lemon-ui/LemonButton/More' import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown/LemonMarkdown' import { updatedAtColumn } from 'lib/lemon-ui/LemonTable/columnUtils' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { deleteWithUndo } from 'lib/utils/deleteWithUndo' import { urls } from 'scenes/urls' @@ -23,6 +25,10 @@ import { NewButton } from './NewButton' import { RenderApp } from './utils' export function Destinations(): JSX.Element { + const { featureFlags } = useValues(featureFlagLogic) + if (!featureFlags[FEATURE_FLAGS.PIPELINE_UI]) { + return <> + } const { enabledPluginConfigs, disabledPluginConfigs, shouldShowProductIntroduction } = useValues(pipelineDestinationsLogic) diff --git a/frontend/src/scenes/pipeline/Pipeline.stories.tsx b/frontend/src/scenes/pipeline/Pipeline.stories.tsx index 106c991560d31..316ccd0d2406e 100644 --- a/frontend/src/scenes/pipeline/Pipeline.stories.tsx +++ b/frontend/src/scenes/pipeline/Pipeline.stories.tsx @@ -10,6 +10,7 @@ import { PipelineAppTabs, PipelineTabs } from '~/types' import { appMetricsLogic } from './appMetricsLogic' import { appsManagementLogic } from './appsManagementLogic' import { pipelineLogic } from './pipelineLogic' +import { FEATURE_FLAGS } from 'lib/constants' export default { title: 'Scenes-App/Pipeline', @@ -23,7 +24,13 @@ export default { }, }), ], - parameters: { layout: 'fullscreen', options: { showPanel: false }, viewMode: 'story', mockDate: '2023-02-18' }, // scene mode + parameters: { + layout: 'fullscreen', + options: { showPanel: false }, + viewMode: 'story', + mockDate: '2023-02-18', + featureFlags: [FEATURE_FLAGS.PIPELINE_UI], + }, // scene mode } as Meta export function PipelineLandingPage(): JSX.Element { diff --git a/frontend/src/scenes/pipeline/PipelineApp.tsx b/frontend/src/scenes/pipeline/PipelineApp.tsx index cbb8425e6ffb9..b3b1ddd3fac33 100644 --- a/frontend/src/scenes/pipeline/PipelineApp.tsx +++ b/frontend/src/scenes/pipeline/PipelineApp.tsx @@ -2,7 +2,9 @@ import { Spinner } from '@posthog/lemon-ui' import { useValues } from 'kea' import { router } from 'kea-router' import { PageHeader } from 'lib/components/PageHeader' +import { FEATURE_FLAGS } from 'lib/constants' import { LemonTabs } from 'lib/lemon-ui/LemonTabs/LemonTabs' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { capitalizeFirstLetter } from 'lib/utils' import { PluginLogs } from 'scenes/plugins/plugin/PluginLogs' import { SceneExport } from 'scenes/sceneTypes' @@ -20,6 +22,10 @@ export const scene: SceneExport = { } export function PipelineApp({ id }: { id?: string } = {}): JSX.Element { + const { featureFlags } = useValues(featureFlagLogic) + if (!featureFlags[FEATURE_FLAGS.PIPELINE_UI]) { + return <> + } const { currentTab } = useValues(pipelineAppLogic) const confId = id ? parseInt(id) : undefined diff --git a/frontend/src/scenes/pipeline/Transformations.tsx b/frontend/src/scenes/pipeline/Transformations.tsx index f32d29cededd9..1623c09088ceb 100644 --- a/frontend/src/scenes/pipeline/Transformations.tsx +++ b/frontend/src/scenes/pipeline/Transformations.tsx @@ -15,9 +15,11 @@ import { } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction' +import { FEATURE_FLAGS } from 'lib/constants' import { More } from 'lib/lemon-ui/LemonButton/More' import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown/LemonMarkdown' import { updatedAtColumn } from 'lib/lemon-ui/LemonTable/columnUtils' +import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { deleteWithUndo } from 'lib/utils/deleteWithUndo' import { PluginImage } from 'scenes/plugins/plugin/PluginImage' import { urls } from 'scenes/urls' @@ -29,6 +31,10 @@ import { pipelineTransformationsLogic } from './transformationsLogic' import { RenderApp } from './utils' export function Transformations(): JSX.Element { + const { featureFlags } = useValues(featureFlagLogic) + if (!featureFlags[FEATURE_FLAGS.PIPELINE_UI]) { + return <> + } const { loading, sortedEnabledPluginConfigs,