|
@@ -12,11 +12,14 @@ import SelectedGroupStore from 'sentry/stores/selectedGroupStore';
|
|
|
import {useLegacyStore} from 'sentry/stores/useLegacyStore';
|
|
|
import space from 'sentry/styles/space';
|
|
|
import {Group, PageFilters, ResolutionStatusDetails} from 'sentry/types';
|
|
|
+import theme from 'sentry/utils/theme';
|
|
|
import useApi from 'sentry/utils/useApi';
|
|
|
+import useMedia from 'sentry/utils/useMedia';
|
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
|
|
|
|
import ActionSet from './actionSet';
|
|
|
import Headers from './headers';
|
|
|
+import IssueListSortOptions from './sortOptions';
|
|
|
import {
|
|
|
BULK_LIMIT,
|
|
|
BULK_LIMIT_STR,
|
|
@@ -68,6 +71,8 @@ function IssueListActions({
|
|
|
setAllInQuerySelected,
|
|
|
} = useSelectedGroupsState();
|
|
|
|
|
|
+ const disableActions = useMedia(`(max-width: ${theme.breakpoints.small})`);
|
|
|
+
|
|
|
const numIssues = selectedIdsSet.size;
|
|
|
|
|
|
function actionSelectedGroups(callback: (itemIds: string[] | undefined) => void) {
|
|
@@ -186,31 +191,36 @@ function IssueListActions({
|
|
|
return (
|
|
|
<Sticky>
|
|
|
<StyledFlex>
|
|
|
- <ActionsCheckbox isReprocessingQuery={displayReprocessingActions}>
|
|
|
- <Checkbox
|
|
|
- onChange={() => SelectedGroupStore.toggleSelectAll()}
|
|
|
- checked={pageSelected || (anySelected ? 'indeterminate' : false)}
|
|
|
- disabled={displayReprocessingActions}
|
|
|
- />
|
|
|
- </ActionsCheckbox>
|
|
|
+ {!disableActions && (
|
|
|
+ <ActionsCheckbox isReprocessingQuery={displayReprocessingActions}>
|
|
|
+ <Checkbox
|
|
|
+ onChange={() => SelectedGroupStore.toggleSelectAll()}
|
|
|
+ checked={pageSelected || (anySelected ? 'indeterminate' : false)}
|
|
|
+ disabled={displayReprocessingActions}
|
|
|
+ />
|
|
|
+ </ActionsCheckbox>
|
|
|
+ )}
|
|
|
{!displayReprocessingActions && (
|
|
|
- <ActionSet
|
|
|
- sort={sort}
|
|
|
- onSortChange={onSortChange}
|
|
|
- queryCount={queryCount}
|
|
|
- query={query}
|
|
|
- issues={selectedIdsSet}
|
|
|
- allInQuerySelected={allInQuerySelected}
|
|
|
- anySelected={anySelected}
|
|
|
- multiSelected={multiSelected}
|
|
|
- selectedProjectSlug={selectedProjectSlug}
|
|
|
- onShouldConfirm={action =>
|
|
|
- shouldConfirm(action, {pageSelected, selectedIdsSet})
|
|
|
- }
|
|
|
- onDelete={handleDelete}
|
|
|
- onMerge={handleMerge}
|
|
|
- onUpdate={handleUpdate}
|
|
|
- />
|
|
|
+ <HeaderButtonsWrapper>
|
|
|
+ {!disableActions && (
|
|
|
+ <ActionSet
|
|
|
+ queryCount={queryCount}
|
|
|
+ query={query}
|
|
|
+ issues={selectedIdsSet}
|
|
|
+ allInQuerySelected={allInQuerySelected}
|
|
|
+ anySelected={anySelected}
|
|
|
+ multiSelected={multiSelected}
|
|
|
+ selectedProjectSlug={selectedProjectSlug}
|
|
|
+ onShouldConfirm={action =>
|
|
|
+ shouldConfirm(action, {pageSelected, selectedIdsSet})
|
|
|
+ }
|
|
|
+ onDelete={handleDelete}
|
|
|
+ onMerge={handleMerge}
|
|
|
+ onUpdate={handleUpdate}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ <IssueListSortOptions sort={sort} query={query} onSelect={onSortChange} />
|
|
|
+ </HeaderButtonsWrapper>
|
|
|
)}
|
|
|
<Headers
|
|
|
onSelectStatsPeriod={onSelectStatsPeriod}
|
|
@@ -352,6 +362,19 @@ const ActionsCheckbox = styled('div')<{isReprocessingQuery: boolean}>`
|
|
|
${p => p.isReprocessingQuery && 'flex: 1'};
|
|
|
`;
|
|
|
|
|
|
+const HeaderButtonsWrapper = styled('div')`
|
|
|
+ @media (min-width: ${p => p.theme.breakpoints.large}) {
|
|
|
+ width: 50%;
|
|
|
+ }
|
|
|
+ flex: 1;
|
|
|
+ margin: 0 ${space(1)};
|
|
|
+ display: grid;
|
|
|
+ gap: ${space(0.5)};
|
|
|
+ grid-auto-flow: column;
|
|
|
+ justify-content: flex-start;
|
|
|
+ white-space: nowrap;
|
|
|
+`;
|
|
|
+
|
|
|
const SelectAllNotice = styled('div')`
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|