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(dashboard): give edit mode room to drag tiles to the bottom (#65506)

Matt Puadc9a558e8328
diff --git a/frontend/src/scenes/dashboard/DashboardItems.scss b/frontend/src/scenes/dashboard/DashboardItems.scss
index 6994ab55e95b..b8b0d5c44d18 100644
--- a/frontend/src/scenes/dashboard/DashboardItems.scss
+++ b/frontend/src/scenes/dashboard/DashboardItems.scss
@@ -13,7 +13,6 @@
.react-grid-layout {
position: relative;
- margin-bottom: 2rem;
transition: height 100ms ease;
/* remove initial loading animation, animations are only needed in edit mode */
diff --git a/frontend/src/scenes/dashboard/DashboardItems.tsx b/frontend/src/scenes/dashboard/DashboardItems.tsx
index 354dd5a19799..cc34b56d5873 100644
--- a/frontend/src/scenes/dashboard/DashboardItems.tsx
+++ b/frontend/src/scenes/dashboard/DashboardItems.tsx
@@ -130,8 +130,13 @@ export function DashboardItems(): JSX.Element {
}
}, [scrollToBottomSignal])
const className = clsx({
- 'dashboard-view-mode': !layoutEditMode,
- 'dashboard-edit-mode': layoutEditMode,
+ 'dashboard-view-mode mb-8': !layoutEditMode,
+ // In edit mode, dragging is bounded to the grid's own clientHeight, which is exactly the
+ // content height — so there's nowhere to drag a tile into to create a new bottom row.
+ // box-content + padding-bottom grows clientHeight (padding only counts under content-box,
+ // since preflight defaults everything to border-box), opening up draggable space below the
+ // last tile that scales with content. A margin wouldn't work — it sits outside clientHeight.
+ 'dashboard-edit-mode box-content pb-[40vh]': layoutEditMode,
})
const { width, containerRef, mounted } = useContainerWidth()
diff --git a/frontend/src/scenes/dashboard/__snapshots__/DashboardItems.test.tsx.snap b/frontend/src/scenes/dashboard/__snapshots__/DashboardItems.test.tsx.snap
index fccadeae9704..334a99f63a71 100644
--- a/frontend/src/scenes/dashboard/__snapshots__/DashboardItems.test.tsx.snap
+++ b/frontend/src/scenes/dashboard/__snapshots__/DashboardItems.test.tsx.snap
@@ -14,7 +14,7 @@ exports[`DashboardItems matches snapshot in edit mode with layout zoom enabled 1
/>
<div
data-attr="react-grid-layout"
- data-class-name="dashboard-edit-mode"
+ data-class-name="dashboard-edit-mode box-content pb-[40vh]"
data-drag-enabled="true"
data-margin="14.4,14.4"
data-resize-enabled="false"