Skip to content

Commit b12b855

Browse files
authored
ref(explore): Move explore toolbar styles (#95994)
Move the styles into the explore/components folder to prepare shared components.
1 parent 0bdd770 commit b12b855

File tree

5 files changed

+23
-21
lines changed

5 files changed

+23
-21
lines changed

static/app/views/explore/toolbar/toolbarGroupBy.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ import {IconDelete} from 'sentry/icons/iconDelete';
1212
import {IconGrabbable} from 'sentry/icons/iconGrabbable';
1313
import {t} from 'sentry/locale';
1414
import {defined} from 'sentry/utils';
15+
import {
16+
ToolbarFooter,
17+
ToolbarFooterButton,
18+
ToolbarHeader,
19+
ToolbarLabel,
20+
ToolbarRow,
21+
ToolbarSection,
22+
} from 'sentry/views/explore/components/toolbar/styles';
1523
import {DragNDropContext} from 'sentry/views/explore/contexts/dragNDropContext';
1624
import {
1725
useExploreGroupBys,
@@ -22,15 +30,6 @@ import {useTraceItemTags} from 'sentry/views/explore/contexts/spanTagsContext';
2230
import type {Column} from 'sentry/views/explore/hooks/useDragNDropColumns';
2331
import {useGroupByFields} from 'sentry/views/explore/hooks/useGroupByFields';
2432

25-
import {
26-
ToolbarFooter,
27-
ToolbarFooterButton,
28-
ToolbarHeader,
29-
ToolbarLabel,
30-
ToolbarRow,
31-
ToolbarSection,
32-
} from './styles';
33-
3433
interface ToolbarGroupBy {
3534
autoSwitchToAggregates: boolean;
3635
}

static/app/views/explore/toolbar/toolbarSaveAs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import useOrganization from 'sentry/utils/useOrganization';
2626
import usePageFilters from 'sentry/utils/usePageFilters';
2727
import useProjects from 'sentry/utils/useProjects';
2828
import {Dataset} from 'sentry/views/alerts/rules/metric/types';
29+
import {ToolbarSection} from 'sentry/views/explore/components/toolbar/styles';
2930
import {
3031
useExploreFields,
3132
useExploreGroupBys,
@@ -40,7 +41,6 @@ import {useChartInterval} from 'sentry/views/explore/hooks/useChartInterval';
4041
import {useGetSavedQuery} from 'sentry/views/explore/hooks/useGetSavedQueries';
4142
import {useSaveQuery} from 'sentry/views/explore/hooks/useSaveQuery';
4243
import {generateExploreCompareRoute} from 'sentry/views/explore/multiQueryMode/locationUtils';
43-
import {ToolbarSection} from 'sentry/views/explore/toolbar/styles';
4444
import {getAlertsUrl} from 'sentry/views/insights/common/utils/getAlertsUrl';
4545

4646
export function ToolbarSaveAs() {

static/app/views/explore/toolbar/toolbarSortBy.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import {CompactSelect} from 'sentry/components/core/compactSelect';
66
import {Tooltip} from 'sentry/components/core/tooltip';
77
import {t} from 'sentry/locale';
88
import type {Sort} from 'sentry/utils/discover/fields';
9+
import {
10+
ToolbarHeader,
11+
ToolbarLabel,
12+
ToolbarRow,
13+
ToolbarSection,
14+
} from 'sentry/views/explore/components/toolbar/styles';
915
import {
1016
useExploreFields,
1117
useExploreGroupBys,
@@ -18,8 +24,6 @@ import {Mode} from 'sentry/views/explore/contexts/pageParamsContext/mode';
1824
import {useSortByFields} from 'sentry/views/explore/hooks/useSortByFields';
1925
import {Tab, useTab} from 'sentry/views/explore/hooks/useTab';
2026

21-
import {ToolbarHeader, ToolbarLabel, ToolbarRow, ToolbarSection} from './styles';
22-
2327
export function ToolbarSortBy() {
2428
const mode = useExploreMode();
2529
const fields = useExploreFields();

static/app/views/explore/toolbar/toolbarVisualize.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ import {
2121
FieldKind,
2222
getFieldDefinition,
2323
} from 'sentry/utils/fields';
24+
import {
25+
ToolbarFooter,
26+
ToolbarFooterButton,
27+
ToolbarHeader,
28+
ToolbarLabel,
29+
ToolbarRow,
30+
ToolbarSection,
31+
} from 'sentry/views/explore/components/toolbar/styles';
2432
import {
2533
useExploreVisualizes,
2634
useSetExploreVisualizes,
@@ -36,15 +44,6 @@ import {useTraceItemTags} from 'sentry/views/explore/contexts/spanTagsContext';
3644
import {useExploreSuggestedAttribute} from 'sentry/views/explore/hooks/useExploreSuggestedAttribute';
3745
import {useVisualizeFields} from 'sentry/views/explore/hooks/useVisualizeFields';
3846

39-
import {
40-
ToolbarFooter,
41-
ToolbarFooterButton,
42-
ToolbarHeader,
43-
ToolbarLabel,
44-
ToolbarRow,
45-
ToolbarSection,
46-
} from './styles';
47-
4847
interface ToolbarVisualizeProps {
4948
allowEquations: boolean;
5049
}

0 commit comments

Comments
 (0)