diff --git a/frontend/public/3000/3000-command-palette-dark.png b/frontend/public/3000/3000-command-palette-dark.png deleted file mode 100644 index b3875f96db422..0000000000000 Binary files a/frontend/public/3000/3000-command-palette-dark.png and /dev/null differ diff --git a/frontend/public/3000/3000-command-palette.png b/frontend/public/3000/3000-command-palette.png deleted file mode 100644 index 4fab3331e77a8..0000000000000 Binary files a/frontend/public/3000/3000-command-palette.png and /dev/null differ diff --git a/frontend/public/3000/3000-dark-mode.png b/frontend/public/3000/3000-dark-mode.png deleted file mode 100644 index 823f35d5cc30e..0000000000000 Binary files a/frontend/public/3000/3000-dark-mode.png and /dev/null differ diff --git a/frontend/public/3000/3000-launch.png b/frontend/public/3000/3000-launch.png deleted file mode 100644 index f78f40dc940c9..0000000000000 Binary files a/frontend/public/3000/3000-launch.png and /dev/null differ diff --git a/frontend/public/3000/3000-nav-dark.png b/frontend/public/3000/3000-nav-dark.png deleted file mode 100644 index 0c0994cbf8bd4..0000000000000 Binary files a/frontend/public/3000/3000-nav-dark.png and /dev/null differ diff --git a/frontend/public/3000/3000-nav.png b/frontend/public/3000/3000-nav.png deleted file mode 100644 index 1f94942fce5ec..0000000000000 Binary files a/frontend/public/3000/3000-nav.png and /dev/null differ diff --git a/frontend/public/3000/3000-notebooks-dark.png b/frontend/public/3000/3000-notebooks-dark.png deleted file mode 100644 index 9e8e19effcd38..0000000000000 Binary files a/frontend/public/3000/3000-notebooks-dark.png and /dev/null differ diff --git a/frontend/public/3000/3000-notebooks.png b/frontend/public/3000/3000-notebooks.png deleted file mode 100644 index c806c5eb19cd2..0000000000000 Binary files a/frontend/public/3000/3000-notebooks.png and /dev/null differ diff --git a/frontend/public/3000/3000-search-dark.png b/frontend/public/3000/3000-search-dark.png deleted file mode 100644 index 6a9a770609f9d..0000000000000 Binary files a/frontend/public/3000/3000-search-dark.png and /dev/null differ diff --git a/frontend/public/3000/3000-search.png b/frontend/public/3000/3000-search.png deleted file mode 100644 index 6ceda306e1299..0000000000000 Binary files a/frontend/public/3000/3000-search.png and /dev/null differ diff --git a/frontend/public/3000/3000-side-panel-dark.png b/frontend/public/3000/3000-side-panel-dark.png deleted file mode 100644 index 35b826c1ae0b8..0000000000000 Binary files a/frontend/public/3000/3000-side-panel-dark.png and /dev/null differ diff --git a/frontend/public/3000/3000-side-panel.png b/frontend/public/3000/3000-side-panel.png deleted file mode 100644 index 4f12f93cf59cf..0000000000000 Binary files a/frontend/public/3000/3000-side-panel.png and /dev/null differ diff --git a/frontend/public/3000/3000-toolbar.png b/frontend/public/3000/3000-toolbar.png deleted file mode 100644 index f1b5e51f4b6cd..0000000000000 Binary files a/frontend/public/3000/3000-toolbar.png and /dev/null differ diff --git a/frontend/src/layout/navigation-3000/navigationLogic.tsx b/frontend/src/layout/navigation-3000/navigationLogic.tsx index 2d20684268abe..88fb4297aecf2 100644 --- a/frontend/src/layout/navigation-3000/navigationLogic.tsx +++ b/frontend/src/layout/navigation-3000/navigationLogic.tsx @@ -59,6 +59,7 @@ export const navigation3000Logic = kea([ props({} as { inputElement?: HTMLInputElement | null }), connect(() => ({ values: [sceneLogic, ['sceneConfig'], navigationLogic, ['mobileLayout'], teamLogic, ['currentTeam']], + actions: [navigationLogic, ['closeAccountPopover']], })), actions({ hideSidebar: true, @@ -133,6 +134,7 @@ export const navigation3000Logic = kea([ { showNavOnMobile: () => true, hideNavOnMobile: () => false, + closeAccountPopover: () => false, }, ], isSidebarKeyboardShortcutAcknowledged: [ diff --git a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx index 43fb8866fee8f..207e05bbf5cd2 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.stories.tsx @@ -45,10 +45,6 @@ export const SidePanelDocs: StoryFn = () => { return } -export const SidePanelWelcome: StoryFn = () => { - return -} - export const SidePanelSettings: StoryFn = () => { return } diff --git a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx index b156ec1dba7c6..5b1f7d787db04 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx @@ -1,6 +1,6 @@ import './SidePanel.scss' -import { IconConfetti, IconEllipsis, IconFeatures, IconGear, IconInfo, IconNotebook, IconSupport } from '@posthog/icons' +import { IconEllipsis, IconFeatures, IconGear, IconInfo, IconNotebook, IconSupport } from '@posthog/icons' import { LemonButton, LemonMenu, LemonMenuItems } from '@posthog/lemon-ui' import clsx from 'clsx' import { useActions, useValues } from 'kea' @@ -19,7 +19,6 @@ import { SidePanelFeaturePreviews } from './panels/SidePanelFeaturePreviews' import { SidePanelSettings } from './panels/SidePanelSettings' import { SidePanelStatus, SidePanelStatusIcon } from './panels/SidePanelStatus' import { SidePanelSupport } from './panels/SidePanelSupport' -import { SidePanelWelcome } from './panels/SidePanelWelcome' import { sidePanelLogic } from './sidePanelLogic' import { sidePanelStateLogic } from './sidePanelStateLogic' @@ -67,11 +66,6 @@ export const SIDE_PANEL_TABS: Record ( - // eslint-disable-next-line react/forbid-dom-props -
- {children} -
-) - -type CardProps = { - children: React.ReactNode - className?: string -} - -const Card = ({ children, className }: CardProps): JSX.Element => ( -
- {children} -
-) - -const Title = ({ children }: { children: React.ReactNode }): JSX.Element => ( -

{children}

-) -const Description = ({ children }: { children: React.ReactNode }): JSX.Element => ( -

{children}

-) -const Image = ({ - src, - alt, - width, - height, - style, -}: { - src: string - alt: string - width?: number | string - height?: number | string - style?: React.CSSProperties - // eslint-disable-next-line react/forbid-dom-props -}): JSX.Element => {alt} - -export const SidePanelWelcome = (): JSX.Element => { - const { closeSidePanel, openSidePanel } = useActions(sidePanelStateLogic) - const { isDarkModeOn } = useValues(themeLogic) - - return ( - <> -
-
- What's new? -
-
- -
-
-
-
-

- đź‘‹ Say hello to -
PostHog 3000
-

-

We're past 0 to 1.

-

- It's time to go from 1 to 3000. And this is just the beginning… -

-
- } - className="mb-5 self-start" - > - Read the blog post - -
-
-
- -
- - - Dark mode - - Toggle between light and dark. Synced with your system by default. - -
- Dark mode -
-
-
- - - - Updated nav - Sub-products are now split out from project & data. -
- Updated nav -
-
- - Notebooks - - Analyze data from different angles and share results with your team - all in - a single document. - -
- Notebooks -
-
-
- - - -
-
- Side panel - - It's this multipurpose thing you're looking at right now! - - Create notebooks, read docs, contact support, and more. -
-
- Side panel -
-
-
-
- - - - Improved search - - Search for anything with - -
- Improved search -
-
- -
- Command bar - - Navigate faster with - -
-
- Command bar -
-
-
- - - - Toolbar redesigned - - Dark mode: on. Same features, but easier to use. And we finally put the "bar" - in "toolbar". - -
- Toolbar -
-
-
- -
- } - > - Read the blog post - - openSidePanel(SidePanelTab.Support, 'feedback:posthog-3000')} - type="secondary" - sideIcon={} - > - Share feedback - -
-
- - - Pro tip: Access this panel again from the{' '} - - - {' '} - menu. - -
-
- - ) -} diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelDocsLogic.ts b/frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelDocsLogic.ts index ae109ee3586ea..1d8a26f983790 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelDocsLogic.ts +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/sidePanelDocsLogic.ts @@ -25,7 +25,7 @@ export const sidePanelDocsLogic = kea([ path(['scenes', 'navigation', 'sidepanel', 'sidePanelDocsLogic']), connect({ actions: [sidePanelStateLogic, ['openSidePanel', 'closeSidePanel']], - values: [sceneLogic, ['sceneConfig']], + values: [sceneLogic, ['sceneConfig'], sidePanelStateLogic, ['selectedTabOptions']], }), actions({ @@ -85,7 +85,13 @@ export const sidePanelDocsLogic = kea([ })), afterMount(({ actions, values }) => { - if (values.sceneConfig?.defaultDocsPath) { + // If a destination was set in the options, use that + // otherwise the default for the current scene + // otherwise, whatever it last was set to + if (values.selectedTabOptions) { + const initialPath = getPathFromUrl(values.selectedTabOptions) + actions.setInitialPath(initialPath) + } else if (values.sceneConfig?.defaultDocsPath) { actions.setInitialPath(values.sceneConfig?.defaultDocsPath) } }), diff --git a/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx b/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx index 097930e05eb85..e889d5783cf0d 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/sidePanelLogic.tsx @@ -1,9 +1,7 @@ -import { afterMount, connect, kea, path, reducers, selectors } from 'kea' -import { subscriptions } from 'kea-subscriptions' +import { connect, kea, path, selectors } from 'kea' import { activationLogic } from 'lib/components/ActivationSidebar/activationLogic' import { FEATURE_FLAGS } from 'lib/constants' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' -import posthog from 'posthog-js' import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic' import { SidePanelTab } from '~/types' @@ -17,7 +15,6 @@ const ALWAYS_EXTRA_TABS = [ SidePanelTab.Settings, SidePanelTab.FeaturePreviews, SidePanelTab.Activity, - SidePanelTab.Welcome, SidePanelTab.Status, ] @@ -42,40 +39,7 @@ export const sidePanelLogic = kea([ actions: [sidePanelStateLogic, ['closeSidePanel', 'openSidePanel']], }), - reducers(() => ({ - welcomeAnnouncementAcknowledged: [ - false, - { persist: true }, - { - closeSidePanel: () => true, - openSidePanel: (_, { tab }) => tab !== SidePanelTab.Welcome, - }, - ], - })), - subscriptions({ - welcomeAnnouncementAcknowledged: (welcomeAnnouncementAcknowledged) => { - if (welcomeAnnouncementAcknowledged) { - // Linked to the FF to ensure it isn't shown again - posthog.capture('3000 welcome acknowledged', { - $set: { - '3000-welcome-acknowledged': true, - }, - }) - } - }, - }), selectors({ - shouldShowWelcomeAnnouncement: [ - (s) => [s.welcomeAnnouncementAcknowledged, s.featureFlags], - (welcomeAnnouncementAcknowledged, featureFlags) => { - if (featureFlags[FEATURE_FLAGS.POSTHOG_3000_WELCOME_ANNOUNCEMENT] && !welcomeAnnouncementAcknowledged) { - return true - } - - return false - }, - ], - enabledTabs: [ (s) => [s.isCloudOrDev, s.isReady, s.hasCompletedAllTasks, s.featureFlags], (isCloudOrDev, isReady, hasCompletedAllTasks, featureflags) => { @@ -95,7 +59,6 @@ export const sidePanelLogic = kea([ } tabs.push(SidePanelTab.FeaturePreviews) tabs.push(SidePanelTab.Settings) - tabs.push(SidePanelTab.Welcome) if (isCloudOrDev && featureflags[FEATURE_FLAGS.SIDEPANEL_STATUS]) { tabs.push(SidePanelTab.Status) @@ -138,10 +101,4 @@ export const sidePanelLogic = kea([ }, ], }), - - afterMount(({ values }) => { - if (!values.sidePanelOpen && values.shouldShowWelcomeAnnouncement) { - sidePanelStateLogic.findMounted()?.actions.openSidePanel(SidePanelTab.Welcome) - } - }), ]) diff --git a/frontend/src/layout/navigation/TopBar/AccountPopover.tsx b/frontend/src/layout/navigation/TopBar/AccountPopover.tsx index 40937e7c569c4..b42cb02e0a690 100644 --- a/frontend/src/layout/navigation/TopBar/AccountPopover.tsx +++ b/frontend/src/layout/navigation/TopBar/AccountPopover.tsx @@ -27,12 +27,13 @@ import { NewOrganizationButton, OtherOrganizationButton, } from '~/layout/navigation/OrganizationSwitcher' +import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic' import { organizationLogic } from '../../../scenes/organizationLogic' import { preflightLogic } from '../../../scenes/PreflightCheck/preflightLogic' import { urls } from '../../../scenes/urls' import { userLogic } from '../../../scenes/userLogic' -import { OrganizationBasicType } from '../../../types' +import { OrganizationBasicType, SidePanelTab } from '../../../types' import { navigationLogic } from '../navigationLogic' function AccountPopoverSection({ @@ -189,6 +190,8 @@ function SignOutButton(): JSX.Element { export function AccountPopoverOverlay(): JSX.Element { const { user, otherOrganizations } = useValues(userLogic) const { currentOrganization } = useValues(organizationLogic) + const { mobileLayout } = useValues(navigationLogic) + const { openSidePanel } = useActions(sidePanelStateLogic) const { preflight, isCloudOrDev } = useValues(preflightLogic) const { closeAccountPopover } = useActions(navigationLogic) @@ -227,8 +230,14 @@ export function AccountPopoverOverlay(): JSX.Element { { + closeAccountPopover() + if (!mobileLayout) { + e.preventDefault() + openSidePanel(SidePanelTab.Docs, '/changelog') + } + }} icon={} fullWidth data-attr="whats-new-button" diff --git a/frontend/src/types.ts b/frontend/src/types.ts index ad1d69d92e237..9b2602fcd07f2 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -3719,7 +3719,6 @@ export enum SidePanelTab { Docs = 'docs', Activation = 'activation', Settings = 'settings', - Welcome = 'welcome', FeaturePreviews = 'feature-previews', Activity = 'activity', Discussion = 'discussion',