: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(insights): make dashboard tile freshness icon non-draggable affordance (#64242)
Vasco de Krijger233a84ec0929
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 0c858d594059..b642aab28ca3 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -4733,13 +4733,13 @@ snapshots:scenes-app-customer-analytics-journeys-nodes-profileflownode--optional-not-completed--light:hash: v1.k794b7964.165b884e9e737c00707811f9efa7d348927a432402c544b41495eac9722a1fca.wqLWQTzb1O7RBTeeyTR5l_hUeX0IpJXkgexpAQbuNWsscenes-app-dashboards--access-control-dashboard--dark:- hash: v1.k794b7964.f0246c64fd40a892d19450a37fdb3f12ff7c1167c553a809dba65200a9635347.p3Q0m7OSmNDRDjl_xRq5FEBLPRP_NbviSTmngKbb568+ hash: v1.k794b7964.5a2070ced40d9a7283b60d208aef3315f684f2586db52f79337f82ca4f80ae49.eOeTlC4JZNhfDx_aXctKeV6HL1TQKugnpDyf1l-NFX0scenes-app-dashboards--access-control-dashboard--light:- hash: v1.k794b7964.99949a6672c0e8427045e95677c5c7872494c7e5341e979c9146af4c423959ea.iBVwcBrA4JVwNZYFOdTsN5w-id81xZJ25uKiHdo2Vpc+ hash: v1.k794b7964.8750e411634aabaec37428088a6c2ff338b30103628b3358ec1aa9303e7bc6a4.QHf7vvPUacMgAWbJiWSEEWZ5xEhNe-apEwxD59eg29oscenes-app-dashboards--edit--dark:- hash: v1.k794b7964.c50ed8b3d4e8f05379de3a7b9aa750f954cc76e90f125a5a1e3a7873808442bd.7ASSpy1GLBsieparaxbQnbnnxIjryLBUVwXArMcbaSo+ hash: v1.k794b7964.9f5c9d9b55e8ee6701b1492cc80840f5c385d6a2b566e857dafd4616d0e03520.qT8LsD9-4a-wmd4KCQmG0l5q6pLsOJwuXw98Rq18_N8scenes-app-dashboards--edit--light:- hash: v1.k794b7964.2f0ef7ae3cd8daa761598ade2c438c61f9dc4494992d85de0dbbbbe67b024960.l-9-bBOQOXiBOscFLMZf3cwMg5ZSXVV6_eXSsVzmyco+ hash: v1.k794b7964.3b2874181e936c6709d7c67db69bba087f600c2bd33835bce8e0e3a73964e948.pJ537ZFActzJzjSYe4aRQKCKH1DFgA32qSl7v9VUWIQscenes-app-dashboards--erroring--dark:hash: v1.k794b7964.a356bf2ce40e53018919ebc890579c0ad6e493385f546d26b1f70471bf99f726.UER3Vv5UUZ1POzJv4_TuxrLBcLfLa8WTZ_hyUX9t72sscenes-app-dashboards--erroring--light:@@ -4761,9 +4761,9 @@ snapshots:scenes-app-dashboards--not-found--light:hash: v1.k794b7964.1ce58559d0a7f0fdec75dc0cd2230c29bf6dcc25cb275a8eccd9a5c2a0a928b6.j9xKwNlmX3cJs2iIEJw1NuA6vMsMRIvFsNdfSYwmYN4scenes-app-dashboards--view-only-dashboard--dark:- hash: v1.k794b7964.3db6aee04e6438e793845be191d6350e24d7a35e85db216c75241f1b4f828b1d.94AM8pD_Y6CL-zQ8rZzgTJzPhTdSxbsqFpdb4dIIQAY+ hash: v1.k794b7964.21152e91717a6fc5140d8f3aa7a814ba91e1cc23fb0bbfdbeb84a23cb175a562.Nm0X90U2YpPaxYuelhuNFzaQ3mixWrNcL8mcKbwHPXkscenes-app-dashboards--view-only-dashboard--light:- hash: v1.k794b7964.7338ceaefeb3311cab11d9c1cc928625ba35fca2ff4758ab6239eae22533cc12.fItm-tytYs97B3SLGKLqjTRMC4Hg4WFRKfQCVgIFJaM+ hash: v1.k794b7964.1375536ea1ec87463a36ff8387073e3502d5127e68837fee3474b11d52684155.BobnrxAcdpL_nNICNKf2aqg_CXhq38fCWTgceozBTcYscenes-app-dashboards-add-insight-to-dashboard-modal--default--dark:hash: v1.k794b7964.9e274692c8e4c207d502de8e74ecb4ad848c351a69dc19185ddc3d52616e9c6f.JXi4RnJ4pej3Q4xhfMDQUlzqxMhz31nwrjmt1U-Fwboscenes-app-dashboards-add-insight-to-dashboard-modal--default--light:diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightFreshness.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightFreshness.tsxindex 3be7982b4487..3579e5d3fdc7 100644--- a/frontend/src/lib/components/Cards/InsightCard/InsightFreshness.tsx+++ b/frontend/src/lib/components/Cards/InsightCard/InsightFreshness.tsx@@ -2,6 +2,7 @@ import { IconClock, IconWarning } from '@posthog/icons'import { TZLabel } from 'lib/components/TZLabel'import { dayjs } from 'lib/dayjs'+import { LemonButton } from 'lib/lemon-ui/LemonButton'import { Tooltip } from 'lib/lemon-ui/Tooltip'export function InsightFreshness({ lastRefresh }: { lastRefresh: string }): JSX.Element | null {@@ -14,14 +15,14 @@ export function InsightFreshness({ lastRefresh }: { lastRefresh: string }): JSX.const diffHours = now.diff(lastRefreshed, 'hour')let icon: JSX.Element- let color: string+ let status: 'default' | 'danger'if (diffHours < 24) {icon = <IconClock />- color = 'text-inherit'+ status = 'default'} else {icon = <IconWarning />- color = 'text-danger'+ status = 'danger'}return (@@ -29,11 +30,22 @@ export function InsightFreshness({ lastRefresh }: { lastRefresh: string }): JSX.title={<div className="flex items-center gap-1"><span>Computed</span>- <TZLabel time={lastRefresh} />+ <TZLabel time={lastRefresh} showPopover={false} /></div>}>- <div className={`flex items-center gap-1 ${color}`}>{icon}</div>+ <LemonButton+ icon={icon}+ noPadding+ status={status}+ // Indicator is informational only — keep it out of the tab order, but labelled for screen readers.+ tabIndex={-1}+ aria-label="Last computed time"+ data-attr="insight-card-freshness"+ // Render the glyph at the surrounding heading's text size (as the bare icon did);+ // LemonButton's default icon sizing made the clock noticeably larger than its row.+ style={{ '--lemon-button-font-size': '1em', '--lemon-button-icon-size': '1em' } as React.CSSProperties}+ /></Tooltip>)}