diff --git a/frontend/src/layout/navigation/navigationLogic.ts b/frontend/src/layout/navigation/navigationLogic.ts index b36da24b97921..b8c212bffee3b 100644 --- a/frontend/src/layout/navigation/navigationLogic.ts +++ b/frontend/src/layout/navigation/navigationLogic.ts @@ -26,9 +26,6 @@ export const navigationLogic = kea([ actions: [eventUsageLogic, ['reportProjectNoticeDismissed']], })), actions({ - toggleActivationSideBar: true, - showActivationSideBar: true, - hideActivationSideBar: true, hideSideBarMobile: true, openSitePopover: true, closeSitePopover: true, @@ -55,22 +52,6 @@ export const navigationLogic = kea([ mobileLayout: (window: Window) => window.innerWidth < 992, // Sync width threshold with Sass variable $lg! })), reducers({ - // Non-mobile base - isSideBarShownBase: [true, { persist: true }, {}], - // Mobile, applied on top of base, so that the sidebar does not show up annoyingly when shrinking the window - isSideBarShownMobile: [ - false, - { - hideSideBarMobile: () => false, - }, - ], - isActivationSideBarShownBase: [ - false, - { - showActivationSideBar: () => true, - hideActivationSideBar: () => false, - }, - ], isSitePopoverOpen: [ false, { @@ -95,17 +76,6 @@ export const navigationLogic = kea([ ], }), selectors({ - /** `noSidebar` whether the current scene should display a sidebar at all */ - noSidebar: [ - (s) => [s.fullscreen, s.sceneConfig], - (fullscreen, sceneConfig) => fullscreen || sceneConfig?.layout === 'plain', - ], - isActivationSideBarShown: [ - (s) => [s.mobileLayout, s.isActivationSideBarShownBase, s.isSideBarShownMobile, s.noSidebar], - (mobileLayout, isActivationSideBarShownBase, isSideBarShownMobile, noSidebar) => - !noSidebar && - (mobileLayout ? isActivationSideBarShownBase && !isSideBarShownMobile : isActivationSideBarShownBase), - ], systemStatusHealthy: [ (s) => [s.navigationStatus, preflightLogic.selectors.siteUrlMisconfigured], (status, siteUrlMisconfigured) => { @@ -167,16 +137,9 @@ export const navigationLogic = kea([ }, ], }), - listeners(({ actions, values }) => ({ + listeners(({ actions }) => ({ closeProjectNotice: ({ projectNoticeVariant }) => { actions.reportProjectNoticeDismissed(projectNoticeVariant) }, - toggleActivationSideBar: () => { - if (values.isActivationSideBarShown) { - actions.hideActivationSideBar() - } else { - actions.showActivationSideBar() - } - }, })), ]) diff --git a/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.scss b/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.scss deleted file mode 100644 index e4c2e54e02d40..0000000000000 --- a/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.scss +++ /dev/null @@ -1,52 +0,0 @@ -@import '../../../styles/mixins'; - -.ActivationSideBar { - position: absolute; - right: 0; - z-index: var(--z-lemon-sidebar); - flex-shrink: 0; - width: 25rem; - height: 100%; - margin-left: -25rem; - background: var(--side); - border-left: 1px solid var(--border); - transition: 200ms ease margin, 200ms ease transform; - - @include screen($lg) { - position: relative; - height: initial; - } -} - -.ActivationSideBar--hidden { - display: none; -} - -.ActivationSideBar__content { - position: sticky; - top: 3.5rem; - right: 0; - display: flex; - flex-direction: column; - width: 100%; - height: calc(100vh - 3.5rem); - overflow: scroll; - - > div > ul { - overflow: auto; - - li { - margin-top: 0.5rem; - } - } - - .ActivationSideBar__close_button { - position: absolute; - top: 0.5rem; - right: 1rem; - } - - .ActivationSideBar__hog { - height: 150px; - } -} diff --git a/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.tsx b/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.tsx index d7a2a837baf7f..77f48ffa84c3f 100644 --- a/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.tsx +++ b/frontend/src/lib/components/ActivationSidebar/ActivationSidebar.tsx @@ -1,15 +1,8 @@ -import './ActivationSidebar.scss' - import { LemonButton, LemonButtonWithSideActionProps } from '@posthog/lemon-ui' -import { Progress } from 'antd' -import clsx from 'clsx' -import { useActions, useValues } from 'kea' +import { useActions } from 'kea' import { IconCheckmark, IconClose } from 'lib/lemon-ui/icons' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' -import { navigationLogic } from '~/layout/navigation/navigationLogic' - -import { ProfessorHog } from '../hedgehogs' import { activationLogic, ActivationTaskType } from './activationLogic' export const ActivationTask = ({ @@ -69,58 +62,3 @@ export const ActivationTask = ({ ) } - -export const ActivationSidebar = (): JSX.Element => { - const { isActivationSideBarShown } = useValues(navigationLogic) - const { hideActivationSideBar } = useActions(navigationLogic) - const { activeTasks, completedTasks, completionPercent } = useValues(activationLogic) - - return ( -
-
-
- } onClick={() => hideActivationSideBar()} /> -
- <> -

Quick Start

-

Use our Quick Start guide to learn about everything PostHog can do for you and your product.

-
-
- activeTasks.length} - strokeColor="#345cff" // primary-light - /> -

still to go

-
-
- -
-
- {activeTasks.length > 0 && ( -
-
What's next?
-
    - {activeTasks.map((task: ActivationTaskType) => ( - - ))} -
-
- )} - {completedTasks.length > 0 && ( -
-
Completed
-
    - {completedTasks.map((task: ActivationTaskType) => ( - - ))} -
-
- )} - -
-
- ) -} diff --git a/frontend/src/lib/components/ActivationSidebar/activationLogic.test.ts b/frontend/src/lib/components/ActivationSidebar/activationLogic.test.ts index c9c61a55e8be6..6b5b05d926780 100644 --- a/frontend/src/lib/components/ActivationSidebar/activationLogic.test.ts +++ b/frontend/src/lib/components/ActivationSidebar/activationLogic.test.ts @@ -24,9 +24,4 @@ describe('activationLogic', () => { it('should load custom events on mount', async () => { expectLogic(logic).toDispatchActions(['loadCustomEvents', 'loadInsights']) }) - - it('should report activation sidebar shown', async () => { - navigationLogic.actions.showActivationSideBar() - expectLogic(logic).toDispatchActions(['reportActivationSidebarShown']) - }) }) diff --git a/frontend/src/lib/components/ActivationSidebar/activationLogic.ts b/frontend/src/lib/components/ActivationSidebar/activationLogic.ts index 449b93f710f53..5fe22dc5541be 100644 --- a/frontend/src/lib/components/ActivationSidebar/activationLogic.ts +++ b/frontend/src/lib/components/ActivationSidebar/activationLogic.ts @@ -11,7 +11,6 @@ import { inviteLogic } from 'scenes/settings/organization/inviteLogic' import { teamLogic } from 'scenes/teamLogic' import { urls } from 'scenes/urls' -import { navigationLogic } from '~/layout/navigation/navigationLogic' import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic' import { dashboardsModel } from '~/models/dashboardsModel' import { EventDefinitionType, ProductKey, SidePanelTab, TeamBasicType } from '~/types' @@ -66,8 +65,6 @@ export const activationLogic = kea([ ['showInviteModal', 'loadInvitesSuccess', 'loadInvitesFailure'], pluginsLogic, ['loadPluginsSuccess', 'loadPluginsFailure'], - navigationLogic, - ['toggleActivationSideBar', 'showActivationSideBar', 'hideActivationSideBar'], sidePanelStateLogic, ['openSidePanel'], eventUsageLogic, @@ -358,13 +355,6 @@ export const activationLogic = kea([ actions.addSkippedTask(values.currentTeam.id, id) } }, - showActivationSideBar: async () => { - actions.reportActivationSideBarShown( - values.activeTasks.length, - values.completedTasks.length, - values.completionPercent - ) - }, })), events(({ actions }) => ({ afterMount: () => { @@ -375,10 +365,7 @@ export const activationLogic = kea([ urlToAction(({ actions, values }) => ({ '*': (_, params) => { if (params?.onboarding_completed && !values.hasCompletedAllTasks) { - actions.toggleActivationSideBar() actions.openSidePanel(SidePanelTab.Activation) - } else { - actions.hideActivationSideBar() } }, })),