:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(nav): consolidate Help menu into a grouped "More" menu (#67081)
Rafael Audibertf1c0969cc6f5
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex c1fc29ce6a70..92494ce3acf8 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -492,6 +492,14 @@ snapshots:hash: v1.k794b7964.2590c767710f5896460119705f0703bc9cd21a20c8c126f4db366b61a5bcba28.u1i4S-zmIzVZld-cgvuMd17GRZxPmS3ViBkJIPAdeDgcomponents-hedgehogmode--static-hedgehog--light:hash: v1.k794b7964.43d71f5c3ad02bd9e1fa87433d34df79e0de653c4b55004188bed5de78a2c3f5.i2ATBYyqY7uq7UxwlL2Rdte6AuMyySa8Jnbeb1VouoQ+ components-help-menu--open--dark:+ hash: v1.k794b7964.e01692de9c7de90d5e4e2af414a81126a6b4a5cd9a2c7ca7bbcfc6cc951c47b3.Gw-pomIf8Xiq5r_1bHlSA-YKOeqMkNYPmYArf4J4jjw+ components-help-menu--open--light:+ hash: v1.k794b7964.92e96c73e22271178660d3181f3d30c0e9c9f8f8d1d51dc0ffce5390afdc1cda.wXssrXRd1krylD7J79Rh1xm5ozJBsRHg2k_kAhyBwMw+ components-help-menu--open-with-health-issues--dark:+ hash: v1.k794b7964.74e44f2ed1879a58eb4320f069a454e3d743fcfca6801711d1dcc9434ced1a64.eJ5d2ge93Gknu1JBH4Otuj8taeXNXMlutLy11JFwZ_A+ components-help-menu--open-with-health-issues--light:+ hash: v1.k794b7964.f2f4430ad436500983f913c2df2f28a1ae7b1831dcc3665640b9d86f9769674c.QUKe4PC4Yatch9CB-XtqdMUSro2QGRO9b9N_b4CCn-Ecomponents-hogcharts-barchart--custom-corner-radius--dark:hash: v1.k794b7964.ad5f61598ff2f2ac9e3beac0c0f1459ac8ad2f52e55ddcd331ecd4fa8704b737.9rTHCgsmvqArlFDuTdlH2cH_9vCytjkfMK3VVzShVLwcomponents-hogcharts-barchart--custom-corner-radius--light:diff --git a/frontend/src/lib/components/HelpMenu/HelpMenu.stories.tsx b/frontend/src/lib/components/HelpMenu/HelpMenu.stories.tsxnew file mode 100644index 000000000000..f944a4be9751--- /dev/null+++ b/frontend/src/lib/components/HelpMenu/HelpMenu.stories.tsx@@ -0,0 +1,52 @@+import type { Meta, StoryObj } from '@storybook/react'+import { useActions } from 'kea'++import { useOnMountEffect } from 'lib/hooks/useOnMountEffect'++import { mswDecorator } from '~/mocks/browser'++import { HelpMenu } from './HelpMenu'+import { helpMenuLogic } from './helpMenuLogic'++// The health-issues summary is the only request the menu makes that the default Storybook+// mocks (billing, preflight, users/@me, status page) don't already cover. Mocking it drives+// the trigger/Health badge state deterministically.+const HEALTHY_SUMMARY = { total: 0, by_severity: {}, by_kind: {} }+const UNHEALTHY_SUMMARY = {+ total: 3,+ by_severity: { critical: 1, warning: 2 },+ by_kind: { ingestion_warning: 2, query_error: 1 },+}++const meta: Meta<typeof HelpMenu> = {+ title: 'Components/Help Menu',+ component: HelpMenu,+ render: () => {+ const { setHelpMenuOpen } = useActions(helpMenuLogic)+ useOnMountEffect(() => setHelpMenuOpen(true))++ return (+ <div className="flex h-[1400px] w-[600px]">+ <HelpMenu />+ </div>+ )+ },+ parameters: {+ // Not `fullscreen` — the runner rejects snapshotTargetSelector for fullscreen stories.+ layout: 'centered',+ // Tall viewport so the open menu renders its full height without the popup's internal+ // ScrollableShadows clipping items (it's capped at the available height).+ testOptions: { viewport: { width: 600, height: 1400 } },+ },+}+export default meta++type Story = StoryObj<typeof HelpMenu>++export const Open: Story = {+ decorators: [mswDecorator({ get: { '/api/environments/:team_id/health_issues/summary/': HEALTHY_SUMMARY } })],+}++export const OpenWithHealthIssues: Story = {+ decorators: [mswDecorator({ get: { '/api/environments/:team_id/health_issues/summary/': UNHEALTHY_SUMMARY } })],+}diff --git a/frontend/src/lib/components/HelpMenu/HelpMenu.tsx b/frontend/src/lib/components/HelpMenu/HelpMenu.tsxindex aac1c210514d..ac93ce971e07 100644--- a/frontend/src/lib/components/HelpMenu/HelpMenu.tsx+++ b/frontend/src/lib/components/HelpMenu/HelpMenu.tsx@@ -7,7 +7,7 @@ import {IconConfetti,IconCopy,IconDatabase,- IconEllipsis,+ IconDownload,IconExpand45,IconHeart,IconLive,@@ -19,10 +19,10 @@ import {} from '@posthog/icons'import { ProfilePicture } from '@posthog/lemon-ui'-import { IconWithBadge } from 'lib/lemon-ui/icons'+import { useFeatureFlag } from 'lib/hooks/useFeatureFlag'+import { IconMenu, IconWithBadge } from 'lib/lemon-ui/icons'import { Link } from 'lib/lemon-ui/Link/Link'import { ButtonPrimitive } from 'lib/ui/Button/ButtonPrimitives'-import { DropdownMenuSeparator } from 'lib/ui/DropdownMenu/DropdownMenu'import { Label } from 'lib/ui/Label/Label'import { MenuOpenIndicator } from 'lib/ui/Menus/Menus'import { copyToClipboard } from 'lib/utils/copyToClipboard'@@ -37,7 +37,6 @@ import { navigation3000Logic } from '~/layout/navigation-3000/navigationLogic'import { sidePanelStateLogic } from '~/layout/navigation-3000/sidepanel/sidePanelStateLogic'import { SidePanelTab } from '~/types'-import { SidePanelQuestionIcon } from 'products/conversations/frontend/components/SidePanel/SidePanelQuestionIcon'import { SidePanelSupportIcon } from 'products/conversations/frontend/components/SidePanel/SidePanelSupportIcon'import { ThemeMenu } from '../Menus/ThemeMenu'@@ -48,6 +47,7 @@ import { keyBinds } from '../Shortcuts/shortcuts'import { openCHQueriesDebugModal } from '../Shortcuts/utils/DebugCHQueries'import { healthSummaryLogic } from './healthSummaryLogic'import { helpMenuLogic } from './helpMenuLogic'+import { IconCheeseburger } from './IconCheeseburger'import { posthogStatusLogic } from './posthogStatusLogic'export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Element {@@ -64,6 +64,9 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.ElemuseValues(posthogStatusLogic)const { totalIssues } = useValues(healthSummaryLogic)+ // A/B test of the trigger icon: control = 3-line hamburger menu icon, test = cheeseburger glyph+ const useCheeseburger = useFeatureFlag('MORE_MENU_ICON_EXPERIMENT', 'test')+return (<Menu.Root open={isHelpMenuOpen} onOpenChange={setHelpMenuOpen}><Menu.Trigger@@ -72,7 +75,7 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elemtooltip={iconOnly ? (<>- Help menu+ More<RenderKeybind keybind={[keyBinds.helpMenu]} className="ml-1" /></>) : undefined@@ -92,12 +95,16 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elemstatus={triggerBadgeStatus}className="flex">- <SidePanelQuestionIcon className="size-[17px]" />+ {useCheeseburger ? (+ <IconCheeseburger className="size-[17px]" />+ ) : (+ <IconMenu className="size-[17px]" />+ )}</IconWithBadge></span>{!iconOnly && (<>- <span className="-ml-px">Help</span>+ <span className="-ml-px">More</span><MenuOpenIndicator direction="up" /></>)}@@ -120,36 +127,27 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.ElemclassName="flex flex-col gap-px overflow-x-hidden"innerClassName="primitive-menu-content-inner p-1 ">- <div className="flex flex-col gap-px mb-2">+ <div className="flex flex-col gap-px">+ <Label intent="menu" className="px-2">+ Help+ </Label><Menu.Itemrender={(props) => (<Link{...props}to={urls.ai()}- buttonProps={{- menuItem: true,- size: 'fit',- className:- 'flex flex-col gap-1 p-2 border border-primary rounded h-32 items-center justify-center shadow hover:border-accent transition-colors',- }}- data-attr="help-menu-ask-posthog-ai-button"+ buttonProps={{ menuItem: true }}+ data-attr="more-menu-ask-ai-button">- <span className="size-3 [&>svg]:size-4 mb-3">- <IconSparkles className="text-ai" />- </span>- <span className="text-sm font-medium">Ask PostHog AI</span>- <span className="text-xs text-tertiary text-center text-pretty">- PostHog AI answers 80%+ of support questions we receive!- </span>+ <IconSparkles className="text-ai" />+ Ask PostHog AI</Link>)}/>- </div>- <div className="flex flex-col gap-px pt-1"><Menu.ItemonClick={() => openSidePanel(SidePanelTab.Support)}render={- <ButtonPrimitive menuItem data-attr="help-menu-support-button">+ <ButtonPrimitive menuItem data-attr="more-menu-support-button"><SidePanelSupportIcon />Support<IconOpenSidebar className="size-3" />@@ -167,30 +165,60 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.ElemdisableDocsPaneltooltip="Open docs in new browser tab"tooltipPlacement="right"- data-attr="help-menu-docs-button"+ data-attr="more-menu-docs-button"><IconBook />Docs</Link>)}/>++ <Label intent="menu" className="px-2 mt-2">+ Project+ </Label><Menu.Itemrender={(props) => (<Link{...props}- tooltip="View our changelog in new browser tab"- tooltipPlacement="right"- targetBlankIcon- target="_blank"+ to={urls.exports()}buttonProps={{ menuItem: true }}- to="https://posthog.com/changelog"- data-attr="help-menu-changelog-button"+ data-attr="more-menu-exports-button">- <IconLive />- Changelog+ <IconDownload />+ Exports</Link>)}/>+ <Menu.Item+ render={(props) => (+ <Link+ {...props}+ to={urls.health()}+ buttonProps={{ menuItem: true }}+ tooltip={+ totalIssues > 0+ ? `${totalIssues} health issue${totalIssues === 1 ? '' : 's'}`+ : 'All systems healthy'+ }+ tooltipPlacement="right"+ tooltipCloseDelayMs={0}+ data-attr="more-menu-health-button"+ >+ <IconWithBadge+ size="xsmall"+ content={triggerBadgeContent}+ status={triggerBadgeStatus}+ >+ <IconStethoscope />+ </IconWithBadge>+ Health+ </Link>+ )}+ />++ <Label intent="menu" className="px-2 mt-2">+ PostHog+ </Label><Menu.Itemrender={(props) => (<Link@@ -202,7 +230,7 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elemtooltip={postHogStatusTooltip}tooltipPlacement="right"tooltipCloseDelayMs={0}- data-attr="help-menu-posthog-status-button"+ data-attr="more-menu-status-button"><IconWithBadgecontent={postHogStatusBadgeContent}@@ -212,7 +240,7 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem><IconCloud /></IconWithBadge>- PostHog status+ Status</Link>)}/>@@ -220,25 +248,16 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elemrender={(props) => (<Link{...props}- to={urls.health()}- buttonProps={{ menuItem: true }}- tooltip={- totalIssues > 0- ? `${totalIssues} health issue${totalIssues === 1 ? '' : 's'}`- : 'All systems healthy'- }+ tooltip="View our changelog in new browser tab"tooltipPlacement="right"- tooltipCloseDelayMs={0}- data-attr="help-menu-health-issues-button"+ targetBlankIcon+ target="_blank"+ buttonProps={{ menuItem: true }}+ to="https://posthog.com/changelog"+ data-attr="more-menu-changelog-button">- <IconWithBadge- size="xsmall"- content={triggerBadgeContent}- status={triggerBadgeStatus}- >- <IconStethoscope />- </IconWithBadge>- Health issues+ <IconLive />+ Changelog</Link>)}/>@@ -343,80 +362,58 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem</Menu.SubmenuRoot>)}- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger- render={- <ButtonPrimitive menuItem data-attr="help-menu-display-options-button">- <IconEllipsis />- Display options- <MenuOpenIndicator intent="sub" />- </ButtonPrimitive>- }- />- <Menu.Portal>- <Menu.Positioner className="z-[var(--z-popover)]">- <Menu.Popup className="primitive-menu-content max-h-[calc(var(--available-height)-4px)] min-w-[250px]">- <ScrollableShadows- direction="vertical"- styledScrollbars- className="flex flex-col gap-px overflow-x-hidden"- innerClassName="primitive-menu-content-inner p-1 "- >- <Menu.Item- onClick={() => setShortcutMenuOpen(true)}- render={- <ButtonPrimitive- tooltip="Open shortcut menu"- tooltipPlacement="right"- menuItem- data-attr="help-menu-shortcuts-button"- >- <span className="size-4 flex items-center justify-center">- ⌘- </span>- Shortcuts- <div className="flex gap-1 ml-auto items-center">- <KeyboardShortcut command option k />- <span className="text-xs opacity-75">or</span>- <KeyboardShortcut command shift k />- </div>- </ButtonPrimitive>- }- />- <Menu.Item- onClick={toggleZenMode}- render={- <ButtonPrimitive- menuItem- data-attr="help-menu-zen-mode-button"- >- <IconExpand45 />- Zen mode- <div className="flex gap-1 ml-auto items-center">- <KeyboardShortcut command option z />- </div>- </ButtonPrimitive>- }- />- <ThemeMenu />- </ScrollableShadows>- </Menu.Popup>- </Menu.Positioner>- </Menu.Portal>- </Menu.SubmenuRoot>+ <Label intent="menu" className="px-2 mt-2">+ Display+ </Label>+ <Menu.Item+ onClick={() => setShortcutMenuOpen(true)}+ render={+ <ButtonPrimitive+ tooltip="Open shortcut menu"+ tooltipPlacement="right"+ menuItem+ data-attr="more-menu-shortcuts-button"+ >+ <span className="size-4 flex items-center justify-center">⌘</span>+ Shortcuts+ <div className="flex gap-1 ml-auto items-center">+ <KeyboardShortcut command option k />+ <span className="text-xs opacity-75">or</span>+ <KeyboardShortcut command shift k />+ </div>+ </ButtonPrimitive>+ }+ />+ <Menu.Item+ onClick={toggleZenMode}+ render={+ <ButtonPrimitive menuItem data-attr="more-menu-zen-mode-button">+ <IconExpand45 />+ Zen mode+ <div className="flex gap-1 ml-auto items-center">+ <KeyboardShortcut command option z />+ </div>+ </ButtonPrimitive>+ }+ />+ <ThemeMenu />{billing?.account_owner?.email && billing?.account_owner?.name && (<>- <Label intent="menu" className="px-2 mt-2">+ <Label intent="menu" className="px-2 mt-4">YOUR POSTHOG HUMAN</Label>- <DropdownMenuSeparator /><Menu.ItemonClick={() => {- void copyToClipboard(billing?.account_owner?.email || '', 'email')+ // It's dumb rechecking this, but TS needs it because of closures+ if (!billing?.account_owner?.email || !billing?.account_owner?.name) {+ return+ }++ void copyToClipboard(billing.account_owner.email, 'email')reportAccountOwnerClicked({- name: billing?.account_owner?.name || '',- email: billing?.account_owner?.email || '',+ name: billing.account_owner.name,+ email: billing.account_owner.email,})}}render={@@ -428,13 +425,13 @@ export function HelpMenu({ iconOnly = false }: { iconOnly?: boolean }): JSX.Elem><ProfilePictureuser={{- first_name: billing?.account_owner?.name || '',- email: billing?.account_owner?.email || '',+ first_name: billing.account_owner.name,+ email: billing.account_owner.email,}}size="xs"/><span className="truncate font-semibold">- {billing?.account_owner?.name || ''}+ {billing.account_owner.name}</span><div className="ml-auto"><IconCopy />diff --git a/frontend/src/lib/components/HelpMenu/IconCheeseburger.tsx b/frontend/src/lib/components/HelpMenu/IconCheeseburger.tsxnew file mode 100644index 000000000000..d637e02a092b--- /dev/null+++ b/frontend/src/lib/components/HelpMenu/IconCheeseburger.tsx@@ -0,0 +1,19 @@+/** Filled cheeseburger glyph used as the "test" variant of the More nav button icon experiment. */+export function IconCheeseburger({ className }: { className?: string }): JSX.Element {+ return (+ <svg+ className={className}+ width="1em"+ height="1em"+ viewBox="0 0 24 24"+ fill="currentColor"+ xmlns="http://www.w3.org/2000/svg"+ aria-hidden="true"+ focusable="false"+ >+ <path d="M6.08892 4.86669C8.09973 4.21897 10.4602 4 12 4C13.5398 4 15.9003 4.21897 17.9111 4.86669C18.9138 5.18967 19.9017 5.64179 20.6564 6.28456C21.4307 6.94413 22 7.84629 22 9C22 9.55228 21.5523 10 21 10H3C2.44772 10 2 9.55228 2 9C2 7.84629 2.56929 6.94413 3.34365 6.28456C4.09829 5.64179 5.08623 5.18967 6.08892 4.86669Z" />+ <path d="M4.88462 13.5481C5.59846 13.2506 6.40154 13.2506 7.11539 13.5481C8.32154 14.0506 9.67846 14.0506 10.8846 13.5481C11.5985 13.2506 12.4015 13.2506 13.1154 13.5481C14.3215 14.0506 15.6785 14.0506 16.8846 13.5481C17.5985 13.2506 18.4015 13.2506 19.1154 13.5481C19.7183 13.7993 20.3589 13.9249 20.9994 13.925C21.5517 13.9251 21.9994 13.4774 21.9995 12.9251C21.9996 12.3728 21.5519 11.9251 20.9996 11.925C20.6205 11.925 20.2414 11.8506 19.8846 11.7019C18.6785 11.1994 17.3215 11.1994 16.1154 11.7019C15.4015 11.9994 14.5985 11.9994 13.8846 11.7019C12.6785 11.1994 11.3215 11.1994 10.1154 11.7019C9.40154 11.9994 8.59846 11.9994 7.88462 11.7019C6.67846 11.1994 5.32154 11.1994 4.11539 11.7019C3.75845 11.8506 3.37928 11.925 3 11.925C2.44772 11.925 2 12.3727 2 12.925C2 13.4773 2.44772 13.925 3 13.925C3.64072 13.925 4.28155 13.7994 4.88462 13.5481Z" />+ <path d="M18.032 20C18.4706 20 18.8491 20 19.1624 19.9787C19.4922 19.9561 19.8221 19.9066 20.1481 19.7716C20.8831 19.4672 21.4672 18.8831 21.7716 18.1481C21.9066 17.8221 21.9561 17.4922 21.9787 17.1624C22 16.8491 22 16.4706 22 16.032V16C22 15.4477 21.5523 15 21 15H3C2.44772 15 2 15.4477 2 16V16.032C1.99999 16.4706 1.99998 16.8491 2.02135 17.1624C2.04386 17.4922 2.09336 17.8221 2.22836 18.1481C2.53284 18.8831 3.11687 19.4672 3.85195 19.7716C4.17788 19.9066 4.50779 19.9561 4.83762 19.9787C5.15087 20 5.52934 20 5.96798 20H18.032Z" />+ </svg>+ )+}diff --git a/frontend/src/lib/components/Menus/ThemeMenu.tsx b/frontend/src/lib/components/Menus/ThemeMenu.tsxindex 7b6be1f72573..44f77b4002a7 100644--- a/frontend/src/lib/components/Menus/ThemeMenu.tsx+++ b/frontend/src/lib/components/Menus/ThemeMenu.tsx@@ -26,7 +26,7 @@ export function ThemeMenu(): JSX.Element {<Menu.SubmenuRoot><Menu.SubmenuTriggerrender={- <ButtonPrimitive menuItem>+ <ButtonPrimitive menuItem data-attr="more-menu-theme-button"><IconPalette />Color theme<div className="ml-auto flex items-center gap-1">diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex a18db23e7f0b..8d7ac52f4eee 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -174,6 +174,7 @@ export const FEATURE_FLAGS = {// UX flags, used to control the UX of the appCREATE_BUTTON_NAV_EXPERIMENT: 'create-button-nav-experiment', // owner: #team-platform-ux multivariate=control,test — adds a Create dropdown to the top of the Browse tab in the left nav+ MORE_MENU_ICON_EXPERIMENT: 'more-menu-icon-experiment', // owner: #team-platform-ux multivariate=control,test — A/B test of the "More" nav button icon: control = 3-line hamburger menu icon, test = filled burger glyphSTARRED_REORDER: 'starred-reorder', // owner: #team-platform-ux, drag-and-drop reorder of starred shortcuts in the side panelUX_HIDE_PROJECT_NOTICE: 'ux-hide-project-notice', // owner: #team-platform-ux, hides the project notice banner across all scenesdiff --git a/frontend/src/products.json b/frontend/src/products.jsonindex 11edad6b8417..037d2983c409 100644--- a/frontend/src/products.json+++ b/frontend/src/products.json@@ -310,7 +310,6 @@"type": null,"intents": []},- { "path": "Exports", "category": "Pipeline", "iconType": "exports", "type": null, "intents": [] },{ "path": "Endpoints", "category": "Tools", "iconType": null, "type": null, "intents": [] },{"path": "Event definitions",diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex ea9bdd44f413..89c07d6afcf1 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -2378,14 +2378,6 @@ export const getTreeItemsMetadata = (): FileSystemImport[] => [sceneKey: 'IngestionWarnings',sceneKeys: ['IngestionWarnings'],},- {- path: 'Exports',- category: 'Pipeline',- iconType: 'exports',- href: urls.exports(),- sceneKey: 'Exports',- sceneKeys: ['Exports'],- },{path: 'Managed viewsets',category: 'Unreleased',diff --git a/products/data_warehouse/manifest.tsx b/products/data_warehouse/manifest.tsxindex 8c8060a67602..0e50dbb95c81 100644--- a/products/data_warehouse/manifest.tsx+++ b/products/data_warehouse/manifest.tsx@@ -189,13 +189,5 @@ export const manifest: ProductManifest = {href: urls.dataWarehouseManagedViewsets(),flag: FEATURE_FLAGS.MANAGED_VIEWSETS,},- {- path: 'Exports',- category: 'Pipeline',- iconType: 'exports',- href: urls.exports(),- sceneKey: 'Exports',- sceneKeys: ['Exports'],- },],}