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(web-analytics): make the dashboard hold up at phone widths (#108605)

Jordan Mryyan2c7e218d8db7
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index fb6df0cef359..105203d56c49 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -5424,10 +5424,6 @@ snapshots:
hash: v1.k794b7964.62481a20890d8d9702570d58b69f47580c91399daa635cab23d9e8da75d2636f.4zz_BsbTTGbjpB2UW_cLkBiMwGDI54MGoQlD9_b9hV8
lemon-ui-object-tags--default--light:
hash: v1.k794b7964.1a69b09d2bc7612599daf0a1228b103250debc4afa2224fb8005e3c9b7f63326.bYCI4pCGFv3tFdGcQfIkfzDcOnpuLhD10S33l9BYIYg
- lemon-ui-object-tags--editable-tags-in-narrow-container--dark:
- hash: v1.k794b7964.6538590671c5bcd8feb77e0400c8532705932f4f55856dd6a99a6abcdc00b6e3.ca3qOKbmxmRDrNfdNRCEg9I9Wvnkrs7PHzA0tvpXTIM
- lemon-ui-object-tags--editable-tags-in-narrow-container--light:
- hash: v1.k794b7964.8b8f244a4387d0d1165067851b5758f5ad5429fae2b4a4e87eb7c53cdfdd4e18.MekQJYDe11n-5XnhJV5phxqMh5OqTw36CTFCk_BZNnw
lemon-ui-object-tags--static-only--dark:
hash: v1.k794b7964.62481a20890d8d9702570d58b69f47580c91399daa635cab23d9e8da75d2636f.oAaWHdceTRTQOchqDXvZ7-ym0DB_CpRpPyXnqlKugwo
lemon-ui-object-tags--static-only--light:
@@ -12294,6 +12290,10 @@ snapshots:
hash: v1.k794b7964.7631c17826109d6ea1be6fe1d8ad4b0d3d61c8977cbdf28ffa5602ffc0edaf04.M-zasXuYAmbo-PJzRo2iv6VXeSrsaUW85wwFfU2k0Oo
scenes-app-web-analytics--web-analytics-dashboard-loading--light:
hash: v1.k794b7964.348c15c7348431008d2a1613528ca4568e43e58789788d04e9791e52e414240e.IqKTupL4PWq-BKsMSvreA_xZOFxYgpUu7NR88XeQYoQ
+ scenes-app-web-analytics--web-analytics-dashboard-narrow--dark:
+ hash: v1.k794b7964.250de949b30a7ac7a212be36168381e2cd4f45ed8d5451d636165cf505b101de.a1Z6u5uAtt7PKQgmzXDw3bjOHM06I0rZwBvMDFF2Uqc
+ scenes-app-web-analytics--web-analytics-dashboard-narrow--light:
+ hash: v1.k794b7964.9d31020061155395b85003dae42b77a09a84839c2b65e7a1bb6f7e764067e190.zLKSfk0tFj7IATJU0hiNbNGx2_DE5uVPPZZLQLQXqrM
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-medium--dark:
hash: v1.k794b7964.865308ee7b3cc95ae6a9d3f78ff061e02cf29610e6af98af8d9793fc027f083c.zzjFc2X6UxtQq1vmXHEkobuQiEGSMX5_Q5kpKagU7Zk
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-medium--light:
@@ -12302,6 +12302,10 @@ snapshots:
hash: v1.k794b7964.ef09b67b9d8cf134fa292b1d49156804eb007f718fe890bd169d0fe1d014b2f9.VJGrECMOd1vMwf1ENv4mz3knvaC1j0r9JBSlZww0R5s
scenes-app-web-analytics--web-analytics-dashboard-tile-header-v-2-wide--light:
hash: v1.k794b7964.6df48926e7ac9f971d7365bd1862ebf290fa7ed64076a69020e613b23a3a537a.UV8gAJzodjW2qNErfweaYYvFspAKRqSdcoizfF1Jxv0
+ scenes-app-web-analytics--web-analytics-empty-onboarding-narrow--dark:
+ hash: v1.k794b7964.605caa854b816f8f47b5ef23cebca23dd5f2b516af151a7df08c9337663b3964.nHXW-vmDopWvz5x29U-iyNWGv9qxfOx64AqB8sykTpo
+ scenes-app-web-analytics--web-analytics-empty-onboarding-narrow--light:
+ hash: v1.k794b7964.e02bb57e794fd9bdff9c2b133dcd76335607ddf44cd3f30dbffb8d8b24075ecc.f9auA0Uulz7G7aJKuTZ41Jg4ZpdijFnN0zA2boAnEn8
scenes-app-web-analytics-achievements--daily-only-arm--dark:
hash: v1.k794b7964.8f024a521e113d8101749768f8d4f49d8dcac1365f43d9b2038c6df0021bac6a.BYx467NAatau4dzb13PnZCTODi-yUho-Vhm_JdtCY9w
scenes-app-web-analytics-achievements--daily-only-arm--light:
diff --git a/frontend/src/layout/scenes/components/SceneMenuBar.tsx b/frontend/src/layout/scenes/components/SceneMenuBar.tsx
index b92fb0d857e1..196d25b07148 100644
--- a/frontend/src/layout/scenes/components/SceneMenuBar.tsx
+++ b/frontend/src/layout/scenes/components/SceneMenuBar.tsx
@@ -100,6 +100,8 @@ export function SceneMenuBar({ children, className }: SceneMenuBarProps): JSX.El
data-scene-layout={layout}
className={cn(
'scene-menu-bar px-0.5 py-0.5 border-b border-primary flex items-center justify-between',
+ // Below `lg` the navigation toggle floats over the top-left corner of the scene.
+ 'max-lg:pl-10',
// Bleed past the scene container's padding so the bar feels full-width — only
// safe when the layout actually has padding to cancel. Unpadded layouts
// (app-raw, plain, etc.) would overflow.
@@ -127,6 +129,8 @@ export function SceneMenuBar({ children, className }: SceneMenuBarProps): JSX.El
}
const RIGHT_TRIGGER_CLASSES = 'px-2 h-7 rounded-sm text-xs font-medium inline-flex items-center gap-1 text-foreground'
+// The right links drop to icons in a narrow scene so the bar never pushes the scene sideways.
+const RIGHT_TRIGGER_LABEL_CLASSES = 'hidden @min-[36rem]/main-content:inline'
function SceneMenuBarRightLinks(): JSX.Element {
const { openSidePanel } = useActions(sidePanelStateLogic)
@@ -138,21 +142,23 @@ function SceneMenuBarRightLinks(): JSX.Element {
{settingsUrl && (
<Button
data-attr="scene-menu-bar-settings"
+ aria-label="Settings"
className={RIGHT_TRIGGER_CLASSES}
onClick={() => captureSceneMenuBar('scene menu bar right link clicked', { link: 'settings' })}
render={<LinkPrimitive to={settingsUrl} />}
>
- Settings
+ <span className={RIGHT_TRIGGER_LABEL_CLASSES}>Settings</span>
<IconGear />
</Button>
)}
<Button
data-attr="scene-menu-bar-docs"
+ aria-label="Docs"
className={RIGHT_TRIGGER_CLASSES}
onClick={() => captureSceneMenuBar('scene menu bar right link clicked', { link: 'docs' })}
render={<LinkPrimitive to="https://posthog.com/docs" target="_blank" />}
>
- Docs
+ <span className={RIGHT_TRIGGER_LABEL_CLASSES}>Docs</span>
<IconExternal />
</Button>
<Button
@@ -162,9 +168,10 @@ function SceneMenuBarRightLinks(): JSX.Element {
openSidePanel(SidePanelTab.Support)
}}
data-attr="scene-menu-bar-support"
+ aria-label="Support"
className={RIGHT_TRIGGER_CLASSES}
>
- Support
+ <span className={RIGHT_TRIGGER_LABEL_CLASSES}>Support</span>
<IconSidePanel />
</Button>
<Button
@@ -174,11 +181,12 @@ function SceneMenuBarRightLinks(): JSX.Element {
openSidePanel(SidePanelTab.Max)
}}
data-attr="scene-menu-bar-ai"
+ aria-label="PostHog AI"
className={RIGHT_TRIGGER_CLASSES}
variant="outline"
>
<IconSparkles className="text-ai group-hover/button-primitive:animate-hue-rotate" />
- PostHog AI
+ <span className={RIGHT_TRIGGER_LABEL_CLASSES}>PostHog AI</span>
</Button>
</div>
)
diff --git a/frontend/src/lib/components/FilterBar.tsx b/frontend/src/lib/components/FilterBar.tsx
index a94f5918248d..082e500bb9c0 100644
--- a/frontend/src/lib/components/FilterBar.tsx
+++ b/frontend/src/lib/components/FilterBar.tsx
@@ -23,7 +23,7 @@ export const FilterBar = ({ top, left, right, className, showBorderBottom }: Fil
<div className="flex flex-col md:flex-row md:justify-between gap-2">
<div className={clsx('flex items-start shrink-0', !right && 'flex-1')}>
- <div className="flex flex-1 flex-row gap-2 items-center">
+ <div className="flex flex-1 flex-row gap-2 items-start">
<div
className={clsx(
'flex flex-row flex-wrap gap-1 items-center flex-1',
@@ -33,27 +33,34 @@ export const FilterBar = ({ top, left, right, className, showBorderBottom }: Fil
{left}
</div>
- <LemonButton
- type="secondary"
- size="small"
- className="sm:hidden"
- onClick={() => setExpanded((expanded) => !expanded)}
- icon={<IconFilter />}
- />
+ {right && (
+ <LemonButton
+ type="secondary"
+ size="small"
+ className="sm:hidden"
+ active={expanded}
+ onClick={() => setExpanded((expanded) => !expanded)}
+ icon={<IconFilter />}
+ aria-label={expanded ? 'Hide filters' : 'Show filters'}
+ aria-expanded={expanded}
+ />
+ )}
</div>
</div>
{/* Render right content once - on mobile it's collapsible, on sm+ always visible */}
- <div
- className={clsx(
- 'flex gap-2',
- 'sm:max-h-none',
- 'max-sm:flex-col max-sm:overflow-hidden max-sm:transition-all max-sm:duration-200',
- expanded ? 'max-sm:max-h-[500px]' : 'max-sm:max-h-0'
- )}
- >
- <FoldableFilters>{right}</FoldableFilters>
- </div>
+ {right && (
+ <div
+ className={clsx(
+ 'flex gap-2',
+ 'sm:max-h-none',
+ 'max-sm:flex-col max-sm:overflow-hidden max-sm:transition-all max-sm:duration-200',
+ expanded ? 'max-sm:max-h-[500px]' : 'max-sm:max-h-0 max-sm:-mt-2'
+ )}
+ >
+ <FoldableFilters>{right}</FoldableFilters>
+ </div>
+ )}
</div>
</SceneStickyBar>
)
@@ -61,7 +68,7 @@ export const FilterBar = ({ top, left, right, className, showBorderBottom }: Fil
const FoldableFilters = ({ children }: React.PropsWithChildren<{}>): JSX.Element => {
return (
- <div className="flex flex-row md:flex-row-reverse flex-wrap gap-2 md:[&>*]:grow-0 [&>*]:grow w-full items-start">
+ <div className="flex flex-row md:flex-row-reverse flex-wrap gap-2 md:[&>*]:grow-0 [&>*]:grow [&>.LemonButton--no-content]:grow-0 w-full items-start">
{children}
</div>
)
diff --git a/frontend/src/queries/nodes/WebVitals/WebVitals.tsx b/frontend/src/queries/nodes/WebVitals/WebVitals.tsx
index f5ad66faacb8..327a144a6023 100644
--- a/frontend/src/queries/nodes/WebVitals/WebVitals.tsx
+++ b/frontend/src/queries/nodes/WebVitals/WebVitals.tsx
@@ -77,7 +77,7 @@ export function WebVitals(props: {
return (
<div className="flex flex-col flex-1 gap-4">
<div className="flex flex-col gap-1">
- <div className="grid gap-2 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
+ <div className="grid gap-2 grid-cols-2 xl:grid-cols-4">
<WebVitalsTab
metric="INP"
value={INP}
diff --git a/frontend/src/scenes/web-analytics/PageReports.tsx b/frontend/src/scenes/web-analytics/PageReports.tsx
index b18a33ec2189..289d01b98f03 100644
--- a/frontend/src/scenes/web-analytics/PageReports.tsx
+++ b/frontend/src/scenes/web-analytics/PageReports.tsx
@@ -18,11 +18,11 @@ const HedgehogXRay = pngHoggie(xRayPng)
function NoUrlSelectedMessage(): JSX.Element {
return (
- <div className="border-2 border-dashed border-primary w-full p-8 rounded flex items-center justify-center gap-8">
+ <div className="border-2 border-dashed border-primary w-full p-4 @min-[48rem]/main-content:p-8 rounded flex flex-col @min-[48rem]/main-content:flex-row items-center justify-center gap-6 @min-[48rem]/main-content:gap-8">
<div className="flex-shrink-0">
- <HedgehogXRay title="X-ray hedgehog" className="w-60" />
+ <HedgehogXRay title="X-ray hedgehog" className="w-40 @min-[48rem]/main-content:w-60" />
</div>
- <div className="flex-1 max-w-140">
+ <div className="flex-1 max-w-140 text-center @min-[48rem]/main-content:text-left">
<h2>Select a page to analyze</h2>
<p className="ml-0">
See detailed performance metrics for any page on your site. Just use the search bar above to find
@@ -62,7 +62,7 @@ export function PageReportsFilters({ tabs }: { tabs: JSX.Element }): JSX.Element
/>
<WebAnalyticsCompareFilter />
<LemonInputSelect
- className="flex-1 min-w-0"
+ className="flex-1 min-w-0 basis-64"
allowCustomValues={true}
fullWidth={true}
placeholder="Click or type to see top pages, or paste a URL"
diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.stories.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.stories.tsx
index 9a8d6fd19aa7..15e1e7f28fcb 100644
--- a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.stories.tsx
+++ b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.stories.tsx
@@ -1,9 +1,12 @@
+import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'
+
import { Meta } from '@storybook/react'
-import { useActions } from 'kea'
+import { useActions, useMountedLogic } from 'kea'
import { useEffect } from 'react'
import { FEATURE_FLAGS } from 'lib/constants'
import { App } from 'scenes/App'
+import { teamLogic } from 'scenes/teamLogic'
import { urls } from 'scenes/urls'
import { mswDecorator } from '~/mocks/browser'
@@ -116,6 +119,52 @@ export function WebAnalyticsDashboardTileHeaderV2Wide(): JSX.Element {
return <WebAnalyticsDashboard />
}
+const NARROW_FEATURE_FLAGS = {
+ [FEATURE_FLAGS.WEB_ANALYTICS_FILTERS_V2]: true,
+ [FEATURE_FLAGS.WEB_ANALYTICS_TILE_HEADER_V2]: 'test',
+ [FEATURE_FLAGS.SCENE_MENU_BAR]: true,
+}
+
+WebAnalyticsDashboardNarrow.parameters = {
+ featureFlags: NARROW_FEATURE_FLAGS,
+ testOptions: {
+ includeNavigationInSnapshot: true,
+ waitForLoadersToDisappear: true,
+ waitForSelector: '[data-attr=trend-line-graph] > canvas',
+ viewport: { width: 400, height: 2400 },
+ },
+}
+export function WebAnalyticsDashboardNarrow(): JSX.Element {
+ return <WebAnalyticsDashboard />
+}
+
+WebAnalyticsEmptyOnboardingNarrow.parameters = {
+ featureFlags: { ...NARROW_FEATURE_FLAGS, [FEATURE_FLAGS.WEB_ANALYTICS_EMPTY_ONBOARDING]: true },
+ testOptions: {
+ includeNavigationInSnapshot: true,
+ waitForSelector: '[data-attr=web-analytics-onboarding]',
+ viewport: { width: 400, height: 900 },
+ },
+}
+WebAnalyticsEmptyOnboardingNarrow.decorators = [
+ mswDecorator({
+ get: {
+ '/api/environments/:team_id/': { ...MOCK_DEFAULT_TEAM, ingested_event: false },
+ },
+ patch: {
+ '/api/environments/:team_id/': { ...MOCK_DEFAULT_TEAM, ingested_event: false },
+ },
+ }),
+]
+export function WebAnalyticsEmptyOnboardingNarrow(): JSX.Element {
+ useMountedLogic(teamLogic)
+ useEffect(() => {
+ teamLogic.actions.loadCurrentTeamSuccess({ ...MOCK_DEFAULT_TEAM, ingested_event: false })
+ }, [])
+
+ return <App />
+}
+
WebAnalyticsDashboardLoading.parameters = {
layout: 'fullscreen',
viewMode: 'story',
diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx
index f393db8436f7..c6fcf247c7a2 100644
--- a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx
+++ b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx
@@ -3,7 +3,7 @@ import { BindLogic, useActions, useMountedLogic, useValues } from 'kea'
import React, { useEffect, useState } from 'react'
import { IconExpand45, IconInfo, IconLineGraph, IconOpenSidebar, IconX } from '@posthog/icons'
-import { LemonSegmentedButton, LemonSegmentedDropdown, LemonSkeleton } from '@posthog/lemon-ui'
+import { LemonSegmentedButton, LemonSegmentedDropdown, LemonSelect, LemonSkeleton } from '@posthog/lemon-ui'
import { IntervalFilterStandalone } from 'lib/components/IntervalFilter/IntervalFilter'
import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction'
@@ -244,7 +244,8 @@ const QueryTileItemLegacy = ({
})
}}
>
- Open as new insight
+ <span className="@min-[26rem]/web-tile:hidden">Open insight</span>
+ <span className="hidden @min-[26rem]/web-tile:inline">Open as new insight</span>
</LemonButton>
) : null,
tile.canOpenModal !== false ? (
@@ -255,13 +256,14 @@ const QueryTileItemLegacy = ({
size="small"
type="secondary"
>
- Show more
+ <span className="@min-[26rem]/web-tile:hidden">Expand</span>
+ <span className="hidden @min-[26rem]/web-tile:inline">Show more</span>
</LemonButton>
) : null,
].filter(isNotNil)
return (
- <div className={containerClassName}>
+ <div className={clsx(containerClassName, '@container/web-tile')}>
{title && (
<div className="flex flex-row items-center mb-2">
<h2>{title}</h2>
@@ -279,9 +281,7 @@ const QueryTileItemLegacy = ({
tileId={tile.tileId}
/>
- {buttonsRow.length > 0 ? (
- <div className="flex justify-end my-2 deprecated-space-x-2">{buttonsRow}</div>
- ) : null}
+ {buttonsRow.length > 0 ? <div className="flex flex-wrap justify-end gap-2 my-2">{buttonsRow}</div> : null}
</div>
)
}
@@ -479,6 +479,7 @@ export const WebTabs = ({
const isVisualizationToggleEnabled = [TileId.SOURCES, TileId.DEVICES, TileId.PATHS].includes(tileId)
const activeTabData = tabs.find((t) => t.id === activeTabId)
+ const tabOptions = tabs.map(({ id, linkText }) => ({ value: id, label: linkText }))
const buttonsRow = [
activeTab && activeTabData ? (
@@ -503,7 +504,8 @@ export const WebTabs = ({
})
}}
>
- Open as new insight
+ <span className="@min-[26rem]/web-tile:hidden">Open insight</span>
+ <span className="hidden @min-[26rem]/web-tile:inline">Open as new insight</span>
</LemonButton>
) : null,
activeTab?.canOpenModal !== false ? (
@@ -514,15 +516,16 @@ export const WebTabs = ({
size="small"
type="secondary"
>
- Show more
+ <span className="@min-[26rem]/web-tile:hidden">Expand</span>
+ <span className="hidden @min-[26rem]/web-tile:inline">Show more</span>
</LemonButton>
) : null,
].filter(isNotNil)
return (
- <div className={clsx(className, 'flex flex-col')}>
- <div className="flex flex-row items-center self-stretch mb-2">
- <h2 className="flex-1 m-0 flex flex-row ml-1">
+ <div className={clsx(className, '@container/web-tile flex flex-col')}>
+ <div className="flex flex-row flex-wrap items-center gap-2 self-stretch mb-2">
+ <h2 className="flex-1 m-0 flex flex-row ml-1 whitespace-nowrap">
{activeTab?.title}
{activeTab?.docs && (
<LearnMorePopover
@@ -548,22 +551,24 @@ export const WebTabs = ({
},
]}
size="small"
- className="mr-2"
/>
)}
- <LemonSegmentedDropdown
- splitIndices={splitIndices ?? tabSplitIndicesMap[tileId]}
- size="small"
- value={activeTabId}
- onChange={setActiveTabId}
- options={tabs.map(({ id, linkText }) => ({ value: id, label: linkText }))}
- />
+ <div className="hidden @min-[30rem]/web-tile:block">
+ <LemonSegmentedDropdown
+ splitIndices={splitIndices ?? tabSplitIndicesMap[tileId]}
+ size="small"
+ value={activeTabId}
+ onChange={setActiveTabId}
+ options={tabOptions}
+ />
+ </div>
+ <div className="@min-[30rem]/web-tile:hidden">
+ <LemonSelect size="small" value={activeTabId} onChange={setActiveTabId} options={tabOptions} />
+ </div>
</div>
<div className="flex-1 flex flex-col">{activeTab?.content}</div>
- {buttonsRow.length > 0 ? (
- <div className="flex justify-end my-2 deprecated-space-x-2">{buttonsRow}</div>
- ) : null}
+ {buttonsRow.length > 0 ? <div className="flex flex-wrap justify-end gap-2 my-2">{buttonsRow}</div> : null}
</div>
)
}
@@ -988,8 +993,12 @@ const getEmptyOnboardingContent = (
isEmpty={true}
titleOverride="Nothing to investigate yet!"
description="Install PostHog on your site or app to start capturing events. Head to the installation guide to get set up in just a few minutes."
+ hogLayout="responsive"
+ useMainContentContainerQueries
+ className="p-4 @min-[48rem]/main-content:p-8"
+ hogClassName="w-40 sm:w-40 lg:w-56"
actionElementOverride={
- <div className="flex items-center gap-2">
+ <div className="flex flex-col @min-[30rem]/main-content:flex-row items-center gap-x-2 gap-y-3">
<LemonButton
type="primary"
to={urls.onboarding({
@@ -1000,10 +1009,12 @@ const getEmptyOnboardingContent = (
>
Open installation guide
</LemonButton>
- <span className="text-muted-alt">or</span>
- <Link target="_blank" to="/web/web-vitals">
- Set up web vitals while you wait
- </Link>
+ <span className="text-muted-alt text-center">
+ or{' '}
+ <Link target="_blank" to="/web/web-vitals">
+ Set up web vitals while you wait
+ </Link>
+ </span>
</div>
}
/>
diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsHeaderButtons.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsHeaderButtons.tsx
index f7cf59c95393..d6a0e8f16834 100644
--- a/frontend/src/scenes/web-analytics/WebAnalyticsHeaderButtons.tsx
+++ b/frontend/src/scenes/web-analytics/WebAnalyticsHeaderButtons.tsx
@@ -46,7 +46,7 @@ export function WebAnalyticsHeaderButtons(): JSX.Element {
}
return (
- <div className="flex items-center gap-2">
+ <div className="flex flex-wrap items-center justify-end gap-2">
{showLiveUserCount && (
<LiveUserCount
docLink="https://posthog.com/docs/web-analytics/faq#i-am-online-but-the-online-user-count-is-not-reflecting-my-user"
@@ -72,8 +72,10 @@ export function WebAnalyticsHeaderButtons(): JSX.Element {
tooltipPlacement="top"
onClick={() => setShouldFilterTestAccounts(!shouldFilterTestAccounts)}
data-attr="web-analytics-filter-test-accounts"
+ aria-label="Filter test accounts"
>
- Filter test accounts <LemonSwitch checked={shouldFilterTestAccounts} className="ml-1" />
+ <span className="hidden @min-[30rem]/main-content:inline">Filter test accounts</span>
+ <LemonSwitch checked={shouldFilterTestAccounts} className="ml-1" />
</LemonButton>
{hasFeatureFlag && (
<Popover
@@ -125,7 +127,7 @@ export function WebAnalyticsHeaderButtons(): JSX.Element {
onMouseLeave={() => setShowPopover(false)}
>
<IconBolt className={isUsingNewEngine ? 'text-warning' : 'text-muted'} />
- <span className="text-sm font-medium">
+ <span className="hidden @min-[30rem]/main-content:inline text-sm font-medium whitespace-nowrap">
{isUsingNewEngine ? 'New Query Engine' : 'Regular Query Engine'}
</span>
<LemonSwitch checked={!!isUsingNewEngine} onChange={handleToggleEngine} size="small" />