-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prefer event properties to person properties when describing se…
…ssions (#27208) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
bcc474f
commit 26239e7
Showing
35 changed files
with
183 additions
and
120 deletions.
There are no files selected for viewing
Binary file modified
BIN
-34 Bytes
(100%)
...tend/__snapshots__/components-networkrequest-navigationitem--all-slow--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35 Bytes
(100%)
...end/__snapshots__/components-networkrequest-navigationitem--all-slow--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-172 Bytes
(100%)
frontend/__snapshots__/components-networkrequest-navigationitem--default--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-130 Bytes
(100%)
...tend/__snapshots__/components-networkrequest-navigationitem--default--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-172 Bytes
(100%)
...tend/__snapshots__/components-networkrequest-navigationitem--expanded--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-130 Bytes
(100%)
...end/__snapshots__/components-networkrequest-navigationitem--expanded--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...components-networkrequest-navigationitem--really-slow-dom-interactive--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-33 Bytes
(100%)
...omponents-networkrequest-navigationitem--really-slow-dom-interactive--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-36 Bytes
(100%)
...snapshots__/components-networkrequest-navigationitem--really-slow-fcp--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...napshots__/components-networkrequest-navigationitem--really-slow-fcp--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-35 Bytes
(100%)
...ts__/components-networkrequest-navigationitem--really-slow-load-event--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...s__/components-networkrequest-navigationitem--really-slow-load-event--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...hots__/components-networkrequest-navigationitem--slow-dom-interactive--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...ots__/components-networkrequest-navigationitem--slow-dom-interactive--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...tend/__snapshots__/components-networkrequest-navigationitem--slow-fcp--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-36 Bytes
(100%)
...end/__snapshots__/components-networkrequest-navigationitem--slow-fcp--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...snapshots__/components-networkrequest-navigationitem--slow-load-event--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-34 Bytes
(100%)
...napshots__/components-networkrequest-navigationitem--slow-load-event--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-29 Bytes
(99%)
...shots__/components-networkrequest-navigationitem--web-vitals-all-fast--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-37 Bytes
(99%)
...hots__/components-networkrequest-navigationitem--web-vitals-all-fast--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-31 Bytes
(99%)
...ots__/components-networkrequest-navigationitem--web-vitals-all-medium--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-68 Bytes
(99%)
...ts__/components-networkrequest-navigationitem--web-vitals-all-medium--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-28 Bytes
(100%)
...shots__/components-networkrequest-navigationitem--web-vitals-all-slow--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-23 Bytes
(100%)
...hots__/components-networkrequest-navigationitem--web-vitals-all-slow--light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-29 Bytes
(100%)
...pshots__/components-networkrequest-navigationitem--web-vitals-loading--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-29 Bytes
(100%)
...shots__/components-networkrequest-navigationitem--web-vitals-loading--light.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 29 additions & 19 deletions
48
frontend/src/scenes/session-recordings/player/sidebar/PlayerSidebarOverviewGrid.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,42 @@ | ||
import { useValues } from 'kea' | ||
import { PropertyIcon } from 'lib/components/PropertyIcon' | ||
import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton' | ||
|
||
import { OverviewGrid, OverviewGridItem } from '../../components/OverviewGrid' | ||
import { playerMetaLogic } from '../playerMetaLogic' | ||
import { sessionRecordingPlayerLogic } from '../sessionRecordingPlayerLogic' | ||
|
||
export function PlayerSidebarOverviewGrid(): JSX.Element { | ||
const { logicProps } = useValues(sessionRecordingPlayerLogic) | ||
const { overviewItems } = useValues(playerMetaLogic(logicProps)) | ||
|
||
const { overviewItems, loading } = useValues(playerMetaLogic(logicProps)) | ||
return ( | ||
<div className="rounded border bg-bg-light m-2"> | ||
<OverviewGrid> | ||
{overviewItems.map((item) => ( | ||
<OverviewGridItem | ||
key={item.label} | ||
description={item.tooltipTitle} | ||
label={item.label} | ||
icon={item.icon} | ||
> | ||
{item.type === 'property' ? ( | ||
<PropertyIcon property={item.property} value={item.value} /> | ||
) : ( | ||
item.value | ||
)} | ||
</OverviewGridItem> | ||
))} | ||
</OverviewGrid> | ||
<div className="rounded border bg-bg-light"> | ||
{loading ? ( | ||
<div className="flex flex-col space-y-1"> | ||
<LemonSkeleton.Row repeat={6} className="h-5" /> | ||
</div> | ||
) : ( | ||
<OverviewGrid> | ||
{overviewItems.map((item) => { | ||
return ( | ||
<OverviewGridItem | ||
key={item.label} | ||
description={item.tooltipTitle} | ||
label={item.label} | ||
icon={item.icon} | ||
fadeLabel | ||
> | ||
<div className="flex flex-row items-center space-x-2 justify-start font-medium"> | ||
{item.type === 'property' && ( | ||
<PropertyIcon property={item.property} value={item.value} /> | ||
)} | ||
<span>{item.value}</span> | ||
</div> | ||
</OverviewGridItem> | ||
) | ||
})} | ||
</OverviewGrid> | ||
)} | ||
</div> | ||
) | ||
} |
33 changes: 3 additions & 30 deletions
33
frontend/src/scenes/session-recordings/player/sidebar/PlayerSidebarOverviewTab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,20 @@ | ||
import { PersonDisplay } from '@posthog/apps-common' | ||
import { IconInfo } from '@posthog/icons' | ||
import { useValues } from 'kea' | ||
import { PropertiesTable } from 'lib/components/PropertiesTable' | ||
import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton' | ||
import { Tooltip } from 'lib/lemon-ui/Tooltip' | ||
import { PlayerSidebarSessionSummary } from 'scenes/session-recordings/player/sidebar/PlayerSidebarSessionSummary' | ||
|
||
import { PropertyDefinitionType } from '~/types' | ||
|
||
import { playerMetaLogic } from '../playerMetaLogic' | ||
import { sessionRecordingPlayerLogic } from '../sessionRecordingPlayerLogic' | ||
import { PlayerSidebarOverviewGrid } from './PlayerSidebarOverviewGrid' | ||
|
||
export function PlayerSidebarOverviewTab(): JSX.Element { | ||
const { logicProps } = useValues(sessionRecordingPlayerLogic) | ||
const { sessionPerson, sessionPlayerMetaDataLoading } = useValues(playerMetaLogic(logicProps)) | ||
const { sessionPerson } = useValues(playerMetaLogic(logicProps)) | ||
|
||
return ( | ||
<div className="flex flex-col overflow-auto bg-bg-3000"> | ||
<div className="flex flex-col overflow-auto bg-bg-3000 px-2 py-1 h-full space-y-1"> | ||
<PersonDisplay person={sessionPerson} withIcon withCopyButton /> | ||
<PlayerSidebarOverviewGrid /> | ||
<PlayerSidebarSessionSummary /> | ||
<div className="font-bold bg-bg-light px-2 border-b py-3"> | ||
<Tooltip title="These are the person properties right now. They might have changed and not match the person properties at the time of recording."> | ||
<h2> | ||
Latest person properties <IconInfo /> | ||
</h2> | ||
</Tooltip> | ||
<PersonDisplay person={sessionPerson} withIcon noPopover /> | ||
</div> | ||
{sessionPlayerMetaDataLoading ? ( | ||
<div className="space-y-2"> | ||
<LemonSkeleton.Row repeat={60} fade={true} className="h-3 w-full" /> | ||
</div> | ||
) : ( | ||
<PropertiesTable | ||
properties={sessionPerson?.properties || []} | ||
type={PropertyDefinitionType.Person} | ||
sortProperties | ||
embedded | ||
filterable | ||
className="mt-4" | ||
/> | ||
)} | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.