Skip to content

Commit 58de2b2

Browse files
authored
chore(issue-details): Improve event header on mobile (#87241)
before: ![Screenshot 2025-03-18 at 12 00 34 PM](https://github.com/user-attachments/assets/f6814bf7-5d92-4c77-8110-a4903a19121d) after: ![Screenshot 2025-03-18 at 12 00 30 PM](https://github.com/user-attachments/assets/80339a94-dd3a-4cc8-9bb5-d09f044b09d6)
1 parent 59acf97 commit 58de2b2

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

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

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {Fragment} from 'react';
2+
import {useTheme} from '@emotion/react';
23
import styled from '@emotion/styled';
34

45
import ButtonBar from 'sentry/components/buttonBar';
@@ -19,6 +20,7 @@ import parseLinkHeader from 'sentry/utils/parseLinkHeader';
1920
import {keepPreviousData} from 'sentry/utils/queryClient';
2021
import useReplayCountForIssues from 'sentry/utils/replayCount/useReplayCountForIssues';
2122
import {useLocation} from 'sentry/utils/useLocation';
23+
import useMedia from 'sentry/utils/useMedia';
2224
import useOrganization from 'sentry/utils/useOrganization';
2325
import {hasDatasetSelector} from 'sentry/views/dashboards/utils';
2426
import {useGroupEventAttachments} from 'sentry/views/issueDetails/groupEventAttachments/useGroupEventAttachments';
@@ -51,6 +53,8 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
5153
const eventView = useIssueDetailsEventView({group});
5254
const {eventCount} = useIssueDetails();
5355
const issueTypeConfig = getConfigForIssueType(group, group.project);
56+
const theme = useTheme();
57+
const isSmallScreen = useMedia(`(max-width: ${theme.breakpoints.small})`);
5458

5559
const hideDropdownButton =
5660
!issueTypeConfig.pages.attachments.enabled &&
@@ -213,7 +217,9 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
213217
analyticsEventKey="issue_details.all_events_clicked"
214218
analyticsEventName="Issue Details: All Events Clicked"
215219
>
216-
{t('View More %s', issueTypeConfig.customCopy.eventUnits)}
220+
{isSmallScreen
221+
? t('More %s', issueTypeConfig.customCopy.eventUnits)
222+
: t('View More %s', issueTypeConfig.customCopy.eventUnits)}
217223
</LinkButton>
218224
)}
219225
{issueTypeConfig.pages.openPeriods.enabled && (
@@ -226,7 +232,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
226232
analyticsEventKey="issue_details.all_open_periods_clicked"
227233
analyticsEventName="Issue Details: All Open Periods Clicked"
228234
>
229-
{t('View More Open Periods')}
235+
{isSmallScreen ? t('More Open Periods') : t('View More Open Periods')}
230236
</LinkButton>
231237
)}
232238
{issueTypeConfig.pages.checkIns.enabled && (
@@ -239,7 +245,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
239245
analyticsEventKey="issue_details.all_checks_ins_clicked"
240246
analyticsEventName="Issue Details: All Checks-Ins Clicked"
241247
>
242-
{t('View More Check-Ins')}
248+
{isSmallScreen ? t('More Check-Ins') : t('View More Check-Ins')}
243249
</LinkButton>
244250
)}
245251
{issueTypeConfig.pages.uptimeChecks.enabled && (
@@ -252,7 +258,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
252258
analyticsEventKey="issue_details.all_uptime_checks_clicked"
253259
analyticsEventName="Issue Details: All Uptime Checks Clicked"
254260
>
255-
{t('View More Uptime Checks')}
261+
{isSmallScreen ? t('More Uptime Checks') : t('View More Uptime Checks')}
256262
</LinkButton>
257263
)}
258264
</Fragment>

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,12 @@ const EventInfoJumpToWrapper = styled('div')`
229229
flex-direction: row;
230230
justify-content: space-between;
231231
align-items: center;
232-
padding: 0 ${space(2)} 0 ${space(0.5)};
233-
flex-wrap: wrap;
232+
padding: 0 ${space(2)};
233+
flex-wrap: nowrap;
234234
min-height: ${MIN_NAV_HEIGHT}px;
235-
@media (min-width: ${p => p.theme.breakpoints.small}) {
236-
flex-wrap: nowrap;
235+
@media (max-width: ${p => p.theme.breakpoints.small}) {
236+
flex-wrap: wrap;
237+
gap: 0;
237238
}
238239
border-bottom: 1px solid ${p => p.theme.translucentBorder};
239240
`;
@@ -244,6 +245,10 @@ const EventInfo = styled('div')`
244245
flex-direction: row;
245246
align-items: center;
246247
line-height: 1.2;
248+
249+
@media (max-width: ${p => p.theme.breakpoints.small}) {
250+
padding-top: ${space(1)};
251+
}
247252
`;
248253

249254
const JumpTo = styled('div')`
@@ -290,7 +295,6 @@ const EventIdWrapper = styled('div')`
290295
display: flex;
291296
gap: ${space(0.25)};
292297
align-items: center;
293-
margin-left: ${space(1.5)};
294298
font-weight: ${p => p.theme.fontWeightBold};
295299
296300
button {

0 commit comments

Comments
 (0)