@@ -3,10 +3,16 @@ import {AutoSizer, CellMeasurer, GridCellProps, MultiGrid} from 'react-virtualiz
3
3
import styled from '@emotion/styled' ;
4
4
5
5
import Feature from 'sentry/components/acl/feature' ;
6
+ import { Alert } from 'sentry/components/alert' ;
7
+ import { Button } from 'sentry/components/button' ;
8
+ import ExternalLink from 'sentry/components/links/externalLink' ;
6
9
import Placeholder from 'sentry/components/placeholder' ;
7
10
import { useReplayContext } from 'sentry/components/replays/replayContext' ;
8
- import { t } from 'sentry/locale' ;
11
+ import { IconClose , IconInfo } from 'sentry/icons' ;
12
+ import { t , tct } from 'sentry/locale' ;
13
+ import { space } from 'sentry/styles/space' ;
9
14
import useCrumbHandlers from 'sentry/utils/replays/hooks/useCrumbHandlers' ;
15
+ import useDismissAlert from 'sentry/utils/useDismissAlert' ;
10
16
import useOrganization from 'sentry/utils/useOrganization' ;
11
17
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight' ;
12
18
import NetworkDetails from 'sentry/views/replays/detail/network/networkDetails' ;
@@ -39,6 +45,8 @@ function NetworkList({networkSpans, startTimestampMs}: Props) {
39
45
const organization = useOrganization ( ) ;
40
46
const { currentTime, currentHoverTime} = useReplayContext ( ) ;
41
47
48
+ const { dismiss, isDismissed} = useDismissAlert ( { key : 'replay-network-bodies' } ) ;
49
+
42
50
const initialRequestDetailsHeight = useMemo (
43
51
( ) => Math . max ( 150 , window . innerHeight * 0.25 ) ,
44
52
[ ]
@@ -113,6 +121,36 @@ function NetworkList({networkSpans, startTimestampMs}: Props) {
113
121
return (
114
122
< FluidHeight >
115
123
< NetworkFilters networkSpans = { networkSpans } { ...filterProps } />
124
+ < Feature
125
+ features = { [ 'session-replay-network-details' ] }
126
+ organization = { organization }
127
+ renderDisabled = { false }
128
+ >
129
+ { isDismissed ? null : (
130
+ < StyledAlert
131
+ icon = { < IconInfo /> }
132
+ opaque = { false }
133
+ showIcon
134
+ type = "info"
135
+ trailingItems = {
136
+ < StyledButton priority = "link" size = "sm" onClick = { ( ) => { } } >
137
+ < IconClose color = "gray500" size = "sm" />
138
+ </ StyledButton >
139
+ }
140
+ >
141
+ { tct ( 'Start collecting the body of requests and responses. [link]' , {
142
+ link : (
143
+ < ExternalLink
144
+ href = "https://github.com/getsentry/sentry-javascript/issues/7103"
145
+ onClick = { dismiss }
146
+ >
147
+ { t ( 'Learn More' ) }
148
+ </ ExternalLink >
149
+ ) ,
150
+ } ) }
151
+ </ StyledAlert >
152
+ ) }
153
+ </ Feature >
116
154
< NetworkTable >
117
155
< FluidHeight >
118
156
{ networkSpans ? (
@@ -214,4 +252,12 @@ const NetworkTable = styled(OverflowHidden)`
214
252
}
215
253
` ;
216
254
255
+ const StyledAlert = styled ( Alert ) `
256
+ margin-bottom: ${ space ( 1 ) } ;
257
+ ` ;
258
+
259
+ const StyledButton = styled ( Button ) `
260
+ color: inherit;
261
+ ` ;
262
+
217
263
export default NetworkList ;
0 commit comments