Skip to content

: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.

fix(today): make the phone tab bar a flat quill bar with search as a tab (#111648)

Shy Alter5f10b559b006
diff --git a/frontend/src/layout/today/TodayShell.scss b/frontend/src/layout/today/TodayShell.scss
index 4aff3123d04d..73dc81350039 100644
--- a/frontend/src/layout/today/TodayShell.scss
+++ b/frontend/src/layout/today/TodayShell.scss
@@ -174,6 +174,7 @@ body.has-today-phone-layout .Toastify__toast-container--bottom-right {
padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
user-select: none;
background: var(--today-paper);
+ border-top: 1px solid var(--border);
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
}
diff --git a/frontend/src/layout/today/TodayTabBar.tsx b/frontend/src/layout/today/TodayTabBar.tsx
index 5e3ad300522d..d3f7d0b80f89 100644
--- a/frontend/src/layout/today/TodayTabBar.tsx
+++ b/frontend/src/layout/today/TodayTabBar.tsx
@@ -1,13 +1,16 @@
import { useActions, useValues } from 'kea'
import { IconSearch } from '@posthog/icons'
-import { Button, cn } from '@posthog/quill'
+import { cn } from '@posthog/quill'
import { commandLogic } from 'lib/components/Command/commandLogic'
import { TODAY_TAB_BAR_ITEMS } from './todayRailItems'
import { TODAY_MORE_PANES, todayShellLogic } from './todayShellLogic'
+const TAB_CLASS =
+ 'flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-0.5 rounded-md text-xxs font-medium outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-inset [&_svg]:size-5'
+
export function TodayTabBar(): JSX.Element {
const { activePane } = useValues(todayShellLogic)
const { pickPane } = useActions(todayShellLogic)
@@ -15,10 +18,7 @@ export function TodayTabBar(): JSX.Element {
return (
<div className="TodayTabBar" data-quill>
- <nav
- aria-label="Main"
- className="flex h-15 min-w-0 flex-1 rounded-full border border-[var(--border)] bg-[var(--card)] p-1 shadow-md"
- >
+ <nav aria-label="Main" className="flex h-14 min-w-0 flex-1 gap-1">
{TODAY_TAB_BAR_ITEMS.map(({ pane, label, icon }) => {
const active = activePane === pane || (pane === 'more' && TODAY_MORE_PANES.includes(activePane))
return (
@@ -29,9 +29,8 @@ export function TodayTabBar(): JSX.Element {
data-attr={`today-rail-${pane}`}
onClick={() => pickPane(pane)}
className={cn(
- 'flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-0.5 rounded-full text-[11px] leading-3 font-medium outline-none',
- 'focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-inset [&_svg]:size-5.5',
- active ? 'bg-[var(--fill-selected)] text-foreground' : 'text-muted-foreground'
+ TAB_CLASS,
+ active ? 'bg-fill-selected text-foreground' : 'text-muted-foreground'
)}
>
{icon}
@@ -39,17 +38,16 @@ export function TodayTabBar(): JSX.Element {
</button>
)
})}
+ <button
+ type="button"
+ data-attr="today-rail-search"
+ onClick={() => toggleCommand('nav-search-button')}
+ className={cn(TAB_CLASS, 'text-muted-foreground')}
+ >
+ <IconSearch />
+ <span className="max-w-full truncate">Search</span>
+ </button>
</nav>
- <Button
- variant="outline"
- size="icon-lg"
- aria-label="Search"
- data-attr="today-rail-search"
- onClick={() => toggleCommand('nav-search-button')}
- className="size-15 shrink-0 rounded-full bg-[var(--card)] shadow-md [&_svg]:size-5.5"
- >
- <IconSearch />
- </Button>
</div>
)
}