Skip to content

Commit 264c397

Browse files
roggenkemperarmcknight
authored andcommitted
fix(issue-details): Fix alignment of issue details header (#97010)
fixes align of issue details header fixes https://linear.app/getsentry/issue/RTC-1107/fix-alignment-of-eventuser-count-buttons
1 parent 09d9682 commit 264c397

File tree

7 files changed

+38
-27
lines changed

7 files changed

+38
-27
lines changed

static/app/components/events/highlights/highlightsIconSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function EnvironmentHighlight({environmentTag}: {environmentTag: EventTag | unde
236236

237237
const IconBar = styled('div')`
238238
position: relative;
239-
padding: 0 ${space(0.5)};
239+
padding: 0;
240240
`;
241241

242242
const IconContainer = styled('div')`

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
5252
const organization = useOrganization();
5353
const navigate = useNavigate();
5454
const location = useLocation();
55+
const theme = useTheme();
5556
const environments = useEnvironmentsFromUrl();
5657
const searchQuery = useEventQuery({groupId: group.id});
5758
const issueTypeConfig = getConfigForIssueType(group, project);
@@ -158,6 +159,9 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
158159
}
159160
triggerProps={{
160161
borderless: true,
162+
style: {
163+
padding: `${theme.space.md} ${theme.space.lg}`,
164+
},
161165
}}
162166
/>
163167
<SearchFilter
@@ -213,10 +217,10 @@ export function EventDetailsHeader({group, event, project}: EventDetailsHeaderPr
213217
}
214218

215219
function EnvironmentSelector({group, event, project}: EventDetailsHeaderProps) {
216-
const theme = useTheme();
217220
const issueTypeConfig = getConfigForIssueType(group, project);
218221
const isFixedEnvironment = issueTypeConfig.header.filterBar.fixedEnvironment;
219222
const eventEnvironment = event?.tags?.find(tag => tag.key === 'environment')?.value;
223+
const theme = useTheme();
220224

221225
const environmentCss = css`
222226
display: block;
@@ -245,6 +249,9 @@ function EnvironmentSelector({group, event, project}: EventDetailsHeaderProps) {
245249
css={environmentCss}
246250
triggerProps={{
247251
borderless: true,
252+
style: {
253+
padding: `${theme.space.md} ${theme.space.lg}`,
254+
},
248255
}}
249256
/>
250257
);
@@ -256,11 +263,11 @@ const DetailsContainer = styled('div')<{
256263
position: relative;
257264
display: flex;
258265
flex-direction: column;
259-
gap: ${p => p.theme.space.md};
266+
gap: ${p => p.theme.space.lg};
260267
background: ${p => p.theme.backgroundSecondary};
261-
padding-left: ${p => p.theme.space.lg};
262-
padding-right: ${p => p.theme.space.lg};
263-
padding-top: ${p => p.theme.space.md};
268+
padding-left: ${p => p.theme.space['2xl']};
269+
padding-right: ${p => p.theme.space['2xl']};
270+
padding-top: ${p => p.theme.space.lg};
264271
265272
@media (min-width: ${p => p.theme.breakpoints.lg}) {
266273
border-right: 1px solid ${p => p.theme.translucentBorder};
@@ -302,7 +309,7 @@ const DateFilter = styled(TimeRangeSelector)`
302309

303310
const GraphSection = styled('div')`
304311
display: flex;
305-
gap: ${p => p.theme.space.md};
312+
gap: ${p => p.theme.space.lg};
306313
& > * {
307314
background: ${p => p.theme.background};
308315
border-radius: ${p => p.theme.borderRadius};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ const SummaryContainer = styled('div')`
628628
display: flex;
629629
gap: ${p => (p.theme.isChonk ? p.theme.space.sm : p.theme.space.xs)};
630630
flex-direction: column;
631-
margin: ${p => p.theme.space.md};
631+
margin: ${p => p.theme.space.lg};
632632
border-radius: ${p => p.theme.borderRadius} 0 0 ${p => p.theme.borderRadius};
633633
`;
634634

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {ScrollCarousel} from 'sentry/components/scrollCarousel';
1313
import TimeSince from 'sentry/components/timeSince';
1414
import {IconCopy, IconWarning} from 'sentry/icons';
1515
import {t} from 'sentry/locale';
16-
import {space} from 'sentry/styles/space';
1716
import type {Event} from 'sentry/types/event';
1817
import type {Group} from 'sentry/types/group';
1918
import {trackAnalytics} from 'sentry/utils/analytics';
@@ -273,40 +272,40 @@ const StyledTimeSince = styled(TimeSince)`
273272

274273
const EventInfoJumpToWrapper = styled('div')<{hasProcessingError: boolean}>`
275274
display: grid;
276-
gap: ${space(1)};
275+
gap: ${p => p.theme.space.md};
277276
grid-template-columns: 1fr auto;
278277
align-items: center;
279-
padding: 0 ${space(2)};
278+
padding: 0 ${p => p.theme.space.lg};
280279
min-height: ${MIN_NAV_HEIGHT}px;
281280
border-bottom: 1px solid ${p => p.theme.translucentBorder};
282281
283282
@media (max-width: ${p =>
284283
p.hasProcessingError ? p.theme.breakpoints.lg : p.theme.breakpoints.sm}) {
285284
grid-template-columns: 1fr;
286-
gap: ${space(0.5)};
287-
padding: ${space(0.5)} ${space(2)};
285+
gap: ${p => p.theme.space.xs};
286+
padding: ${p => p.theme.space.xs} ${p => p.theme.space.xl};
288287
}
289288
`;
290289

291290
const EventInfo = styled('div')`
292291
display: flex;
293-
gap: ${space(0.75)};
292+
gap: ${p => p.theme.space.sm};
294293
flex-direction: row;
295294
align-items: center;
296295
line-height: 1.2;
297296
298297
@media (max-width: ${p => p.theme.breakpoints.sm}) {
299-
padding-top: ${space(1)};
298+
padding-top: ${p => p.theme.space.md};
300299
}
301300
`;
302301

303302
const JumpToLabel = styled('div')`
304-
margin-top: ${space(0.25)};
303+
margin-top: ${p => p.theme.space['2xs']};
305304
`;
306305

307306
const JumpTo = styled('div')`
308307
display: flex;
309-
gap: ${space(0.5)};
308+
gap: ${p => p.theme.space.xs};
310309
flex-direction: row;
311310
align-items: center;
312311
color: ${p => p.theme.subText};
@@ -327,7 +326,7 @@ const ProcessingErrorButton = styled(Button)`
327326
const JsonLinkWrapper = styled('div')`
328327
display: flex;
329328
align-items: center;
330-
gap: ${space(0.5)};
329+
gap: ${p => p.theme.space.xs};
331330
`;
332331

333332
const JsonLink = styled(ExternalLink)`
@@ -362,7 +361,7 @@ const MarkdownButton = styled('button')`
362361

363362
const EventIdWrapper = styled('div')`
364363
display: flex;
365-
gap: ${space(0.25)};
364+
gap: ${p => p.theme.space['2xs']};
366365
align-items: center;
367366
font-weight: ${p => p.theme.fontWeight.bold};
368367
white-space: nowrap;

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ const NavigationSidebarWrapper = withChonk(
132132
display: flex;
133133
padding: ${p =>
134134
p.hasToggleSidebar
135-
? `${space(1)} 0 ${space(0.5)} ${space(1.5)}`
136-
: `10px ${space(1.5)} ${space(0.25)} ${space(1.5)}`};
135+
? `${p.theme.space.md} 0 ${p.theme.space.sm} ${p.theme.space['2xl']}`
136+
: `${p.theme.space.sm} ${p.theme.space['2xl']} ${p.theme.space.xs} ${p.theme.space['2xl']}`};
137137
`,
138138
chonkStyled('div')<{
139139
hasToggleSidebar: boolean;
@@ -143,12 +143,13 @@ const NavigationSidebarWrapper = withChonk(
143143
gap: ${space(0.5)};
144144
padding: ${p =>
145145
p.hasToggleSidebar
146-
? `${space(1)} 0 ${space(0.5)} ${space(1.5)}`
147-
: `10px ${space(1.5)} ${space(0.25)} ${space(1.5)}`};
146+
? `${p.theme.space.md} 0 ${p.theme.space.sm} ${p.theme.space['2xl']}`
147+
: `${p.theme.space.sm} ${p.theme.space['2xl']} ${p.theme.space.xs} ${p.theme.space['2xl']}`};
148148
`
149149
);
150150

151151
const ContentPadding = styled('div')`
152152
min-height: 100vh;
153-
padding: 0 ${space(1.5)} ${space(1.5)} ${space(1.5)};
153+
padding: 0 ${p => p.theme.space['2xl']} ${p => p.theme.space['2xl']}
154+
${p => p.theme.space['2xl']};
154155
`;

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default function StreamlinedGroupHeader({
121121
<Header>
122122
<Flex justify="between">
123123
<Flex align="center" gap="md">
124-
<Breadcrumbs
124+
<StyledBreadcrumbs
125125
crumbs={[
126126
{
127127
label: 'Issues',
@@ -314,7 +314,7 @@ export default function StreamlinedGroupHeader({
314314

315315
const Header = styled('header')`
316316
background-color: ${p => p.theme.background};
317-
padding: ${space(1)} 24px;
317+
padding: ${p => p.theme.space.md} ${p => p.theme.space['2xl']};
318318
`;
319319

320320
const HeaderGrid = styled('div')`
@@ -419,6 +419,10 @@ const Title = styled('div')`
419419
column-gap: ${p => p.theme.space.sm};
420420
`;
421421

422+
const StyledBreadcrumbs = styled(Breadcrumbs)`
423+
padding: 0;
424+
`;
425+
422426
const StyledTag = styled(Tag)`
423427
@media (max-width: ${p => p.theme.breakpoints.xs}) {
424428
display: none;

static/app/views/issueDetails/streamline/sidebar/toggleSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function ToggleSidebar({size = 'lg'}: {size?: 'lg' | 'sm'}) {
4545
const ToggleContainer = styled('div')<{sidebarOpen: boolean}>`
4646
width: ${p => (p.theme.isChonk ? undefined : p.sidebarOpen ? '30px' : '50px')};
4747
position: relative;
48-
margin-right: -${p => p.theme.space.lg};
48+
margin-right: -${p => p.theme.space['2xl']};
4949
@media (max-width: ${p => p.theme.breakpoints.lg}) {
5050
display: none;
5151
}

0 commit comments

Comments
 (0)