Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(3000): Relabeled apps to data pipeline, re-ordered nav #18919

Merged
merged 10 commits into from
Nov 28, 2023
Binary file modified frontend/__snapshots__/posthog-3000-navigation--navigation-base.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-apps--installed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-saved-insights--card-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions frontend/src/layout/navigation-3000/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconAsterisk, IconDay, IconGear, IconNight, IconSearch } from '@posthog/icons'
import { IconAsterisk, IconDay, IconGear, IconNight, IconSearch, IconToolbar } from '@posthog/icons'
import { LemonBadge } from '@posthog/lemon-ui'
import clsx from 'clsx'
import { useActions, useValues } from 'kea'
Expand Down Expand Up @@ -93,6 +93,12 @@ export function Navbar(): JSX.Element {
onClick={toggleSearchBar}
keyboardShortcut={{ command: true, k: true }}
/>
<NavbarButton
icon={<IconToolbar />}
identifier={Scene.ToolbarLaunch}
title="Toolbar"
to={urls.toolbarLaunch()}
/>
<NavbarButton
icon={<ThemeIcon />}
identifier="theme-button"
Expand All @@ -113,7 +119,7 @@ export function Navbar(): JSX.Element {
<NavbarButton
icon={<IconGear />}
identifier={Scene.Settings}
title="Project settings"
title="Settings"
to={urls.settings('project')}
/>

Expand Down
47 changes: 18 additions & 29 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
IconApps,
IconChat,
IconDashboard,
IconDatabase,
IconDecisionTree,
IconGraph,
IconHome,
IconLive,
Expand All @@ -14,7 +14,6 @@ import {
IconServer,
IconTestTube,
IconToggle,
IconToolbar,
} from '@posthog/icons'
import { lemonToast } from '@posthog/lemon-ui'
import { captureException } from '@sentry/react'
Expand All @@ -37,7 +36,6 @@ import { experimentsSidebarLogic } from './sidebars/experiments'
import { featureFlagsSidebarLogic } from './sidebars/featureFlags'
import { insightsSidebarLogic } from './sidebars/insights'
import { personsAndGroupsSidebarLogic } from './sidebars/personsAndGroups'
import { toolbarSidebarLogic } from './sidebars/toolbar'
import { BasicListItem, ExtendedListItem, NavbarItem, SidebarNavbarItem } from './types'

/** Multi-segment item keys are joined using this separator for easy comparisons. */
Expand Down Expand Up @@ -376,26 +374,12 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
tag: 'beta' as const,
}
: null,
{
identifier: Scene.DataWarehouse,
label: 'Data warehouse',
icon: <IconServer />,
to: urls.dataWarehouse(),
featureFlag: FEATURE_FLAGS.DATA_WAREHOUSE,
tag: 'beta' as const,
},
{
identifier: Scene.Replay,
label: 'Session replay',
icon: <IconRewindPlay />,
to: urls.replay(),
},
{
identifier: Scene.Surveys,
label: 'Surveys',
icon: <IconChat />,
to: urls.surveys(),
},
{
identifier: Scene.FeatureFlags,
label: 'Feature flags',
Expand All @@ -410,28 +394,33 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
logic: isUsingSidebar ? experimentsSidebarLogic : undefined,
to: isUsingSidebar ? undefined : urls.experiments(),
},
{
identifier: Scene.Surveys,
label: 'Surveys',
icon: <IconChat />,
to: urls.surveys(),
},
{
identifier: Scene.EarlyAccessFeatures,
label: 'Early access features',
icon: <IconRocket />,
to: urls.earlyAccessFeatures(),
},
].filter(isNotNil),
[
{
identifier: Scene.Apps,
label: 'Apps',
icon: <IconApps />,
to: urls.projectApps(),
identifier: Scene.DataWarehouse,
label: 'Data warehouse',
icon: <IconServer />,
to: urls.dataWarehouse(),
featureFlag: FEATURE_FLAGS.DATA_WAREHOUSE,
tag: 'beta' as const,
},
{
identifier: Scene.ToolbarLaunch,
label: 'Toolbar',
icon: <IconToolbar />,
logic: isUsingSidebar ? toolbarSidebarLogic : undefined,
to: isUsingSidebar ? undefined : urls.toolbarLaunch(),
identifier: Scene.Apps,
label: 'Data pipeline',
icon: <IconDecisionTree />,
to: urls.projectApps(),
},
],
].filter(isNotNil),
]
},
],
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/apps/appMetricsSceneLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const appMetricsSceneLogic = kea<appMetricsSceneLogicType>([
(pluginConfig, pluginConfigId: number): Breadcrumb[] => [
{
key: Scene.Apps,
name: 'Apps',
name: 'Data pipeline',
path: urls.projectApps(),
},
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/plugins/AppsScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function AppsScene(): JSX.Element | null {
},
canGloballyManagePlugins(user?.organization) && {
key: PluginTab.AppsManagement,
label: 'Apps Management',
label: 'Manage apps',
content: <AppsManagementTab />,
},
]}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/plugins/tabs/apps/AppsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export function AppsTab(): JSX.Element {
<BatchExportsAlternativeWarning />

<AppsTable
title="Enabled Apps"
title="Enabled apps"
plugins={[...sortableEnabledPlugins, ...unsortableEnabledPlugins]}
loading={loading}
renderfn={renderfn}
/>
<AppsTable
title="Available Apps"
title="Available apps"
plugins={filteredDisabledPlugins}
loading={loading}
renderfn={renderfn}
Expand Down