Skip to content

Commit d905eaf

Browse files
authored
chevron: remove custom chevron (#88675)
Removes custom chevron components, as it does not fit well with the rest of the dashboard. It also means that we have two ways to use a chevron, and given that nobody knows the difference, we end up with different chevrons in the app. There are also other issues with animations that make this feel odd, as the dropwdowns open without a transition while the chevron still animates long after the dropdown is open. https://github.com/user-attachments/assets/7eb3f6ed-c468-406f-8142-87b46e825345 Also fixes a small issue where the chevrons are using a different color ![CleanShot 2025-04-03 at 11 16 59@2x](https://github.com/user-attachments/assets/2576db26-67bc-49a8-9926-cfbbc7e382a0)
1 parent 6e2436e commit d905eaf

File tree

20 files changed

+53
-66
lines changed

20 files changed

+53
-66
lines changed

static/app/components/actions/archive.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import styled from '@emotion/styled';
22

33
import {getIgnoreActions} from 'sentry/components/actions/ignore';
4-
import {Chevron} from 'sentry/components/chevron';
54
import {openConfirmModal} from 'sentry/components/confirm';
65
import {Button} from 'sentry/components/core/button';
76
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
87
import type {MenuItemProps} from 'sentry/components/dropdownMenu';
98
import {DropdownMenu} from 'sentry/components/dropdownMenu';
109
import ExternalLink from 'sentry/components/links/externalLink';
10+
import {IconChevron} from 'sentry/icons';
1111
import {t, tct} from 'sentry/locale';
1212
import type {GroupStatusResolution} from 'sentry/types/group';
1313
import {GroupStatus, GroupSubstatus} from 'sentry/types/group';
@@ -162,12 +162,7 @@ function ArchiveActions({
162162
aria-label={t('Archive options')}
163163
size={size}
164164
icon={
165-
<Chevron
166-
light
167-
color="subText"
168-
weight="medium"
169-
direction={isOpen ? 'up' : 'down'}
170-
/>
165+
<IconChevron color="subText" direction={isOpen ? 'up' : 'down'} size="xs" />
171166
}
172167
disabled={disabled}
173168
/>

static/app/components/actions/resolve.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {css} from '@emotion/react';
33
import styled from '@emotion/styled';
44

55
import {openModal} from 'sentry/actionCreators/modal';
6-
import {Chevron} from 'sentry/components/chevron';
76
import {openConfirmModal} from 'sentry/components/confirm';
87
import {Button, LinkButton} from 'sentry/components/core/button';
98
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
@@ -12,7 +11,7 @@ import CustomResolutionModal from 'sentry/components/customResolutionModal';
1211
import type {MenuItemProps} from 'sentry/components/dropdownMenu';
1312
import {DropdownMenu} from 'sentry/components/dropdownMenu';
1413
import {Tooltip} from 'sentry/components/tooltip';
15-
import {IconReleases} from 'sentry/icons';
14+
import {IconChevron, IconReleases} from 'sentry/icons';
1615
import {t} from 'sentry/locale';
1716
import {space} from 'sentry/styles/space';
1817
import type {GroupStatusResolution, ResolvedStatusDetails} from 'sentry/types/group';
@@ -272,14 +271,7 @@ function ResolveActions({
272271
size={size}
273272
priority={priority}
274273
aria-label={t('More resolve options')}
275-
icon={
276-
<Chevron
277-
light
278-
color="subText"
279-
weight="medium"
280-
direction={isOpen ? 'up' : 'down'}
281-
/>
282-
}
274+
icon={<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />}
283275
disabled={isDisabled}
284276
/>
285277
)}

static/app/components/assigneeBadge.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import {Fragment} from 'react';
22
import {type DO_NOT_USE_ChonkTheme, useTheme} from '@emotion/react';
33
import styled from '@emotion/styled';
44

5-
import {Chevron} from 'sentry/components/chevron';
65
import {ActorAvatar} from 'sentry/components/core/avatar/actorAvatar';
76
import {Tag} from 'sentry/components/core/badge/tag';
87
import ExternalLink from 'sentry/components/links/externalLink';
98
import LoadingIndicator from 'sentry/components/loadingIndicator';
109
import Placeholder from 'sentry/components/placeholder';
1110
import {Tooltip} from 'sentry/components/tooltip';
11+
import {IconChevron} from 'sentry/icons';
1212
import {t, tct} from 'sentry/locale';
1313
import {space} from 'sentry/styles/space';
1414
import type {Actor} from 'sentry/types/core';
@@ -66,7 +66,7 @@ export function AssigneeBadge({
6666
style={{color: theme.textColor}}
6767
>{`${actor.type === 'team' ? '#' : ''}${actor.name}`}</div>
6868
)}
69-
<Chevron light color="subText" direction={chevronDirection} size="small" />
69+
<IconChevron color="subText" direction={chevronDirection} size="xs" />
7070
</Fragment>
7171
);
7272
};
@@ -75,7 +75,7 @@ export function AssigneeBadge({
7575
<Fragment>
7676
<StyledLoadingIndicator mini relative size={AVATAR_SIZE} />
7777
{showLabel && 'Loading...'}
78-
<Chevron light color="subText" direction={chevronDirection} size="small" />
78+
<IconChevron color="subText" direction={chevronDirection} size="xs" />
7979
</Fragment>
8080
);
8181

@@ -88,7 +88,7 @@ export function AssigneeBadge({
8888
height={`${AVATAR_SIZE}px`}
8989
/>
9090
{showLabel && <Fragment>Unassigned</Fragment>}
91-
<Chevron light color="subText" direction={chevronDirection} size="small" />
91+
<IconChevron color="subText" direction={chevronDirection} size="xs" />
9292
</Fragment>
9393
);
9494

static/app/components/badge/groupPriority.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import bannerStar from 'sentry-images/spot/banner-star.svg';
66

77
import {usePrompt} from 'sentry/actionCreators/prompts';
88
import {IconCellSignal} from 'sentry/components/badge/iconCellSignal';
9-
import {Chevron} from 'sentry/components/chevron';
109
import {Tag} from 'sentry/components/core/badge/tag';
1110
import {Button, LinkButton} from 'sentry/components/core/button';
1211
import type {MenuItemProps} from 'sentry/components/dropdownMenu';
@@ -15,7 +14,7 @@ import {DropdownMenuFooter} from 'sentry/components/dropdownMenu/footer';
1514
import HookOrDefault from 'sentry/components/hookOrDefault';
1615
import Placeholder from 'sentry/components/placeholder';
1716
import {Tooltip} from 'sentry/components/tooltip';
18-
import {IconClose} from 'sentry/icons';
17+
import {IconChevron, IconClose} from 'sentry/icons';
1918
import {t, tct} from 'sentry/locale';
2019
import {space} from 'sentry/styles/space';
2120
import type {Activity} from 'sentry/types/group';
@@ -206,7 +205,7 @@ export function GroupPriorityDropdown({
206205
size="zero"
207206
>
208207
<GroupPriorityBadge showLabel={false} priority={value}>
209-
<Chevron light direction={isOpen ? 'up' : 'down'} size="small" />
208+
<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" color="subText" />
210209
</GroupPriorityBadge>
211210
</DropdownButton>
212211
)}

static/app/components/core/select/index.chonk.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import type {DO_NOT_USE_ChonkTheme} from '@emotion/react';
22
import omit from 'lodash/omit';
33

4-
import {Chevron} from 'sentry/components/chevron';
54
import {Button} from 'sentry/components/core/button';
65
import type {StylesConfig as ReactSelectStylesConfig} from 'sentry/components/forms/controls/reactSelectWrapper';
76
import {components as selectComponents} from 'sentry/components/forms/controls/reactSelectWrapper';
8-
import {IconClose} from 'sentry/icons';
7+
import {IconChevron, IconClose} from 'sentry/icons';
98
import {t} from 'sentry/locale';
109
import {space} from 'sentry/styles/space';
1110
import type {FormSize} from 'sentry/utils/theme';
@@ -257,7 +256,7 @@ export function ChonkDropdownIndicator(
257256
) {
258257
return (
259258
<selectComponents.DropdownIndicator {...props}>
260-
<Chevron direction="down" size="medium" />
259+
<IconChevron direction="down" size="xs" />
261260
</selectComponents.DropdownIndicator>
262261
);
263262
}

static/app/components/core/select/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {useTheme} from '@emotion/react';
77
import styled from '@emotion/styled';
88
import omit from 'lodash/omit';
99

10-
import {Chevron} from 'sentry/components/chevron';
1110
import {
1211
ChonkClearIndicator,
1312
ChonkDropdownIndicator,
@@ -27,7 +26,7 @@ import {
2726
ReactSelect,
2827
} from 'sentry/components/forms/controls/reactSelectWrapper';
2928
import LoadingIndicator from 'sentry/components/loadingIndicator';
30-
import {IconClose} from 'sentry/icons';
29+
import {IconChevron, IconClose} from 'sentry/icons';
3130
import {t} from 'sentry/locale';
3231
import {space} from 'sentry/styles/space';
3332
import type {Choices, SelectValue} from 'sentry/types/core';
@@ -70,7 +69,7 @@ function DropdownIndicator(
7069
) {
7170
return (
7271
<selectComponents.DropdownIndicator {...props}>
73-
<Chevron light color="subText" direction="down" size="medium" />
72+
<IconChevron color="subText" direction="down" size="xs" />
7473
</selectComponents.DropdownIndicator>
7574
);
7675
}

static/app/components/dropdownButton.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import styled from '@emotion/styled';
22

3-
import {Chevron} from 'sentry/components/chevron';
43
import type {ButtonProps} from 'sentry/components/core/button';
54
import {Button, ButtonLabel} from 'sentry/components/core/button';
5+
import {IconChevron} from 'sentry/icons';
66
import {space} from 'sentry/styles/space';
77

88
export interface DropdownButtonProps extends Omit<ButtonProps, 'type' | 'prefix'> {
@@ -49,13 +49,10 @@ function DropdownButton({
4949
{children}
5050
{showChevron && (
5151
<ChevronWrap>
52-
<Chevron
53-
light
52+
<IconChevron
5453
color="subText"
55-
size={size === 'xs' ? 'small' : 'medium'}
56-
weight="medium"
5754
direction={isOpen ? 'up' : 'down'}
58-
aria-hidden="true"
55+
size={size === 'zero' || size === 'xs' ? 'xs' : 'sm'}
5956
/>
6057
</ChevronWrap>
6158
)}

static/app/components/events/interfaces/frame/deprecatedLine.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import styled from '@emotion/styled';
44
import classNames from 'classnames';
55

66
import {openModal} from 'sentry/actionCreators/modal';
7-
import {Chevron} from 'sentry/components/chevron';
87
import {Tag} from 'sentry/components/core/badge/tag';
98
import {Button} from 'sentry/components/core/button';
109
import ErrorBoundary from 'sentry/components/errorBoundary';
@@ -16,7 +15,7 @@ import {SourceMapsDebuggerModal} from 'sentry/components/events/interfaces/sourc
1615
import {getThreadById} from 'sentry/components/events/interfaces/utils';
1716
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
1817
import StrictClick from 'sentry/components/strictClick';
19-
import {IconFix, IconRefresh} from 'sentry/icons';
18+
import {IconChevron, IconFix, IconRefresh} from 'sentry/icons';
2019
import {t, tn} from 'sentry/locale';
2120
import {space} from 'sentry/styles/space';
2221
import type {Event, Frame} from 'sentry/types/event';
@@ -322,7 +321,7 @@ function DeprecatedLine({
322321
onClick={toggleContext}
323322
borderless
324323
>
325-
<Chevron direction={isExpanded ? 'up' : 'down'} size="medium" />
324+
<IconChevron direction={isExpanded ? 'up' : 'down'} size="sm" />
326325
</ToggleContextButton>
327326
) : (
328327
<div style={{width: 20, height: 20}} />

static/app/components/events/interfaces/nativeFrame.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import type {MouseEvent} from 'react';
22
import {Fragment, useContext, useState} from 'react';
33
import styled from '@emotion/styled';
44

5-
import {Chevron} from 'sentry/components/chevron';
65
import {Tag} from 'sentry/components/core/badge/tag';
76
import {Button} from 'sentry/components/core/button';
87
import ErrorBoundary from 'sentry/components/errorBoundary';
@@ -24,6 +23,7 @@ import InteractionStateLayer from 'sentry/components/interactionStateLayer';
2423
import StrictClick from 'sentry/components/strictClick';
2524
import {Tooltip} from 'sentry/components/tooltip';
2625
import {SLOW_TOOLTIP_DELAY} from 'sentry/constants';
26+
import {IconChevron} from 'sentry/icons';
2727
import {IconFileBroken} from 'sentry/icons/iconFileBroken';
2828
import {IconRefresh} from 'sentry/icons/iconRefresh';
2929
import {IconWarning} from 'sentry/icons/iconWarning';
@@ -419,7 +419,7 @@ function NativeFrame({
419419
size="zero"
420420
borderless
421421
aria-label={expanded ? t('Collapse Context') : t('Expand Context')}
422-
icon={<Chevron size="medium" direction={expanded ? 'up' : 'down'} />}
422+
icon={<IconChevron size="sm" direction={expanded ? 'up' : 'down'} />}
423423
/>
424424
)}
425425
</ExpandCell>

static/app/components/group/assignedTo.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {openIssueOwnershipRuleModal} from 'sentry/actionCreators/modal';
77
import Access from 'sentry/components/acl/access';
88
import AssigneeSelectorDropdown from 'sentry/components/assigneeSelectorDropdown';
99
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
10-
import {Chevron} from 'sentry/components/chevron';
1110
import {ActorAvatar} from 'sentry/components/core/avatar/actorAvatar';
1211
import {Button} from 'sentry/components/core/button';
1312
import {
@@ -16,7 +15,7 @@ import {
1615
} from 'sentry/components/group/assigneeSelector';
1716
import LoadingIndicator from 'sentry/components/loadingIndicator';
1817
import * as SidebarSection from 'sentry/components/sidebarSection';
19-
import {IconSettings, IconUser} from 'sentry/icons';
18+
import {IconChevron, IconSettings, IconUser} from 'sentry/icons';
2019
import {t} from 'sentry/locale';
2120
import MemberListStore from 'sentry/stores/memberListStore';
2221
import TeamStore from 'sentry/stores/teamStore';
@@ -256,9 +255,9 @@ function AssignedTo({
256255
<ActorName>{getAssignedToDisplayName(group) ?? t('No one')}</ActorName>
257256
</ActorWrapper>
258257
{!disableDropdown && (
259-
<Chevron
258+
<IconChevron
260259
data-test-id="assigned-to-chevron-icon"
261-
size="large"
260+
size="md"
262261
direction={isOpen ? 'up' : 'down'}
263262
/>
264263
)}

static/app/components/onboardingWizard/content.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import partition from 'lodash/partition';
77
import {openHelpSearchModal} from 'sentry/actionCreators/modal';
88
import {navigateTo} from 'sentry/actionCreators/navigation';
99
import {useUpdateOnboardingTasks} from 'sentry/actionCreators/onboardingTasks';
10-
import {Chevron} from 'sentry/components/chevron';
1110
import {Button} from 'sentry/components/core/button';
1211
import {DropdownMenu} from 'sentry/components/dropdownMenu';
1312
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
@@ -562,7 +561,7 @@ function TaskGroup({
562561
}
563562
actions={
564563
<Button
565-
icon={<Chevron direction={isExpanded ? 'up' : 'down'} />}
564+
icon={<IconChevron direction={isExpanded ? 'up' : 'down'} size="sm" />}
566565
aria-label={isExpanded ? t('Collapse') : t('Expand')}
567566
aria-expanded={isExpanded}
568567
size="zero"

static/app/components/sidebar/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import styled from '@emotion/styled';
55
import {hideSidebar, showSidebar} from 'sentry/actionCreators/preferences';
66
import Feature from 'sentry/components/acl/feature';
77
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
8-
import {Chevron} from 'sentry/components/chevron';
98
import FeatureFlagOnboardingSidebar from 'sentry/components/events/featureFlags/featureFlagOnboardingSidebar';
109
import FeedbackOnboardingSidebar from 'sentry/components/feedback/feedbackOnboarding/sidebar';
1110
import Hook from 'sentry/components/hook';
@@ -23,6 +22,7 @@ import {
2322
} from 'sentry/components/sidebar/expandedContextProvider';
2423
import {OnboardingStatus} from 'sentry/components/sidebar/onboardingStatus';
2524
import {
25+
IconChevron,
2626
IconDashboard,
2727
IconGraph,
2828
IconIssues,
@@ -582,7 +582,9 @@ function Sidebar() {
582582
id="collapse"
583583
data-test-id="sidebar-collapse"
584584
{...sidebarItemProps}
585-
icon={<Chevron direction={collapsed ? 'right' : 'left'} />}
585+
icon={
586+
<IconChevron direction={collapsed ? 'right' : 'left'} size="sm" />
587+
}
586588
label={collapsed ? t('Expand') : t('Collapse')}
587589
onClick={toggleCollapse}
588590
/>

static/app/components/sidebar/sidebarAccordion.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import {
99
import {useTheme} from '@emotion/react';
1010
import styled from '@emotion/styled';
1111

12-
import {Chevron} from 'sentry/components/chevron';
1312
import {Button} from 'sentry/components/core/button';
1413
import {Overlay} from 'sentry/components/overlay';
1514
import {
1615
SIDEBAR_COLLAPSED_WIDTH,
1716
SIDEBAR_MOBILE_HEIGHT,
1817
} from 'sentry/components/sidebar/constants';
1918
import {ExpandedContext} from 'sentry/components/sidebar/expandedContextProvider';
19+
import {IconChevron} from 'sentry/icons';
2020
import {t} from 'sentry/locale';
2121
import {space} from 'sentry/styles/space';
2222
import {useLocalStorageState} from 'sentry/utils/useLocalStorageState';
@@ -143,7 +143,11 @@ function SidebarAccordion({
143143
aria-label={expanded ? t('Collapse') : t('Expand')}
144144
sidebarCollapsed={sidebarCollapsed}
145145
>
146-
<Chevron direction={expanded ? 'up' : 'down'} role="presentation" />
146+
<IconChevron
147+
direction={expanded ? 'up' : 'down'}
148+
role="presentation"
149+
size="sm"
150+
/>
147151
</SidebarAccordionExpandButton>
148152
}
149153
/>

static/app/components/workflowEngine/form/control/priorityControl.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import {useCallback, useState} from 'react';
22
import styled from '@emotion/styled';
33

44
import {GroupPriorityBadge} from 'sentry/components/badge/groupPriority';
5-
import {Chevron} from 'sentry/components/chevron';
65
import {Flex} from 'sentry/components/container/flex';
76
import {CompactSelect, type SelectOption} from 'sentry/components/core/compactSelect';
87
import {FieldWrapper} from 'sentry/components/forms/fieldGroup/fieldWrapper';
98
import NumberField from 'sentry/components/forms/fields/numberField';
109
import InteractionStateLayer from 'sentry/components/interactionStateLayer';
11-
import {IconArrow} from 'sentry/icons';
10+
import {IconArrow, IconChevron} from 'sentry/icons';
1211
import {t} from 'sentry/locale';
1312
import {space} from 'sentry/styles/space';
1413
import {PriorityLevel} from 'sentry/types/group';
@@ -166,7 +165,7 @@ function PrioritySelect({
166165
<EmptyButton {...props}>
167166
<GroupPriorityBadge showLabel priority={value}>
168167
<InteractionStateLayer isPressed={isOpen} />
169-
<Chevron light direction={isOpen ? 'up' : 'down'} size="small" />
168+
<IconChevron direction={isOpen ? 'up' : 'down'} size="xs" />
170169
</GroupPriorityBadge>
171170
</EmptyButton>
172171
);

static/app/icons/iconChevron.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function IconChevron({isDouble, isCircled, direction = 'up', ...props}: Props) {
6969
css={
7070
direction
7171
? css`
72-
transition: transform 120ms ease-in-out;
7372
transform: rotate(${theme.iconDirections[direction]}deg);
7473
`
7574
: undefined

0 commit comments

Comments
 (0)