-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve banner layout with container queries * Update UI snapshots for `chromium` (1) * Fix * Update UI snapshots for `chromium` (1) * Fix * Fixes * Fix up closing * Started adding stories * Fixed up when it gets shown * Fixes * Update UI snapshots for `chromium` (1) * Fixes * fix * Update UI snapshots for `chromium` (1) * Fix * PR feedback * Added event for the flag * updates * Bunch of fixes * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fixes * Fix lemon banner small size and add sidepanel stories * Fix * Update UI snapshots for `chromium` (1) * Update frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx Co-authored-by: Thomas Obermüller <[email protected]> * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix * Rework the welcome copy and tune styles * Remove a "the" * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `chromium` (2) * updated design + content * transparent close button * dark mode images * finished dark mode screenshots * polish * updated welcome icon, label * updated welcome title to match tab * tweaked spacing * Update UI snapshots for `chromium` (1) * Limit opening posthog.com links in side panel to docs * Clean up the panel * Tune default and min width of side panel * Tweak some text * The palette is no more * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Constrain "Read the blog post" width * Update UI snapshots for `chromium` (1) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Cory Watilo <[email protected]> Co-authored-by: Thomas Obermüller <[email protected]> Co-authored-by: Michael Matloka <[email protected]>
- Loading branch information
1 parent
88df681
commit 15d9265
Showing
26 changed files
with
320 additions
and
8 deletions.
There are no files selected for viewing
Binary file modified
BIN
-564 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-activation.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
BIN
+176 Bytes
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs.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
BIN
+2.34 KB
(100%)
frontend/__snapshots__/scenes-app-sidepanels--side-panel-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.welcome-card { | ||
background: var(--primary-alt-highlight-3000); | ||
|
||
body[theme='dark'] & { | ||
background: #2b2b33; | ||
} | ||
} |
250 changes: 250 additions & 0 deletions
250
frontend/src/layout/navigation-3000/sidepanel/panels/SidePanelWelcome.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
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' | ||
import featureCommandPaletteDark from 'public/3000/3000-command-palette-dark.png' | ||
import featureDarkMode from 'public/3000/3000-dark-mode.png' | ||
import featureNav from 'public/3000/3000-nav.png' | ||
import featureNavDark from 'public/3000/3000-nav-dark.png' | ||
import featureNotebooks from 'public/3000/3000-notebooks.png' | ||
import featureNotebooksDark from 'public/3000/3000-notebooks-dark.png' | ||
import featureSearch from 'public/3000/3000-search.png' | ||
import featureSearchDark from 'public/3000/3000-search-dark.png' | ||
import featureSidePanel from 'public/3000/3000-side-panel.png' | ||
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 BLOG_POST_URL = 'https://posthog.com/blog/posthog-as-a-dev-tool' | ||
|
||
type RowProps = { | ||
className?: string | ||
columns?: string | ||
children: React.ReactNode | ||
} | ||
|
||
const Row = ({ className, columns, children }: RowProps): JSX.Element => ( | ||
<div className={clsx('mb-6 gap-5 grid', className)} style={{ gridTemplateColumns: columns ? columns : '100%' }}> | ||
{children} | ||
</div> | ||
) | ||
|
||
type CardProps = { | ||
children: React.ReactNode | ||
className?: string | ||
} | ||
|
||
const Card = ({ children, className }: CardProps): JSX.Element => ( | ||
<div className={clsx('welcome-card border rounded-md px-4 py-3 w-full overflow-hidden', className)}>{children}</div> | ||
) | ||
|
||
const Title = ({ children }: { children: React.ReactNode }): JSX.Element => ( | ||
<h3 className="mb-1 font-bold leading-5">{children}</h3> | ||
) | ||
const Description = ({ children }: { children: React.ReactNode }): JSX.Element => ( | ||
<p className="text-sm opacity-75 mb-1">{children}</p> | ||
) | ||
const Image = ({ | ||
src, | ||
alt, | ||
width, | ||
height, | ||
style, | ||
}: { | ||
src: string | ||
alt: string | ||
width?: number | string | ||
height?: number | string | ||
style?: React.CSSProperties | ||
}): JSX.Element => <img src={src} alt={alt} width={width} height={height} style={style} className="mt-2" /> | ||
|
||
export const SidePanelWelcome = (): JSX.Element => { | ||
const { closeSidePanel } = useActions(sidePanelStateLogic) | ||
const { isDarkModeOn } = useValues(themeLogic) | ||
|
||
useEffect(() => { | ||
return () => { | ||
// Linked to the FF to ensure it isn't shown again | ||
posthog.capture('3000 welcome acknowledged', { | ||
$set: { | ||
[`3000-welcome-acknowledged`]: true, | ||
}, | ||
}) | ||
} | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<div className="flex-shrink bg-accent-3000 border-b sticky top-0 pl-4 pr-1 py-1 z-10 flex items-center"> | ||
<div className="flex-1"> | ||
<strong>What's new?</strong> | ||
</div> | ||
<div className="flex-shrink"> | ||
<button | ||
onClick={() => closeSidePanel()} | ||
className="btn btn-sm btn-secondary cursor-pointer bg-transparent" | ||
> | ||
<IconX className="text-lg" /> | ||
</button> | ||
</div> | ||
</div> | ||
<div className="flex flex-col m-4 my-6 flex-1"> | ||
<h1 className="font-bold text-xl mb-2 w-full"> | ||
👋 Say hello to | ||
<div className="text-primary-3000 text-4xl">PostHog 3000</div> | ||
</h1> | ||
<p className="max-w-120 text-sm font-medium mb-3 opacity-75"> | ||
We're past zero to one. | ||
<br /> | ||
In this new version of PostHog, we're going from one… to 3000. | ||
<br /> | ||
And this is just the beginning. | ||
</p> | ||
<LemonButton | ||
to={BLOG_POST_URL} | ||
targetBlank | ||
type="primary" | ||
sideIcon={<IconExternal className="text-xl" />} | ||
className="mb-5 self-start" | ||
> | ||
Read the blog post | ||
</LemonButton> | ||
|
||
<Row> | ||
<Card> | ||
<Title>Dark mode</Title> | ||
<Description> | ||
Toggle between light and dark. Synced with your system by default. | ||
</Description> | ||
<div className="-mr-4 -mb-3"> | ||
<Image | ||
src={featureDarkMode} | ||
alt="Dark mode" | ||
width="100%" | ||
style={{ borderTopLeftRadius: '0.25rem' }} | ||
/> | ||
</div> | ||
</Card> | ||
</Row> | ||
|
||
<Row className="grid grid-cols-2" columns="40% calc(60% - 1.25rem)"> | ||
<Card> | ||
<Title>Updated nav</Title> | ||
<Description>Sub-products are now split out from project & data.</Description> | ||
<div className="-mr-4 -mb-3"> | ||
<Image | ||
src={isDarkModeOn ? featureNavDark : featureNav} | ||
alt="Updated nav" | ||
width="100%" | ||
style={{ borderTopLeftRadius: '0.25rem' }} | ||
/> | ||
</div> | ||
</Card> | ||
<Card> | ||
<Title>Notebooks</Title> | ||
<Description> | ||
Analyze data from different angles and share results with your team - all in | ||
a single document. | ||
</Description> | ||
<div className="-mr-4 -mb-3"> | ||
<Image | ||
src={isDarkModeOn ? featureNotebooksDark : featureNotebooks} | ||
alt="Notebooks" | ||
width="100%" | ||
style={{ borderTopLeftRadius: '0.25rem' }} | ||
/> | ||
</div> | ||
</Card> | ||
</Row> | ||
|
||
<Row> | ||
<Card> | ||
<div className="grid grid-cols-2 gap-5 items-center"> | ||
<div> | ||
<Title>Side panel</Title> | ||
<Description> | ||
It's this multipurpose thing you're looking at right now! | ||
</Description> | ||
<Description>Create notebooks, read docs, contact support, and more.</Description> | ||
</div> | ||
<div className="-mr-4 -my-3"> | ||
<Image | ||
src={isDarkModeOn ? featureSidePanelDark : featureSidePanel} | ||
alt="Side panel" | ||
height="100%" | ||
style={{ maxHeight: 205 }} | ||
/> | ||
</div> | ||
</div> | ||
</Card> | ||
</Row> | ||
|
||
<Row className="grid grid-cols-2" columns="calc(60% - 1.25rem) 40%"> | ||
<Card> | ||
<Title>Improved search</Title> | ||
<Description> | ||
Search for anything with <KeyboardShortcut command k /> | ||
</Description> | ||
<div className="-mr-4 -mb-3"> | ||
<Image | ||
src={isDarkModeOn ? featureSearchDark : featureSearch} | ||
alt="Improved search" | ||
width="100%" | ||
style={{ borderTopLeftRadius: '0.25rem' }} | ||
/> | ||
</div> | ||
</Card> | ||
<Card className="flex flex-col"> | ||
<div className="flex-1"> | ||
<Title>Command bar</Title> | ||
<Description> | ||
Navigate faster with <KeyboardShortcut command shift k /> | ||
</Description> | ||
</div> | ||
<div className="-mr-4 -mb-3 flex-shrink"> | ||
<Image | ||
src={isDarkModeOn ? featureCommandPaletteDark : featureCommandPalette} | ||
alt="Command bar" | ||
width="100%" | ||
style={{ borderTopLeftRadius: '0.25rem' }} | ||
/> | ||
</div> | ||
</Card> | ||
</Row> | ||
|
||
<Row> | ||
<Card> | ||
<Title>Toolbar redesigned</Title> | ||
<Description> | ||
Dark mode: on. Same features, but easier to use. And we finally put the "bar" | ||
in "toolbar". | ||
</Description> | ||
<div> | ||
<Image src={featureToolbar} alt="Toolbar" width={259} /> | ||
</div> | ||
</Card> | ||
</Row> | ||
|
||
<div className="-mb-3"> | ||
<IconArrowLeft className="text-base mr-2 inline" /> | ||
<span className="m-0"> | ||
<strong>Pro tip:</strong> Access this panel again from the{' '} | ||
<span className="text-base font border p-1 rounded mx-1 w-6 h-6 inline-flex align-middle"> | ||
<IconEllipsis /> | ||
</span>{' '} | ||
menu | ||
</span> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
Oops, something went wrong.