: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(today): frame the today panes in a desktop-style inset (#113057)
Adam Leithce264d9f903f
diff --git a/frontend/src/layout/navigation-3000/Navigation.tsx b/frontend/src/layout/navigation-3000/Navigation.tsxindex c5af8316f645..32ab47b93858 100644--- a/frontend/src/layout/navigation-3000/Navigation.tsx+++ b/frontend/src/layout/navigation-3000/Navigation.tsx@@ -58,6 +58,7 @@ export function Navigation({} = useValues(todayShellLogic)const todayDrawerOpen = todayRail && mobileLayout && todaySidebarVisibleconst todayPhone = todayRail && todayPhoneLayout+ const todayFramed = todayRail && !todayPhone// SceneMenuBar (when enabled) replaces ProjectNotice's role of conveying project-level// context above scene content, so we hide the notice for users on the new menu bar.@@ -196,13 +197,20 @@ export function Navigation({><ProjectDragAndDropProvider>{todayRail ? <TodayShell className="left-nav" /> : <PanelLayout className="left-nav" />}+ {todayFramed && (+ // The chrome token exists only inside a quill scope, so the backdrop that fills the gap above the frame carries data-quill.+ <div data-quill aria-hidden className="TodayAppLayout__backdrop bg-[var(--chrome)]" />+ )}<divclassName={cn('@container/main-content-container main-content-container flex overflow-hidden border-primary relative',- // Under the Today layout the shell draws the seam against the content in quill's border.todayRail- ? null+ ? todayFramed && [+ 'TodayAppLayout__content',+ // A docked sidebar owns the corner and the seam, so the content draws them only without one.+ (mobileLayout || !todaySidebarVisible) && 'TodayAppLayout__content--corner',+ ]: ['lg:rounded border-t lg:border lg:mr-1 lg:mb-1 lg:mt-1',sidePanelOpen && 'rounded-r-none',@@ -210,6 +218,10 @@ export function Navigation({)}{...(todayDrawerOpen ? { inert: '' } : {})}>+ {todayFramed && (+ // The frame edge uses quill's border token so it matches the sidebar seam, and that token exists only inside a quill scope.+ <div data-quill aria-hidden className="TodayAppLayout__frame" />+ )}<mainref={mainRef}role="main"diff --git a/frontend/src/layout/today/TodayRail.tsx b/frontend/src/layout/today/TodayRail.tsxindex baf900944af2..ae35ca2929f9 100644--- a/frontend/src/layout/today/TodayRail.tsx+++ b/frontend/src/layout/today/TodayRail.tsx@@ -2,9 +2,8 @@ import { useActions, useValues } from 'kea'import { ComponentPropsWithoutRef, forwardRef } from 'react'import { IconSearch, IconSidebarClose, IconSidebarOpen } from '@posthog/icons'-import { Button, Kbd, Separator, Tooltip, TooltipContent, TooltipTrigger } from '@posthog/quill'+import { Button, Kbd, Tooltip, TooltipContent, TooltipTrigger } from '@posthog/quill'-import { Logomark } from 'lib/brand'import { NewAccountMenu } from 'lib/components/Account/NewAccountMenu'import { pendingInvitesLogic } from 'lib/components/Account/pendingInvitesLogic'import { PendingInviteDot } from 'lib/components/Account/ProjectMenu'@@ -56,17 +55,10 @@ export function TodayRail(): JSX.Element {return (<navaria-label="Main"- className="flex shrink-0 flex-col items-center gap-3 border-r border-[var(--border)] pb-3"+ className="flex shrink-0 flex-col items-center gap-3 pt-2.5 pb-3"// eslint-disable-next-line react/forbid-dom-propsstyle={{ width: TODAY_RAIL_WIDTH }}>- {/* h-12 matches QuillSceneHeader, so the line under the logo meets the pane header's bottom border. */}- <div className="-mb-1 flex h-12 w-full shrink-0 flex-col items-center" aria-hidden>- <div className="flex flex-1 items-center">- <Logomark className="h-auto w-6" />- </div>- <Separator />- </div>{TODAY_RAIL_ITEMS.map(({ pane, label, icon }) => (<TodayRailTilekey={pane}diff --git a/frontend/src/layout/today/TodayShell.scss b/frontend/src/layout/today/TodayShell.scssindex 6fd55cf45033..bc9222d19838 100644--- a/frontend/src/layout/today/TodayShell.scss+++ b/frontend/src/layout/today/TodayShell.scss@@ -1,4 +1,9 @@.TodayAppLayout {+ --today-frame-inset: 4px;++ // Resolved here, outside any quill scope, so the sidebar and content corners share one value.+ --today-frame-radius: var(--radius);+background: var(--today-paper);}@@ -17,6 +22,41 @@height: 100%;}+// The panes sit in one framed inset beside the rail. A docked sidebar starts the inset, so it owns the top-left+// corner and the seam against the content. The content frame in Navigation.tsx draws the rest.+.TodayShell__sidebar--framed {+ height: auto;+ margin-top: var(--today-frame-inset);+ border: 1px solid var(--border);+ border-bottom: 0;+ border-top-left-radius: var(--today-frame-radius);+}++.TodayAppLayout__backdrop {+ grid-area: content;+}++.TodayAppLayout .TodayAppLayout__content {+ margin-top: var(--today-frame-inset);++ &.TodayAppLayout__content--corner {+ border-top-left-radius: var(--today-frame-radius);+ }+}++.TodayAppLayout__frame {+ position: absolute;+ inset: 0;+ z-index: var(--z-layout-navbar-under);+ pointer-events: none;+ border-top: 1px solid var(--border);+ border-radius: inherit;++ .TodayAppLayout__content--corner > & {+ border-left: 1px solid var(--border);+ }+}+.TodayShell__scrim {position: fixed;inset: 0 0 0 var(--today-rail-width);@@ -187,7 +227,7 @@ body.has-today-phone-layout .Toastify__toast-container--bottom-right {flex: 1 1 auto;flex-direction: column;min-height: 0;- padding: 8px 8px 0;+ padding: 0 8px;}.TodayPane__filters {diff --git a/frontend/src/layout/today/TodayShell.tsx b/frontend/src/layout/today/TodayShell.tsxindex 89fa92454c47..d6635bb98001 100644--- a/frontend/src/layout/today/TodayShell.tsx+++ b/frontend/src/layout/today/TodayShell.tsx@@ -112,6 +112,7 @@ export function TodayShell({ className }: { className?: string }): JSX.Element {const pane = (<div className="TodayShell__pane"><QuillSceneHeader+ className="border-b-0"title={<h2 className="m-0 min-w-0 truncate text-base font-bold text-foreground">{PANE_LABELS[activePane]}@@ -193,7 +194,7 @@ export function TodayShell({ className }: { className?: string }): JSX.Element {sidebarVisible && (<asideref={sidebarRef}- className="TodayShell__sidebar relative border-r border-[var(--border)]"+ className="TodayShell__sidebar TodayShell__sidebar--framed relative"aria-label={PANE_LABELS[activePane]}// eslint-disable-next-line react/forbid-dom-propsstyle={{ width: sidebarWidth }}diff --git a/frontend/src/layout/today/TodaySidebarFooter.tsx b/frontend/src/layout/today/TodaySidebarFooter.tsxindex dbd78bc2d368..3efc231da1d0 100644--- a/frontend/src/layout/today/TodaySidebarFooter.tsx+++ b/frontend/src/layout/today/TodaySidebarFooter.tsx@@ -42,7 +42,7 @@ export function TodaySidebarFooter(): JSX.Element {)return (- <div className="grid flex-none grid-cols-[minmax(0,1fr)_auto] items-center gap-1 border-t border-[var(--border)] px-2 pt-2 pb-4">+ <div className="grid flex-none grid-cols-[minmax(0,1fr)_auto] items-center gap-1 border-t border-[var(--border)] px-2 pt-2 pb-2">{sidebarVisible ? (<NewAccountMenu side="top" align="start" sideOffset={12} renderTrigger={renderTrigger} />) : (