Skip to content

Commit

Permalink
fix: Unify what's new to go to the changelog (#19985)
Browse files Browse the repository at this point in the history
* fix: Opening of a docs link via state

* Fix

* Removed old assets

* Fix mobile experience

---------

Co-authored-by: Michael Matloka <[email protected]>
  • Loading branch information
benjackwhite and Twixes authored Jan 30, 2024
1 parent 5fdf645 commit 5ad5811
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 339 deletions.
Binary file removed frontend/public/3000/3000-command-palette-dark.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-command-palette.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-dark-mode.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-launch.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-nav-dark.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-nav.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-notebooks-dark.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-notebooks.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-search-dark.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-search.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-side-panel-dark.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-side-panel.png
Binary file not shown.
Binary file removed frontend/public/3000/3000-toolbar.png
Binary file not shown.
2 changes: 2 additions & 0 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
props({} as { inputElement?: HTMLInputElement | null }),
connect(() => ({
values: [sceneLogic, ['sceneConfig'], navigationLogic, ['mobileLayout'], teamLogic, ['currentTeam']],
actions: [navigationLogic, ['closeAccountPopover']],
})),
actions({
hideSidebar: true,
Expand Down Expand Up @@ -133,6 +134,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
{
showNavOnMobile: () => true,
hideNavOnMobile: () => false,
closeAccountPopover: () => false,
},
],
isSidebarKeyboardShortcutAcknowledged: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ export const SidePanelDocs: StoryFn = () => {
return <BaseTemplate panel={SidePanelTab.Docs} />
}

export const SidePanelWelcome: StoryFn = () => {
return <BaseTemplate panel={SidePanelTab.Welcome} />
}

export const SidePanelSettings: StoryFn = () => {
return <BaseTemplate panel={SidePanelTab.Settings} />
}
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/layout/navigation-3000/sidepanel/SidePanel.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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'

Expand Down Expand Up @@ -67,11 +66,6 @@ export const SIDE_PANEL_TABS: Record<SidePanelTab, { label: string; Icon: any; C
Icon: SidePanelDiscussionIcon,
Content: SidePanelDiscussion,
},
[SidePanelTab.Welcome]: {
label: "What's new?",
Icon: IconConfetti,
Content: SidePanelWelcome,
},
[SidePanelTab.Status]: {
label: 'System status',
Icon: SidePanelStatusIcon,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const sidePanelDocsLogic = kea<sidePanelDocsLogicType>([
path(['scenes', 'navigation', 'sidepanel', 'sidePanelDocsLogic']),
connect({
actions: [sidePanelStateLogic, ['openSidePanel', 'closeSidePanel']],
values: [sceneLogic, ['sceneConfig']],
values: [sceneLogic, ['sceneConfig'], sidePanelStateLogic, ['selectedTabOptions']],
}),

actions({
Expand Down Expand Up @@ -85,7 +85,13 @@ export const sidePanelDocsLogic = kea<sidePanelDocsLogicType>([
})),

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)
}
}),
Expand Down
Loading

0 comments on commit 5ad5811

Please sign in to comment.