From a9b96755a759a574d930467ed02256e4354c6660 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Tue, 5 Dec 2023 16:03:02 +0100 Subject: [PATCH] Clean up the panel --- .../sidepanel/panels/SidePanelWelcome.scss | 1 - .../sidepanel/panels/SidePanelWelcome.tsx | 112 ++++++++++-------- 2 files changed, 60 insertions(+), 53 deletions(-) diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.scss b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.scss index 34b641dbc3625..6010d7179b0ee 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.scss +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.scss @@ -1,5 +1,4 @@ .welcome-card { - // background: var(--primary-alt-highlight-3000); background: var(--primary-alt-highlight-3000); body[theme='dark'] & { diff --git a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx index cd785399be341..32734f57e329a 100644 --- a/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx +++ b/frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx @@ -2,6 +2,7 @@ import './SidePanelWelcome.scss' import { IconArrowLeft, IconEllipsis, IconExternal, IconX } from '@posthog/icons' import { LemonButton } from '@posthog/lemon-ui' +import clsx from 'clsx' import { useActions, useValues } from 'kea' import posthog from 'posthog-js' import featureCommandPalette from 'public/3000/3000-command-palette.png' @@ -18,10 +19,12 @@ import featureSidePanelDark from 'public/3000/3000-side-panel-dark.png' import featureToolbar from 'public/3000/3000-toolbar.png' import { useEffect } from 'react' +import { themeLogic } from '~/layout/navigation-3000/themeLogic' + import { KeyboardShortcut } from '../../components/KeyboardShortcut' import { sidePanelStateLogic } from '../sidePanelStateLogic' -const blogPostUrl = 'https://posthog.com/blog/why-redesign' +const BLOG_POST_URL = 'https://posthog.com/blog/posthog-as-a-dev-tool' type RowProps = { className?: string @@ -30,35 +33,39 @@ type RowProps = { } const Row = ({ className, columns, children }: RowProps): JSX.Element => ( -
+
{children}
) type CardProps = { - width?: string children: React.ReactNode className?: string } -const Card = ({ width, children, className }: CardProps): JSX.Element => ( -
- {children} -
+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}

+

{children}

) - -import { themeLogic } from '~/layout/navigation-3000/themeLogic' +const Image = ({ + src, + alt, + width, + height, + style, +}: { + src: string + alt: string + width?: number | string + height?: number | string + style?: React.CSSProperties +}): JSX.Element => {alt} export const SidePanelWelcome = (): JSX.Element => { const { closeSidePanel } = useActions(sidePanelStateLogic) @@ -84,8 +91,7 @@ export const SidePanelWelcome = (): JSX.Element => {
@@ -97,28 +103,30 @@ export const SidePanelWelcome = (): JSX.Element => {
PostHog 3000

- We're past 0 to 1. In this new version of PostHog, we're going from 1 to 3000. (And this is just the - beginning...) + We're past zero to one. +
+ In this new version of PostHog, we're going from one… to 3000. +
+ And this is just the beginning.

-
- - Read the blog post - - -
+ } + className="mb-5" + > + Read the blog post + Dark mode - Toggle between light, dark, or sync with your system + + Toggle between light and dark. Synced with your system by default. +
- Dark mode { - Updated nav - Products are now split out from project & data. + Updated navigation + 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. + 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! - Access docs, notebooks, contact support, and more. + It's this multipurpose thing you're looking at right now! + Create notebooks, read docs, contact support, and more.
- Side panel { Search for anything with
- Improved search {
- Command palette { Toolbar - Same functionality, but easier to look at. And we finally put the bar in toolbar. - Also dark mode. + Dark mode: on. Same features, but easier to use. And we finally put the "bar" + in "toolbar".
- Toolbar + Toolbar
-
- -

+

+ + Pro tip: Access this panel again from the{' '} - - + + {' '} menu -

+