-
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.
prefer event properties to person properties
- Loading branch information
1 parent
9a7d825
commit 5c3aa89
Showing
3 changed files
with
63 additions
and
33 deletions.
There are no files selected for viewing
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
44 changes: 27 additions & 17 deletions
44
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> | ||
{loading ? ( | ||
<div className="flex flex-col space-y-1 px-1 py-0.5"> | ||
<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} | ||
> | ||
<div className="flex flex-row items-center space-x-2"> | ||
{item.type === 'property' && ( | ||
<PropertyIcon property={item.property} value={item.value} /> | ||
)} | ||
<span>{item.value}</span> | ||
</div> | ||
</OverviewGridItem> | ||
) | ||
})} | ||
</OverviewGrid> | ||
)} | ||
</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