|
@@ -3,10 +3,12 @@ import styled from '@emotion/styled';
|
|
|
|
|
|
import ErrorBoundary from 'sentry/components/errorBoundary';
|
|
import ErrorBoundary from 'sentry/components/errorBoundary';
|
|
import ReplayTimeline from 'sentry/components/replays/breadcrumbs/replayTimeline';
|
|
import ReplayTimeline from 'sentry/components/replays/breadcrumbs/replayTimeline';
|
|
|
|
+import ReplayController from 'sentry/components/replays/replayController';
|
|
import ReplayView from 'sentry/components/replays/replayView';
|
|
import ReplayView from 'sentry/components/replays/replayView';
|
|
import {space} from 'sentry/styles/space';
|
|
import {space} from 'sentry/styles/space';
|
|
import {LayoutKey} from 'sentry/utils/replays/hooks/useReplayLayout';
|
|
import {LayoutKey} from 'sentry/utils/replays/hooks/useReplayLayout';
|
|
import {useDimensions} from 'sentry/utils/useDimensions';
|
|
import {useDimensions} from 'sentry/utils/useDimensions';
|
|
|
|
+import useOrganization from 'sentry/utils/useOrganization';
|
|
import useFullscreen from 'sentry/utils/window/useFullscreen';
|
|
import useFullscreen from 'sentry/utils/window/useFullscreen';
|
|
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
|
|
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
|
|
import FluidPanel from 'sentry/views/replays/detail/layout/fluidPanel';
|
|
import FluidPanel from 'sentry/views/replays/detail/layout/fluidPanel';
|
|
@@ -34,6 +36,9 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
|
|
const measureRef = useRef<HTMLDivElement>(null);
|
|
const measureRef = useRef<HTMLDivElement>(null);
|
|
const {width, height} = useDimensions({elementRef: measureRef});
|
|
const {width, height} = useDimensions({elementRef: measureRef});
|
|
|
|
|
|
|
|
+ const organization = useOrganization();
|
|
|
|
+ const hasNewTimeline = organization.features.includes('session-replay-new-timeline');
|
|
|
|
+
|
|
const timeline = (
|
|
const timeline = (
|
|
<ErrorBoundary mini>
|
|
<ErrorBoundary mini>
|
|
<ReplayTimeline />
|
|
<ReplayTimeline />
|
|
@@ -48,11 +53,18 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
|
|
</VideoSection>
|
|
</VideoSection>
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+ const controller = hasNewTimeline ? (
|
|
|
|
+ <ErrorBoundary>
|
|
|
|
+ <ReplayController toggleFullscreen={toggleFullscreen} />
|
|
|
|
+ </ErrorBoundary>
|
|
|
|
+ ) : null;
|
|
|
|
+
|
|
if (layout === LayoutKey.VIDEO_ONLY) {
|
|
if (layout === LayoutKey.VIDEO_ONLY) {
|
|
return (
|
|
return (
|
|
<BodyContent>
|
|
<BodyContent>
|
|
{timeline}
|
|
{timeline}
|
|
{video}
|
|
{video}
|
|
|
|
+ {controller}
|
|
</BodyContent>
|
|
</BodyContent>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -97,6 +109,7 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
|
|
/>
|
|
/>
|
|
) : null}
|
|
) : null}
|
|
</FluidHeight>
|
|
</FluidHeight>
|
|
|
|
+ {controller}
|
|
</BodyContent>
|
|
</BodyContent>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -120,6 +133,7 @@ function ReplayLayout({layout = LayoutKey.TOPBAR}: Props) {
|
|
/>
|
|
/>
|
|
) : null}
|
|
) : null}
|
|
</FluidHeight>
|
|
</FluidHeight>
|
|
|
|
+ {controller}
|
|
</BodyContent>
|
|
</BodyContent>
|
|
);
|
|
);
|
|
}
|
|
}
|