: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
import type { Navigation3000Mode } from './navigationLogic'
/** The page layout. Splits `Navigation3000Mode`'s `full` into classic and the two Today forms. */
export type LayoutMode = 'bare' | 'minimal' | 'embedded' | 'classic' | 'today-framed' | 'today-phone'
export function resolveLayoutMode({
mode,
todayRail,
phoneLayout,
}: {
mode: Navigation3000Mode
todayRail: boolean
phoneLayout: boolean
}): LayoutMode {
switch (mode) {
case 'none':
return 'bare'
case 'minimal':
return 'minimal'
case 'embedded':
return 'embedded'
case 'full':
if (!todayRail) {
return 'classic'
}
return phoneLayout ? 'today-phone' : 'today-framed'
}
}