Skip to content

Commit a1c3e45

Browse files
authored
fix(sidebar): Identical view buttons for the sections (#83858)
All three sections, activity, merged, similar issues all have the same buttons. Gonna handle the solutions hub changes separately. <img width="337" alt="image" src="https://github.com/user-attachments/assets/2fa4df19-09bf-4bee-8a48-86ec61fbede9" />
1 parent c4755c9 commit a1c3e45

File tree

4 files changed

+28
-34
lines changed

4 files changed

+28
-34
lines changed

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

+3-10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {groupActivityTypeIconMapping} from 'sentry/views/issueDetails/streamline
3030
import getGroupActivityItem from 'sentry/views/issueDetails/streamline/sidebar/groupActivityItem';
3131
import {NoteDropdown} from 'sentry/views/issueDetails/streamline/sidebar/noteDropdown';
3232
import {SidebarSectionTitle} from 'sentry/views/issueDetails/streamline/sidebar/sidebar';
33+
import {ViewButton} from 'sentry/views/issueDetails/streamline/sidebar/viewButton';
3334
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
3435
import {useGroupDetailsRoute} from 'sentry/views/issueDetails/useGroupDetailsRoute';
3536

@@ -225,9 +226,7 @@ export default function StreamlinedActivitySection({
225226
{!isDrawer && (
226227
<Flex justify="space-between" align="center">
227228
<SidebarSectionTitle>{t('Activity')}</SidebarSectionTitle>
228-
<TextLinkButton
229-
borderless
230-
size="zero"
229+
<ViewButton
231230
aria-label={t('Open activity drawer')}
232231
to={{
233232
pathname: `${baseUrl}${TabPaths[Tab.ACTIVITY]}`,
@@ -243,7 +242,7 @@ export default function StreamlinedActivitySection({
243242
}}
244243
>
245244
{t('View')}
246-
</TextLinkButton>
245+
</ViewButton>
247246
</Flex>
248247
)}
249248
<Timeline.Container>
@@ -336,12 +335,6 @@ const Timestamp = styled(TimeSince)`
336335
white-space: nowrap;
337336
`;
338337

339-
const TextLinkButton = styled(LinkButton)`
340-
font-weight: ${p => p.theme.fontWeightNormal};
341-
font-size: ${p => p.theme.fontSizeSmall};
342-
color: ${p => p.theme.subText};
343-
`;
344-
345338
const RotatedEllipsisIcon = styled(IconEllipsis)`
346339
transform: rotate(90deg) translateY(1px);
347340
`;
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import styled from '@emotion/styled';
2-
3-
import {LinkButton} from 'sentry/components/button';
41
import {Flex} from 'sentry/components/container/flex';
52
import {t} from 'sentry/locale';
63
import {useLocation} from 'sentry/utils/useLocation';
74
import {SidebarSectionTitle} from 'sentry/views/issueDetails/streamline/sidebar/sidebar';
5+
import {ViewButton} from 'sentry/views/issueDetails/streamline/sidebar/viewButton';
86
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
97
import {useGroupDetailsRoute} from 'sentry/views/issueDetails/useGroupDetailsRoute';
108

@@ -15,23 +13,16 @@ export function MergedIssuesSidebarSection() {
1513
return (
1614
<Flex justify="space-between" align="center">
1715
<SidebarSectionTitle style={{margin: 0}}>{t('Merged Issues')}</SidebarSectionTitle>
18-
<SectionButton
16+
<ViewButton
1917
aria-label={t('View Merged Issues')}
20-
priority="link"
21-
size="zero"
2218
to={{
2319
pathname: `${baseUrl}${TabPaths[Tab.MERGED]}`,
2420
query: location.query,
2521
replace: true,
2622
}}
2723
>
2824
{t('View')}
29-
</SectionButton>
25+
</ViewButton>
3026
</Flex>
3127
);
3228
}
33-
34-
const SectionButton = styled(LinkButton)`
35-
color: ${p => p.theme.subText};
36-
line-height: 1;
37-
`;
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import styled from '@emotion/styled';
2-
3-
import {LinkButton} from 'sentry/components/button';
41
import {Flex} from 'sentry/components/container/flex';
52
import {t} from 'sentry/locale';
63
import {useLocation} from 'sentry/utils/useLocation';
74
import {SidebarSectionTitle} from 'sentry/views/issueDetails/streamline/sidebar/sidebar';
5+
import {ViewButton} from 'sentry/views/issueDetails/streamline/sidebar/viewButton';
86
import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
97
import {useGroupDetailsRoute} from 'sentry/views/issueDetails/useGroupDetailsRoute';
108

@@ -15,23 +13,16 @@ export function SimilarIssuesSidebarSection() {
1513
return (
1614
<Flex justify="space-between" align="center">
1715
<SidebarSectionTitle style={{margin: 0}}>{t('Similar Issues')}</SidebarSectionTitle>
18-
<SectionButton
16+
<ViewButton
1917
aria-label={t('View Similar Issues')}
20-
priority="link"
21-
size="zero"
2218
to={{
2319
pathname: `${baseUrl}${TabPaths[Tab.SIMILAR_ISSUES]}`,
2420
query: location.query,
2521
replace: true,
2622
}}
2723
>
2824
{t('View')}
29-
</SectionButton>
25+
</ViewButton>
3026
</Flex>
3127
);
3228
}
33-
34-
const SectionButton = styled(LinkButton)`
35-
color: ${p => p.theme.subText};
36-
line-height: 1;
37-
`;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import styled from '@emotion/styled';
2+
3+
import {LinkButton, type LinkButtonProps} from 'sentry/components/button';
4+
import {space} from 'sentry/styles/space';
5+
6+
export function ViewButton({children, ...props}: LinkButtonProps) {
7+
return (
8+
<TextButton borderless size="zero" {...props}>
9+
{children}
10+
</TextButton>
11+
);
12+
}
13+
14+
const TextButton = styled(LinkButton)`
15+
font-weight: ${p => p.theme.fontWeightNormal};
16+
font-size: ${p => p.theme.fontSizeSmall};
17+
color: ${p => p.theme.subText};
18+
padding: ${space(0.25)} ${space(0.5)};
19+
`;

0 commit comments

Comments
 (0)