Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 9 additions & 37 deletions static/app/components/organizations/projectPageFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ import partition from 'lodash/partition';
import sortBy from 'lodash/sortBy';

import {updateProjects} from 'sentry/actionCreators/pageFilters';
import Feature from 'sentry/components/acl/feature';
import FeatureDisabled from 'sentry/components/acl/featureDisabled';
import {LinkButton} from 'sentry/components/core/button/linkButton';
import type {
SelectOption,
SelectOptionOrSection,
} from 'sentry/components/core/compactSelect';
import {Hovercard} from 'sentry/components/hovercard';
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
import type {HybridFilterProps} from 'sentry/components/organizations/hybridFilter';
import {HybridFilter} from 'sentry/components/organizations/hybridFilter';
import {DesyncedFilterMessage} from 'sentry/components/organizations/pageFilters/desyncedFilter';
import BookmarkStar from 'sentry/components/projects/bookmarkStar';
import {ALL_ACCESS_PROJECTS} from 'sentry/constants/pageFilters';
import {IconOpen, IconSettings} from 'sentry/icons';
import {IconAdd, IconOpen, IconSettings} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import type {Project} from 'sentry/types/project';
import {trackAnalytics} from 'sentry/utils/analytics';
Expand All @@ -32,7 +29,6 @@ import {useRoutes} from 'sentry/utils/useRoutes';
import {useUser} from 'sentry/utils/useUser';
import {makeProjectsPathname} from 'sentry/views/projects/pathname';

import {ProjectPageFilterMenuFooter} from './menuFooter';
import {ProjectPageFilterTrigger} from './trigger';

export interface ProjectPageFilterProps
Expand Down Expand Up @@ -416,10 +412,14 @@ export function ProjectPageFilter({
menuBody={desynced && <DesyncedFilterMessage />}
menuFooter={
hasProjectWrite && (
<ProjectPageFilterMenuFooter
handleChange={handleChange}
showNonMemberProjects={showNonMemberProjects}
/>
<LinkButton
size="xs"
aria-label={t('Add Project')}
to={makeProjectsPathname({path: '/new/', organization})}
icon={<IconAdd isCircled />}
>
{t('Project')}
</LinkButton>
)
}
menuFooterMessage={menuFooterMessage}
Expand All @@ -438,7 +438,6 @@ export function ProjectPageFilter({
/>
))
}
checkboxWrapper={checkboxWrapper}
shouldCloseOnInteractOutside={shouldCloseOnInteractOutside}
/>
);
Expand All @@ -453,33 +452,6 @@ function shouldCloseOnInteractOutside(target: Element) {
return !powerHovercard && !disabledFeatureHovercard;
}

function checkboxWrapper(
renderCheckbox: Parameters<NonNullable<HybridFilterProps<number>['checkboxWrapper']>>[0]
) {
return (
<Feature
features="organizations:global-views"
hookName="feature-disabled:project-selector-checkbox"
renderDisabled={props => (
<Hovercard
body={
<FeatureDisabled
features={props.features}
hideHelpToggle
featureName={t('Multiple Project Selection')}
/>
}
data-test-id="disabled-feature-hovercard"
>
{typeof props.children === 'function' ? props.children(props) : props.children}
</Hovercard>
)}
>
{({hasFeature}) => renderCheckbox({disabled: !hasFeature})}
</Feature>
);
}

const TrailingButton = styled(LinkButton)<{visible: boolean}>`
color: ${p => p.theme.subText};
display: ${p => (p.visible ? 'block' : 'none')};
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions static/app/types/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ export type FeatureDisabledHooks = {
'feature-disabled:profiling-page': FeatureDisabledHook;
'feature-disabled:profiling-sidebar-item': FeatureDisabledHook;
'feature-disabled:project-performance-score-card': FeatureDisabledHook;
'feature-disabled:project-selector-all-projects': FeatureDisabledHook;
'feature-disabled:project-selector-checkbox': FeatureDisabledHook;
'feature-disabled:rate-limits': FeatureDisabledHook;
'feature-disabled:replay-sidebar-item': FeatureDisabledHook;
'feature-disabled:sso-basic': FeatureDisabledHook;
Expand Down
65 changes: 0 additions & 65 deletions static/gsApp/components/features/disabledAllProjectsSelect.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions static/gsApp/registerHooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import DataConsentBanner from 'getsentry/components/dataConsentBanner';
import DataConsentOrgCreationCheckbox from 'getsentry/components/dataConsentCheckbox';
import DataConsentPriorityLearnMore from 'getsentry/components/dataConsentPriorityLearnMore';
import DisabledAlertWizard from 'getsentry/components/features/disabledAlertWizard';
import DisabledAllProjectsSelect from 'getsentry/components/features/disabledAllProjectsSelect';
import DisabledAuthProvider from 'getsentry/components/features/disabledAuthProvider';
import DisabledCustomInboundFilters from 'getsentry/components/features/disabledCustomInboundFilters';
import DisabledDataForwarding from 'getsentry/components/features/disabledDataForwarding';
Expand Down Expand Up @@ -310,16 +309,6 @@ const GETSENTRY_HOOKS: Partial<Hooks> = {
{typeof p.children === 'function' ? p.children(p) : p.children}
</ProjectPerformanceScoreCard>
),
'feature-disabled:project-selector-checkbox': p => (
<PowerFeatureHovercard features={['organizations:global-views']} id="global-views">
{typeof p.children === 'function' ? p.children(p) : p.children}
</PowerFeatureHovercard>
),
'feature-disabled:project-selector-all-projects': p => (
<DisabledAllProjectsSelect {...p}>
{typeof p.children === 'function' ? p.children(p) : p.children}
</DisabledAllProjectsSelect>
),
'feature-disabled:open-discover': p => (
<PowerFeatureHovercard features={['organizations:discover-basic']} id="open-discover">
{typeof p.children === 'function' ? p.children(p) : p.children}
Expand Down
Loading