Skip to content

Commit

Permalink
chore: Put new pipeline UI behind ff completely (#19553)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiina303 authored Jan 2, 2024
1 parent a49eda3 commit f4aa571
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
7 changes: 7 additions & 0 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
icon: <IconDecisionTree />,
to: urls.projectApps(),
},
{
identifier: Scene.Pipeline,
label: 'Data pipeline new',
icon: <IconDecisionTree />,
to: urls.pipeline(),
featureFlag: FEATURE_FLAGS.PIPELINE_UI,
},
].filter(isNotNil),
]
},
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/scenes/pipeline/Destinations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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)

Expand Down
9 changes: 8 additions & 1 deletion frontend/src/scenes/pipeline/Pipeline.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Meta } from '@storybook/react'
import { router } from 'kea-router'
import { FEATURE_FLAGS } from 'lib/constants'
import { useEffect } from 'react'
import { App } from 'scenes/App'
import { urls } from 'scenes/urls'
Expand All @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/scenes/pipeline/PipelineApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/scenes/pipeline/Transformations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
Expand Down

0 comments on commit f4aa571

Please sign in to comment.