Skip to content

Commit 7f6fe45

Browse files
Revert "feat(replays): Replay layout add breadcrumbs to fullscreen mode (#58466)"
This reverts commit b793ef6. Co-authored-by: asottile-sentry <[email protected]>
1 parent 13f2e6b commit 7f6fe45

File tree

2 files changed

+9
-56
lines changed

2 files changed

+9
-56
lines changed

Diff for: static/app/components/replays/replayView.tsx

+8-55
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
import {Fragment, useState} from 'react';
1+
import {Fragment} from 'react';
22
import styled from '@emotion/styled';
33

4-
import {Button} from 'sentry/components/button';
5-
import {useReplayContext} from 'sentry/components/replays/replayContext';
64
import ReplayController from 'sentry/components/replays/replayController';
75
import ReplayCurrentUrl from 'sentry/components/replays/replayCurrentUrl';
86
import ReplayPlayer from 'sentry/components/replays/replayPlayer';
9-
import {IconChevron} from 'sentry/icons';
10-
import {t} from 'sentry/locale';
117
import {space} from 'sentry/styles/space';
128
import useOrganization from 'sentry/utils/useOrganization';
139
import useIsFullscreen from 'sentry/utils/window/useIsFullscreen';
14-
import Breadcrumbs from 'sentry/views/replays/detail/breadcrumbs';
1510
import BrowserOSIcons from 'sentry/views/replays/detail/browserOSIcons';
1611
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
1712

@@ -23,39 +18,16 @@ function ReplayView({toggleFullscreen}: Props) {
2318
const organization = useOrganization();
2419
const hasNewTimeline = organization.features.includes('session-replay-new-timeline');
2520
const isFullscreen = useIsFullscreen();
26-
const {replay} = useReplayContext();
27-
const [isSidebarOpen, setIsSidebarOpen] = useState(true);
2821

2922
return (
3023
<Fragment>
31-
<PlayerBreadcrumbContainer>
32-
<PlayerContainer>
33-
<ContextContainer>
34-
<ReplayCurrentUrl />
35-
<BrowserOSIcons />
36-
{isFullscreen ? (
37-
<Button
38-
size="sm"
39-
onClick={() => setIsSidebarOpen(!isSidebarOpen)}
40-
icon={<IconChevron direction={isSidebarOpen ? 'right' : 'left'} />}
41-
>
42-
{isSidebarOpen ? t('Collapse Sidebar') : t('Open Sidebar')}
43-
</Button>
44-
) : null}
45-
</ContextContainer>
46-
<Panel>
47-
<ReplayPlayer />
48-
</Panel>
49-
</PlayerContainer>
50-
{isFullscreen && isSidebarOpen ? (
51-
<BreadcrumbContainer>
52-
<Breadcrumbs
53-
frames={replay?.getChapterFrames()}
54-
startTimestampMs={replay?.getReplay()?.started_at?.getTime() || 0}
55-
/>
56-
</BreadcrumbContainer>
57-
) : null}
58-
</PlayerBreadcrumbContainer>
24+
<ContextContainer>
25+
<ReplayCurrentUrl />
26+
<BrowserOSIcons />
27+
</ContextContainer>
28+
<Panel>
29+
<ReplayPlayer />
30+
</Panel>
5931
{isFullscreen || !hasNewTimeline ? (
6032
<ReplayController toggleFullscreen={toggleFullscreen} />
6133
) : null}
@@ -78,23 +50,4 @@ const ContextContainer = styled('div')`
7850
gap: ${space(1)};
7951
`;
8052

81-
const PlayerContainer = styled('div')`
82-
display: grid;
83-
grid-auto-flow: row;
84-
grid-template-rows: auto 1fr;
85-
gap: ${space(1)};
86-
flex-grow: 1;
87-
`;
88-
89-
const BreadcrumbContainer = styled('div')`
90-
width: 25%;
91-
`;
92-
93-
const PlayerBreadcrumbContainer = styled('div')`
94-
display: flex;
95-
flex-direction: row;
96-
height: 100%;
97-
gap: ${space(1)};
98-
`;
99-
10053
export default ReplayView;

Diff for: static/app/utils/window/useIsFullscreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import screenfull from 'screenfull';
88
* as part of your component render method.
99
*/
1010
export default function useIsFullscreen() {
11-
const [isFullscreen, setIsFullscreen] = useState(screenfull.isFullscreen);
11+
const [isFullscreen, setIsFullscreen] = useState(false);
1212

1313
useEffect(() => {
1414
if (!screenfull.isEnabled) {

0 commit comments

Comments
 (0)