Skip to content

Commit fbf7877

Browse files
authored
ref(replay): Remove FluidPanel abstraction (#95150)
This was used in only 2 places, and not fulling in each place. So it's better to inline the bits that are working, and in the case of the Tags panel we can chop out some redundant stuff.
1 parent 6c70f64 commit fbf7877

File tree

3 files changed

+37
-55
lines changed

3 files changed

+37
-55
lines changed

static/app/views/replays/detail/layout/fluidPanel.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

static/app/views/replays/detail/layout/replayLayout.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import useReplayLayout, {LayoutKey} from 'sentry/utils/replays/hooks/useReplayLa
1010
import {useDimensions} from 'sentry/utils/useDimensions';
1111
import useFullscreen from 'sentry/utils/window/useFullscreen';
1212
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
13-
import {FluidPanel} from 'sentry/views/replays/detail/layout/fluidPanel';
1413
import FocusArea from 'sentry/views/replays/detail/layout/focusArea';
1514
import FocusTabs from 'sentry/views/replays/detail/layout/focusTabs';
1615
import SplitPanel from 'sentry/views/replays/detail/layout/splitPanel';
@@ -74,11 +73,14 @@ export default function ReplayLayout({
7473
isLoading || replayRecord?.is_archived ? (
7574
<Placeholder width="100%" height="100%" />
7675
) : (
77-
<FluidPanel title={<FocusTabs isVideoReplay={isVideoReplay} />}>
78-
<ErrorBoundary mini>
79-
<FocusArea isVideoReplay={isVideoReplay} />
80-
</ErrorBoundary>
81-
</FluidPanel>
76+
<FluidContainer>
77+
<FocusTabs isVideoReplay={isVideoReplay} />
78+
<OverflowBody>
79+
<ErrorBoundary mini>
80+
<FocusArea isVideoReplay={isVideoReplay} />
81+
</ErrorBoundary>
82+
</OverflowBody>
83+
</FluidContainer>
8284
);
8385

8486
const hasSize = width + height > 0;
@@ -139,6 +141,17 @@ export default function ReplayLayout({
139141
);
140142
}
141143

144+
const FluidContainer = styled('section')`
145+
display: flex;
146+
flex-direction: column;
147+
height: 100%;
148+
`;
149+
150+
const OverflowBody = styled('div')`
151+
flex: 1 1 auto;
152+
overflow: auto;
153+
`;
154+
142155
const BodyContent = styled('main')`
143156
background: ${p => p.theme.background};
144157
width: 100%;

static/app/views/replays/detail/tagPanel/index.tsx

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {t} from 'sentry/locale';
1212
import {space} from 'sentry/styles/space';
1313
import useOrganization from 'sentry/utils/useOrganization';
1414
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
15-
import {FluidPanel} from 'sentry/views/replays/detail/layout/fluidPanel';
1615
import TabItemContainer from 'sentry/views/replays/detail/tabItemContainer';
1716
import TagFilters from 'sentry/views/replays/detail/tagPanel/tagFilters';
1817
import useTagFilters from 'sentry/views/replays/detail/tagPanel/useTagFilters';
@@ -77,24 +76,22 @@ export default function TagPanel() {
7776
<PaddedFluidHeight>
7877
<TagFilters tags={tags} {...filterProps} />
7978
<TabItemContainer>
80-
<StyledPanel>
81-
<FluidPanel>
82-
{filteredTags.length ? (
83-
<KeyValueTable noMargin>
84-
{filteredTags.map(([key, values]) => (
85-
<ReplayTagsTableRow
86-
key={key}
87-
name={key}
88-
values={values}
89-
generateUrl={key.includes('sdk.replay.') ? undefined : generateUrl}
90-
/>
91-
))}
92-
</KeyValueTable>
93-
) : (
94-
<EmptyMessage>{t('No tags for this replay were found.')}</EmptyMessage>
95-
)}
96-
</FluidPanel>
97-
</StyledPanel>
79+
<OverflowBody>
80+
{filteredTags.length ? (
81+
<KeyValueTable noMargin>
82+
{filteredTags.map(([key, values]) => (
83+
<ReplayTagsTableRow
84+
key={key}
85+
name={key}
86+
values={values}
87+
generateUrl={key.includes('sdk.replay.') ? undefined : generateUrl}
88+
/>
89+
))}
90+
</KeyValueTable>
91+
) : (
92+
<EmptyMessage>{t('No tags for this replay were found.')}</EmptyMessage>
93+
)}
94+
</OverflowBody>
9895
</TabItemContainer>
9996
</PaddedFluidHeight>
10097
</ErrorBoundary>
@@ -109,9 +106,7 @@ const PaddedFluidHeight = styled(FluidHeight)`
109106
padding-top: ${space(1)};
110107
`;
111108

112-
const StyledPanel = styled('div')`
113-
position: relative;
114-
height: 100%;
109+
const OverflowBody = styled('section')`
110+
flex: 1 1 auto;
115111
overflow: auto;
116-
display: grid;
117112
`;

0 commit comments

Comments
 (0)