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(dashboards): capture standard tile density (#86796)

Matt Puacb495dce010e
diff --git a/frontend/src/scenes/dashboard/dashboardLogic.test.ts b/frontend/src/scenes/dashboard/dashboardLogic.test.ts
index 2ee939cf55b1..eb592df4e6d8 100644
--- a/frontend/src/scenes/dashboard/dashboardLogic.test.ts
+++ b/frontend/src/scenes/dashboard/dashboardLogic.test.ts
@@ -382,7 +382,7 @@ describe('dashboardLogic', () => {
}
})
- it('does not report the default tile density', async () => {
+ it('reports the tile density when reset to standard', async () => {
await expectLogic(logic).toFinishAllListeners()
const reportTileDensityConfigured = jest.spyOn(
eventUsageLogic.actions,
@@ -396,7 +396,7 @@ describe('dashboardLogic', () => {
await jest.advanceTimersByTimeAsync(750)
await expectLogic(logic).toFinishAllListeners()
- expect(reportTileDensityConfigured).not.toHaveBeenCalled()
+ expect(reportTileDensityConfigured).toHaveBeenCalledWith('standard')
} finally {
jest.useRealTimers()
}
diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsx
index ddd504b663c7..93b04a1230e0 100644
--- a/frontend/src/scenes/dashboard/dashboardLogic.tsx
+++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx
@@ -3749,9 +3749,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
}
)
dashboardsModel.actions.updateDashboardSuccess(getQueryBasedDashboard(dashboard))
- if (tileSpacing !== 'standard') {
- eventUsageLogic.actions.reportDashboardTileDensityConfigured(tileSpacing)
- }
+ eventUsageLogic.actions.reportDashboardTileDensityConfigured(tileSpacing)
} catch {
if (!cache.pendingDashboardTileSpacing) {
actions.setDashboardTileSpacing(persistedTileSpacing)