@@ -3,10 +3,12 @@ import styled from '@emotion/styled';
3
3
4
4
import ErrorBoundary from 'sentry/components/errorBoundary' ;
5
5
import ReplayTimeline from 'sentry/components/replays/breadcrumbs/replayTimeline' ;
6
+ import ReplayController from 'sentry/components/replays/replayController' ;
6
7
import ReplayView from 'sentry/components/replays/replayView' ;
7
8
import { space } from 'sentry/styles/space' ;
8
9
import { LayoutKey } from 'sentry/utils/replays/hooks/useReplayLayout' ;
9
10
import { useDimensions } from 'sentry/utils/useDimensions' ;
11
+ import useOrganization from 'sentry/utils/useOrganization' ;
10
12
import useFullscreen from 'sentry/utils/window/useFullscreen' ;
11
13
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight' ;
12
14
import FluidPanel from 'sentry/views/replays/detail/layout/fluidPanel' ;
@@ -34,6 +36,9 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
34
36
const measureRef = useRef < HTMLDivElement > ( null ) ;
35
37
const { width, height} = useDimensions ( { elementRef : measureRef } ) ;
36
38
39
+ const organization = useOrganization ( ) ;
40
+ const hasNewTimeline = organization . features . includes ( 'session-replay-new-timeline' ) ;
41
+
37
42
const timeline = (
38
43
< ErrorBoundary mini >
39
44
< ReplayTimeline />
@@ -48,11 +53,18 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
48
53
</ VideoSection >
49
54
) ;
50
55
56
+ const controller = hasNewTimeline ? (
57
+ < ErrorBoundary >
58
+ < ReplayController toggleFullscreen = { toggleFullscreen } />
59
+ </ ErrorBoundary >
60
+ ) : null ;
61
+
51
62
if ( layout === LayoutKey . VIDEO_ONLY ) {
52
63
return (
53
64
< BodyContent >
54
65
{ timeline }
55
66
{ video }
67
+ { controller }
56
68
</ BodyContent >
57
69
) ;
58
70
}
@@ -97,6 +109,7 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
97
109
/>
98
110
) : null }
99
111
</ FluidHeight >
112
+ { controller }
100
113
</ BodyContent >
101
114
) ;
102
115
}
@@ -120,6 +133,7 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
120
133
/>
121
134
) : null }
122
135
</ FluidHeight >
136
+ { controller }
123
137
</ BodyContent >
124
138
) ;
125
139
}
0 commit comments