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.

feat(dashboards): add feedback button to add-widget modal (#62711)

Matt Pua30f06669ae08
diff --git a/products/dashboards/frontend/widgets/AddWidgetModal.tsx b/products/dashboards/frontend/widgets/AddWidgetModal.tsx
index 81583f9e4170..270d98883257 100644
--- a/products/dashboards/frontend/widgets/AddWidgetModal.tsx
+++ b/products/dashboards/frontend/widgets/AddWidgetModal.tsx
@@ -1,4 +1,5 @@
import { useActions, useValues } from 'kea'
+import posthog from 'posthog-js'
import { Fragment } from 'react'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
@@ -74,6 +75,11 @@ export function AddWidgetModal({ isOpen, onClose, loading, onAdd }: AddWidgetMod
void submitAddWidgetPayloads(selectedTypes, onAdd, onClose)
}
+ function handleFeedbackClicked(): void {
+ posthog.capture('dashboard add widget modal - feedback clicked')
+ onClose()
+ }
+
return (
<LemonModal
isOpen={isOpen}
@@ -83,6 +89,14 @@ export function AddWidgetModal({ isOpen, onClose, loading, onAdd }: AddWidgetMod
width={960}
footer={
<>
+ <LemonButton
+ type="tertiary"
+ size="small"
+ onClick={handleFeedbackClicked}
+ data-attr="dashboard-add-widget-feedback"
+ >
+ Missing a widget? Let us know
+ </LemonButton>
<div className="flex-1" />
<LemonButton type="secondary" onClick={onClose}>
Cancel