: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
fix(web-analytics): even out tile spacing and unbox web vitals (#102350)
Mike Warrenf443cf902f50
diff --git a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsxindex 088c6bce9e52..f393db8436f7 100644--- a/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx+++ b/frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx@@ -88,7 +88,7 @@ export const Tiles = (props: { tiles?: WebAnalyticsTile[]; compact?: boolean }):return (<divclassName={clsx(- 'mt-4 grid grid-cols-1',+ 'mt-4 pb-4 grid grid-cols-1','md:grid-cols-2 2xl:grid-cols-3',useTileHeaderV2 && '2xl:grid-flow-dense',compact ? 'gap-x-2 gap-y-2' : 'gap-x-4 gap-y-4'@@ -167,6 +167,8 @@ interface QueryTileItemVariantProps {docs?: QueryTile['docs']}+const HEADERLESS_TILES = new Set<TileId>([TileId.OVERVIEW, TileId.WEB_VITALS])+const QueryTileItemV2 = ({tile,containerClassName,@@ -197,7 +199,7 @@ const QueryTileItemV2 = ({showIntervalSelect={showIntervalSelect}tileId={tile.tileId}headerSlot={- tile.tileId === TileId.OVERVIEW ? undefined : (+ HEADERLESS_TILES.has(tile.tileId) ? undefined : (<WebTileHeadertileId={tile.tileId}title={title}@@ -569,8 +571,8 @@ export const WebTabs = ({export const SectionTileItem = ({ tile, separator }: { tile: SectionTile; separator?: boolean }): JSX.Element => {return (<div className="col-span-full">- {tile.title && <h2 className="text-lg font-semibold mb-4">{tile.title}</h2>}- <div className={tile.layout.className ? `grid ${tile.layout.className} mb-4` : 'mb-4'}>+ {tile.title && <h2 className="text-lg font-semibold mb-2">{tile.title}</h2>}+ <div className={clsx('grid gap-2', tile.layout.className)}>{tile.tiles.map((subTile, i) => {if (subTile.kind === 'query') {return (diff --git a/frontend/src/scenes/web-analytics/pageReportsLogic.ts b/frontend/src/scenes/web-analytics/pageReportsLogic.tsindex e90b645bd4ba..3d8e18b14c1b 100644--- a/frontend/src/scenes/web-analytics/pageReportsLogic.ts+++ b/frontend/src/scenes/web-analytics/pageReportsLogic.ts@@ -1086,7 +1086,7 @@ export const pageReportsLogic = kea<pageReportsLogicType>({kind: 'section',tileId: TileId.PAGE_REPORTS_PATHS_SECTION,layout: {- className: 'grid grid-cols-1 md:grid-cols-3 gap-4 mb-8',+ className: 'grid-cols-1 md:grid-cols-3',},tiles: [createQueryTile(@@ -1119,7 +1119,7 @@ export const pageReportsLogic = kea<pageReportsLogicType>({kind: 'section',tileId: TileId.PAGE_REPORTS_TRAFFIC_SECTION,layout: {- className: 'grid grid-cols-1 md:grid-cols-3 gap-4 mb-8',+ className: 'grid-cols-1 md:grid-cols-3',},tiles: [createQueryTile(@@ -1176,7 +1176,7 @@ export const pageReportsLogic = kea<pageReportsLogicType>({kind: 'section',tileId: TileId.PAGE_REPORTS_DEVICE_INFORMATION_SECTION,layout: {- className: 'grid grid-cols-1 md:grid-cols-3 gap-4 mb-8',+ className: 'grid-cols-1 md:grid-cols-3',},tiles: [createQueryTile(@@ -1203,7 +1203,7 @@ export const pageReportsLogic = kea<pageReportsLogicType>({kind: 'section',tileId: TileId.PAGE_REPORTS_GEOGRAPHY_SECTION,layout: {- className: 'grid grid-cols-1 md:grid-cols-3 gap-4 mb-8',+ className: 'grid-cols-1 md:grid-cols-3',},tiles: [createQueryTile(@@ -1243,7 +1243,7 @@ export const pageReportsLogic = kea<pageReportsLogicType>({tileId: TileId.PAGE_REPORTS_TOP_EVENTS_SECTION,title: '',layout: {- className: 'grid-cols-1 gap-2',+ className: 'grid-cols-1',},tiles: [createQueryTile(