|
@@ -1,14 +1,13 @@
|
|
|
import {Fragment} from 'react';
|
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
-import ContextIcon from 'sentry/components/replays/contextIcon';
|
|
|
import ErrorCounts from 'sentry/components/replays/header/errorCounts';
|
|
|
import HeaderPlaceholder from 'sentry/components/replays/header/headerPlaceholder';
|
|
|
import TimeSince from 'sentry/components/timeSince';
|
|
|
-import {Tooltip} from 'sentry/components/tooltip';
|
|
|
-import {IconCalendar} from 'sentry/icons';
|
|
|
+import {IconCalendar, IconCursorArrow} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import {space} from 'sentry/styles/space';
|
|
|
+import {ColorOrAlias} from 'sentry/utils/theme';
|
|
|
import type {ReplayError, ReplayRecord} from 'sentry/views/replays/types';
|
|
|
|
|
|
type Props = {
|
|
@@ -19,26 +18,28 @@ type Props = {
|
|
|
function ReplayMetaData({replayErrors, replayRecord}: Props) {
|
|
|
return (
|
|
|
<KeyMetrics>
|
|
|
- <KeyMetricLabel>{t('OS')}</KeyMetricLabel>
|
|
|
+ <KeyMetricLabel>{t('Dead Clicks')}</KeyMetricLabel>
|
|
|
<KeyMetricData>
|
|
|
- <Tooltip title={`${replayRecord?.os.name} ${replayRecord?.os.version}`}>
|
|
|
- <ContextIcon
|
|
|
- name={replayRecord?.os.name ?? ''}
|
|
|
- version={replayRecord?.os.version ?? undefined}
|
|
|
- showVersion
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
+ {replayRecord?.count_dead_clicks ? (
|
|
|
+ <ClickCount color="yellow300">
|
|
|
+ <IconCursorArrow size="sm" />
|
|
|
+ {replayRecord.count_dead_clicks}
|
|
|
+ </ClickCount>
|
|
|
+ ) : (
|
|
|
+ <Count>0</Count>
|
|
|
+ )}
|
|
|
</KeyMetricData>
|
|
|
|
|
|
- <KeyMetricLabel>{t('Browser')}</KeyMetricLabel>
|
|
|
+ <KeyMetricLabel>{t('Rage Clicks')}</KeyMetricLabel>
|
|
|
<KeyMetricData>
|
|
|
- <Tooltip title={`${replayRecord?.browser.name} ${replayRecord?.browser.version}`}>
|
|
|
- <ContextIcon
|
|
|
- name={replayRecord?.browser.name ?? ''}
|
|
|
- version={replayRecord?.browser.version ?? undefined}
|
|
|
- showVersion
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
+ {replayRecord?.count_rage_clicks ? (
|
|
|
+ <ClickCount color="red300">
|
|
|
+ <IconCursorArrow size="sm" />
|
|
|
+ {replayRecord.count_rage_clicks}
|
|
|
+ </ClickCount>
|
|
|
+ ) : (
|
|
|
+ <Count>0</Count>
|
|
|
+ )}
|
|
|
</KeyMetricData>
|
|
|
|
|
|
<KeyMetricLabel>{t('Start Time')}</KeyMetricLabel>
|
|
@@ -93,4 +94,15 @@ const KeyMetricData = styled('dd')`
|
|
|
line-height: ${p => p.theme.text.lineHeightBody};
|
|
|
`;
|
|
|
|
|
|
+const Count = styled('span')`
|
|
|
+ font-variant-numeric: tabular-nums;
|
|
|
+`;
|
|
|
+
|
|
|
+const ClickCount = styled(Count)<{color: ColorOrAlias}>`
|
|
|
+ color: ${p => p.theme[p.color]};
|
|
|
+ display: flex;
|
|
|
+ gap: ${space(0.75)};
|
|
|
+ align-items: center;
|
|
|
+`;
|
|
|
+
|
|
|
export default ReplayMetaData;
|