diff --git a/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png b/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png index 0467608712657..072da75fdbd6c 100644 Binary files a/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png and b/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png differ diff --git a/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png b/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png index 40f891b015a2a..25d5abaa42907 100644 Binary files a/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png and b/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png differ diff --git a/frontend/src/queries/nodes/DataTable/EventRowActions.tsx b/frontend/src/queries/nodes/DataTable/EventRowActions.tsx index a1ff03e1f9529..3312d4904100d 100644 --- a/frontend/src/queries/nodes/DataTable/EventRowActions.tsx +++ b/frontend/src/queries/nodes/DataTable/EventRowActions.tsx @@ -6,6 +6,7 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton' import { More } from 'lib/lemon-ui/LemonButton/More' import { copyToClipboard } from 'lib/utils/copyToClipboard' import { getCurrentTeamId } from 'lib/utils/getAppContext' +import React from 'react' import { createActionFromEvent } from 'scenes/activity/explore/createActionFromEvent' import { insightUrlForEvent } from 'scenes/insights/utils' import { teamLogic } from 'scenes/teamLogic' @@ -40,21 +41,7 @@ export function EventRowActions({ event }: EventActionProps): JSX.Element { Create action from event )} - {event.uuid && event.timestamp && ( - } - data-attr="events-table-event-link" - onClick={() => - void copyToClipboard( - urls.absolute(urls.currentProject(urls.event(String(event.uuid), event.timestamp))), - 'link to event' - ) - } - > - Copy link to event - - )} + {event.uuid && event.timestamp && } ) } + +export const EventCopyLinkButton = React.forwardRef< + HTMLButtonElement, + { event: Pick } +>(function EventCopyLinkButton({ event }, ref) { + return ( + } + data-attr="events-table-event-link" + onClick={() => + void copyToClipboard( + urls.absolute(urls.currentProject(urls.event(String(event.uuid), event.timestamp))), + 'link to event' + ) + } + > + Copy link to event + + ) +}) diff --git a/frontend/src/scenes/activity/live/LiveEventsTable.tsx b/frontend/src/scenes/activity/live/LiveEventsTable.tsx index 4b554e1c0d0b7..ee62c7a51f47f 100644 --- a/frontend/src/scenes/activity/live/LiveEventsTable.tsx +++ b/frontend/src/scenes/activity/live/LiveEventsTable.tsx @@ -5,10 +5,12 @@ import { useActions, useValues } from 'kea' import { PropertyKeyInfo } from 'lib/components/PropertyKeyInfo' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import { TZLabel } from 'lib/components/TZLabel' +import { More } from 'lib/lemon-ui/LemonButton/More' import { LemonTable, LemonTableColumns } from 'lib/lemon-ui/LemonTable' import { liveEventsTableLogic } from 'scenes/activity/live/liveEventsTableLogic' import { PersonDisplay } from 'scenes/persons/PersonDisplay' +import { EventCopyLinkButton } from '~/queries/nodes/DataTable/EventRowActions' import type { LiveEvent } from '~/types' const columns: LemonTableColumns = [ @@ -46,6 +48,21 @@ const columns: LemonTableColumns = [ return }, }, + { + dataIndex: '__more' as any, + render: function Render(_, event: LiveEvent) { + return ( + + + + } + /> + ) + }, + width: 0, + }, ] export function LiveEventsTable(): JSX.Element { diff --git a/frontend/src/scenes/scenes.ts b/frontend/src/scenes/scenes.ts index 3cce5ebfab71d..3362684acfa48 100644 --- a/frontend/src/scenes/scenes.ts +++ b/frontend/src/scenes/scenes.ts @@ -470,8 +470,8 @@ export const redirects: Record< ]) try { const timestamp = decodeURIComponent(_) - const after = dayjs(timestamp).subtract(1, 'second').startOf('second').toISOString() - const before = dayjs(timestamp).add(1, 'second').startOf('second').toISOString() + const after = dayjs(timestamp).subtract(15, 'second').startOf('second').toISOString() + const before = dayjs(timestamp).add(15, 'second').startOf('second').toISOString() Object.assign(query.source as EventsQuery, { before, after }) } catch (e) { lemonToast.error('Invalid event timestamp')