Skip to content

Commit 1e1f6a2

Browse files
scttcperandrewshie-sentry
authored andcommitted
fix(issues): Wrap issue search on mobile (#103206)
- moves search onto new line - shrinks graph/tag gap and hides "& flags" from button before <img width="455" height="286" alt="image" src="https://github.com/user-attachments/assets/69bffd7e-052c-4d65-89a0-2e09f1e067d6" /> after <img width="437" height="310" alt="image" src="https://github.com/user-attachments/assets/119fbd31-b732-47ae-ba53-adf5ce1f589d" />
1 parent 9645446 commit 1e1f6a2

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed

static/app/views/issueDetails/streamline/eventDetailsHeader.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
114114
)}
115115
position="bottom-start"
116116
>
117-
<Flex>
117+
<Flex direction={{xs: 'column', md: 'row'}} gap="sm">
118118
<Grid
119119
width="100%"
120120
gap="sm"
121-
columns="auto minmax(100px, 1fr) auto"
121+
columns={{xs: '1fr', md: 'auto minmax(100px, 1fr) auto'}}
122122
rows={`minmax(${theme.form.md.height}, auto)`}
123123
>
124124
<FilterBar>
@@ -277,7 +277,12 @@ const StyledPageFilterBar = styled(PageFilterBar)`
277277

278278
const GraphSection = styled('div')`
279279
display: flex;
280-
gap: ${p => p.theme.space.lg};
280+
gap: ${p => p.theme.space.sm};
281+
282+
@media (min-width: ${p => p.theme.breakpoints.sm}) {
283+
gap: ${p => p.theme.space.lg};
284+
}
285+
281286
& > * {
282287
background: ${p => p.theme.background};
283288
border-radius: ${p => p.theme.borderRadius};

static/app/views/issueDetails/streamline/eventGraph.tsx

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
useRef,
66
useState,
77
type CSSProperties,
8-
type RefObject,
98
} from 'react';
109
import {useTheme} from '@emotion/react';
1110
import styled from '@emotion/styled';
@@ -110,20 +109,6 @@ function createSeriesAndCount(stats: EventsStats) {
110109
);
111110
}
112111

113-
function GraphPlaceholder({
114-
ref,
115-
height = 96,
116-
}: {
117-
height?: number;
118-
ref?: RefObject<HTMLDivElement | null>;
119-
}) {
120-
return (
121-
<LoadingChartContainer ref={ref}>
122-
<Placeholder height={`${height}px`} testId="event-graph-loading" />
123-
</LoadingChartContainer>
124-
);
125-
}
126-
127112
export function EventGraph({
128113
group,
129114
event,
@@ -509,7 +494,9 @@ export function EventGraph({
509494
) : (
510495
<div />
511496
)}
512-
<GraphPlaceholder ref={chartContainerRef} />
497+
<Flex ref={chartContainerRef} justify="center" align="center" margin="0 md 0 xs">
498+
<Placeholder height="90px" testId="event-graph-loading" />
499+
</Flex>
513500
</Grid>
514501
);
515502
}
@@ -639,7 +626,7 @@ function SummaryContainer(props: FlexProps) {
639626
const theme = useTheme();
640627
return (
641628
<Flex
642-
padding="lg"
629+
padding="lg xs lg lg"
643630
direction="column"
644631
gap={theme.isChonk ? 'sm' : 'xs'}
645632
radius="md"
@@ -680,12 +667,6 @@ const ChartContainer = styled('div')`
680667
}
681668
`;
682669

683-
const LoadingChartContainer = styled('div')`
684-
position: relative;
685-
padding: ${p => p.theme.space.sm} 0 ${p => p.theme.space.sm} 0;
686-
margin: 0 ${p => p.theme.space.md};
687-
`;
688-
689670
export const GraphAlert = styled(Alert)`
690671
padding-left: ${p => p.theme.space['2xl']};
691672
margin: 0 0 0 -${p => p.theme.space['2xl']};

static/app/views/issueDetails/streamline/issueTagsPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function DistributionsDrawerButton({
193193
replace
194194
disabled={tags.length === 0}
195195
>
196-
{includeFeatureFlags
196+
{includeFeatureFlags && !isScreenSmall
197197
? tct('View[nbsp]All Tags[nbsp]&[nbsp]Flags', {
198198
nbsp: '\u00A0', // non-breaking space unicode character.
199199
})

0 commit comments

Comments
 (0)