Skip to content

Commit 945802f

Browse files
authored
trace: fix buttons in chonk (#91878)
Fixes chonk buttons in trace view Before ![CleanShot 2025-05-19 at 13 15 12@2x](https://github.com/user-attachments/assets/e0c424f8-db7b-4d42-975d-ff92df19aa0f) After ![CleanShot 2025-05-19 at 13 15 38@2x](https://github.com/user-attachments/assets/2244f5f1-0cb4-45a3-adef-9a156bbee7dc) Fixes DE-49
1 parent fcaa391 commit 945802f

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

static/app/views/performance/newTraceDetails/traceDrawer/details/styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ const ActionWrapper = styled('div')`
11561156
overflow: visible;
11571157
display: flex;
11581158
align-items: center;
1159-
gap: ${space(0.25)};
1159+
gap: ${space(0.5)};
11601160
`;
11611161

11621162
function EventTags({projectSlug, event}: {event: Event; projectSlug: string}) {

static/app/views/performance/newTraceDetails/traceDrawer/traceDrawer.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -700,26 +700,23 @@ function TabPinButton(props: {
700700
pinned: boolean;
701701
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
702702
}) {
703+
const theme = useTheme();
703704
return (
704-
<PinButton
705-
size="zero"
705+
<StyledButton
706706
data-test-id="trace-drawer-tab-pin-button"
707+
size="zero"
707708
onClick={props.onClick}
708-
>
709-
<StyledIconPin size="xs" isSolid={props.pinned} />
710-
</PinButton>
709+
// @ts-expect-error transparent is not supported in legacy button
710+
priority={theme.isChonk ? 'transparent' : 'default'}
711+
aria-label={props.pinned ? t('Unpin Tab') : t('Pin Tab')}
712+
icon={<StyledIconPin size="xs" isSolid={props.pinned} />}
713+
/>
711714
);
712715
}
713716

714-
const PinButton = styled(Button)`
715-
padding: ${space(0.5)};
716-
margin: 0;
717-
background-color: transparent;
717+
const StyledButton = styled(Button)`
718718
border: none;
719-
720-
&:hover {
721-
background-color: transparent;
722-
}
719+
box-shadow: none;
723720
`;
724721

725722
const StyledIconPin = styled(IconPin)`

0 commit comments

Comments
 (0)