Skip to content

Commit

Permalink
drop in replace the data warehouse scene if the sql editor flag is ac…
Browse files Browse the repository at this point in the history
…tive
  • Loading branch information
EDsCODE committed Dec 31, 2024
1 parent 3a07f44 commit d317d8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
17 changes: 8 additions & 9 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,21 +515,20 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
to: urls.earlyAccessFeatures(),
}
: null,
{
identifier: Scene.DataWarehouse,
label: 'Data warehouse',
icon: <IconDatabase />,
to: isUsingSidebar ? undefined : urls.dataWarehouse(),
},
featureFlags[FEATURE_FLAGS.SQL_EDITOR]
? {
identifier: Scene.SQLEditor,
label: 'SQL Editor',
label: 'Data warehouse',
icon: <IconServer />,
to: urls.sqlEditor(),
to: urls.dataWarehouse(),
logic: editorSidebarLogic,
}
: null,
: {
identifier: Scene.DataWarehouse,
label: 'Data warehouse',
icon: <IconDatabase />,
to: isUsingSidebar ? undefined : urls.dataWarehouse(),
},
hasOnboardedAnyProduct
? {
identifier: Scene.Pipeline,
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/scenes/sceneLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,12 @@ export const sceneLogic = kea<sceneLogicType>([
}
}
for (const [path, scene] of Object.entries(routes)) {
mapping[path] = (params, searchParams, hashParams, { method }) =>
actions.openScene(scene, { params, searchParams, hashParams }, method)
mapping[path] = (params, searchParams, hashParams, { method }) => {
if (path === urls.dataWarehouse() && featureFlagLogic.values.featureFlags[FEATURE_FLAGS.SQL_EDITOR]) {
return actions.openScene(Scene.SQLEditor, { params, searchParams, hashParams }, method)
}
return actions.openScene(scene, { params, searchParams, hashParams }, method)
}
}

mapping['/*'] = (_, __, { method }) => {
Expand Down

0 comments on commit d317d8e

Please sign in to comment.