Skip to content

Commit

Permalink
chore(data-warehouse): Make external tab the focus (#17469)
Browse files Browse the repository at this point in the history
* flip tabs

* revert

* revert
  • Loading branch information
EDsCODE authored Sep 15, 2023
1 parent 20e642d commit d1738aa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion frontend/src/scenes/appScenes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const appScenes: Record<Scene, () => any> = {
[Scene.EarlyAccessFeature]: () => import('./early-access-features/EarlyAccessFeature'),
[Scene.Surveys]: () => import('./surveys/Surveys'),
[Scene.Survey]: () => import('./surveys/Survey'),
[Scene.DataWarehouse]: () => import('./data-warehouse/posthog/DataWarehousePosthogScene'),
[Scene.DataWarehouse]: () => import('./data-warehouse/external/DataWarehouseExternalScene'),
[Scene.DataWarehousePosthog]: () => import('./data-warehouse/posthog/DataWarehousePosthogScene'),
[Scene.DataWarehouseExternal]: () => import('./data-warehouse/external/DataWarehouseExternalScene'),
[Scene.DataWarehouseSavedQueries]: () => import('./data-warehouse/saved_queries/DataWarehouseSavedQueriesScene'),
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/scenes/data-warehouse/DataWarehousePageTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export enum DataWarehouseTab {
}

const tabUrls = {
[DataWarehouseTab.Posthog]: urls.dataWarehousePosthog(),
[DataWarehouseTab.External]: urls.dataWarehouseExternal(),
[DataWarehouseTab.Posthog]: urls.dataWarehousePosthog(),
[DataWarehouseTab.Views]: urls.dataWarehouseSavedQueries(),
}

Expand All @@ -25,7 +25,7 @@ const dataWarehouseTabsLogic = kea<dataWarehouseTabsLogicType>({
},
reducers: {
tab: [
DataWarehouseTab.Posthog as DataWarehouseTab,
DataWarehouseTab.External as DataWarehouseTab,
{
setTab: (_, { tab }) => tab,
},
Expand Down Expand Up @@ -58,14 +58,14 @@ export function DataWarehousePageTabs({ tab }: { tab: DataWarehouseTab }): JSX.E
activeKey={tab}
onChange={(t) => setTab(t)}
tabs={[
{
key: DataWarehouseTab.Posthog,
label: <span data-attr="data-warehouse-Posthog-tab">Posthog</span>,
},
{
key: DataWarehouseTab.External,
label: <span data-attr="data-warehouse-external-tab">External</span>,
},
{
key: DataWarehouseTab.Posthog,
label: <span data-attr="data-warehouse-Posthog-tab">Posthog</span>,
},
...(featureFlags[FEATURE_FLAGS.DATA_WAREHOUSE_VIEWS]
? [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ export function DataWarehouseExternalScene(): JSX.Element {
</div>
}
buttons={
<LemonButton
type="primary"
to={urls.dataWarehouseTable('new')}
data-attr="new-data-warehouse-table"
>
New Table
</LemonButton>
!shouldShowProductIntroduction ? (
<LemonButton
type="primary"
to={urls.dataWarehouseTable('new')}
data-attr="new-data-warehouse-table"
>
New Table
</LemonButton>
) : undefined
}
caption={
<div>
Expand Down

0 comments on commit d1738aa

Please sign in to comment.