@@ -11,7 +11,8 @@ import {StringWalker} from 'sentry/components/replays/walker/urlWalker';
11
11
import ScoreBar from 'sentry/components/scoreBar' ;
12
12
import TimeSince from 'sentry/components/timeSince' ;
13
13
import CHART_PALETTE from 'sentry/constants/chartPalette' ;
14
- import { IconCalendar } from 'sentry/icons' ;
14
+ import { IconCalendar , IconLocation } from 'sentry/icons' ;
15
+ import { tn } from 'sentry/locale' ;
15
16
import { space , ValidSize } from 'sentry/styles/space' ;
16
17
import type { Organization } from 'sentry/types' ;
17
18
import EventView from 'sentry/utils/discover/eventView' ;
@@ -44,6 +45,39 @@ export function ReplayCell({
44
45
} ,
45
46
} ;
46
47
48
+ const subText = replay . urls ? (
49
+ < Cols >
50
+ < StringWalker urls = { replay . urls } />
51
+ < Row gap = { 1 } >
52
+ < Row gap = { 0.5 } >
53
+ { project ? < Avatar size = { 12 } project = { project } /> : null }
54
+ < Link to = { replayDetails } > { getShortEventId ( replay . id ) } </ Link >
55
+ </ Row >
56
+ < Row gap = { 0.5 } >
57
+ < IconCalendar color = "gray300" size = "xs" />
58
+ < TimeSince date = { replay . started_at } />
59
+ </ Row >
60
+ </ Row >
61
+ </ Cols >
62
+ ) : (
63
+ < Cols >
64
+ < Row gap = { 1 } >
65
+ < Row gap = { 0.5 } minWidth = { 80 } >
66
+ { project ? < Avatar size = { 12 } project = { project } /> : null }
67
+ < Link to = { replayDetails } > { getShortEventId ( replay . id ) } </ Link >
68
+ </ Row >
69
+ < Row gap = { 0.5 } minWidth = { 80 } >
70
+ < IconLocation color = "green400" size = "sm" />
71
+ { tn ( '%s Page' , '%s Pages' , replay . count_urls ) }
72
+ </ Row >
73
+ < Row gap = { 0.5 } >
74
+ < IconCalendar color = "gray300" size = "xs" />
75
+ < TimeSince date = { replay . started_at } />
76
+ </ Row >
77
+ </ Row >
78
+ </ Cols >
79
+ ) ;
80
+
47
81
return (
48
82
< Item >
49
83
< UserBadgeFullWidth
@@ -59,21 +93,7 @@ export function ReplayCell({
59
93
name : replay . user . username || '' ,
60
94
} }
61
95
// this is the subheading for the avatar, so displayEmail in this case is a misnomer
62
- displayEmail = {
63
- < Cols >
64
- < StringWalker urls = { replay . urls } />
65
- < Row gap = { 1 } >
66
- < Row gap = { 0.5 } >
67
- { project ? < Avatar size = { 12 } project = { project } /> : null }
68
- < Link to = { replayDetails } > { getShortEventId ( replay . id ) } </ Link >
69
- </ Row >
70
- < Row gap = { 0.5 } >
71
- < IconCalendar color = "gray300" size = "xs" />
72
- < TimeSince date = { replay . started_at } />
73
- </ Row >
74
- </ Row >
75
- </ Cols >
76
- }
96
+ displayEmail = { subText }
77
97
/>
78
98
</ Item >
79
99
) ;
@@ -87,14 +107,15 @@ const UserBadgeFullWidth = styled(UserBadge)`
87
107
const Cols = styled ( 'div' ) `
88
108
display: flex;
89
109
flex-direction: column;
90
- gap: ${ space ( 0.25 ) } ;
110
+ gap: ${ space ( 0.5 ) } ;
91
111
width: 100%;
92
112
` ;
93
113
94
- const Row = styled ( 'div' ) < { gap : ValidSize } > `
114
+ const Row = styled ( 'div' ) < { gap : ValidSize ; minWidth ?: number } > `
95
115
display: flex;
96
116
gap: ${ p => space ( p . gap ) } ;
97
117
align-items: center;
118
+ ${ p => ( p . minWidth ? `min-width: ${ p . minWidth } px;` : '' ) }
98
119
` ;
99
120
100
121
const MainLink = styled ( Link ) `
@@ -122,7 +143,7 @@ export function TransactionCell({
122
143
}
123
144
124
145
export function OSCell ( { replay} : Props ) {
125
- const { name, version} = replay . os ;
146
+ const { name, version} = replay . os ?? { } ;
126
147
const theme = useTheme ( ) ;
127
148
const hasRoomForColumns = useMedia ( `(min-width: ${ theme . breakpoints . large } )` ) ;
128
149
@@ -137,7 +158,7 @@ export function OSCell({replay}: Props) {
137
158
}
138
159
139
160
export function BrowserCell ( { replay} : Props ) {
140
- const { name, version} = replay . browser ;
161
+ const { name, version} = replay . browser ?? { } ;
141
162
const theme = useTheme ( ) ;
142
163
const hasRoomForColumns = useMedia ( `(min-width: ${ theme . breakpoints . large } )` ) ;
143
164
0 commit comments