diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleActions.test.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleActions.test.tsx index 180690d01b25..75d70f6226e4 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleActions.test.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleActions.test.tsx @@ -7,9 +7,7 @@ import { testServerRoute, testServerSetup } from 'utils/testServer'; const server = testServerSetup(); test('all options are drawn', async () => { testServerRoute(server, '/api/admin/ui-config', { - flags: { - featuresExportImport: true, - }, + flags: {}, }); render( {}} />); diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx index 357baf83410e..83c3113e32e9 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListActions/FeatureToggleListActions.tsx @@ -13,15 +13,12 @@ import { import Add from '@mui/icons-material/Add'; import MoreVert from '@mui/icons-material/MoreVert'; import { Link } from 'react-router-dom'; -import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; -import { useUiFlag } from 'hooks/useUiFlag'; import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions'; import { PermissionHOC } from 'component/common/PermissionHOC/PermissionHOC'; import { useCreateFeaturePath } from 'component/feature/CreateFeatureButton/useCreateFeaturePath'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; -import IosShare from '@mui/icons-material/IosShare'; -const StyledActions = styled('div')(({ theme }) => ({ +const StyledActions = styled('div')((_) => ({ display: 'flex', justifyContent: 'center', })); @@ -35,12 +32,11 @@ interface IFeatureFlagListActions { onExportClick: () => void; } -export const FeatureToggleListActions: FC = ({ - onExportClick, -}: IFeatureFlagListActions) => { +export const FeatureToggleListActions: FC = ( + _: IFeatureFlagListActions, +) => { const { trackEvent } = usePlausibleTracker(); const [anchorEl, setAnchorEl] = useState(null); - const featuresExportImport = useUiFlag('featuresExportImport'); const createFeature = useCreateFeaturePath({ query: '', project: 'default', @@ -123,31 +119,6 @@ export const FeatureToggleListActions: FC = ({ )} - { - onExportClick(); - handleClose(); - trackEvent('search-feature-buttons', { - props: { - action: 'export', - }, - }); - }} - > - - - - - - Export - - - - } - /> diff --git a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx index 5cdfc5303488..12b5cfe8cfac 100644 --- a/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx +++ b/frontend/src/component/feature/FeatureToggleList/FeatureToggleListTable.tsx @@ -25,8 +25,6 @@ import { useFavoriteFeaturesApi } from 'hooks/api/actions/useFavoriteFeaturesApi import { FavoriteIconCell } from 'component/common/Table/cells/FavoriteIconCell/FavoriteIconCell'; import { FavoriteIconHeader } from 'component/common/Table/FavoriteIconHeader/FavoriteIconHeader'; import { useEnvironments } from 'hooks/api/getters/useEnvironments/useEnvironments'; -import { ExportDialog } from './ExportDialog'; -import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { focusable } from 'themes/themeStyles'; import { FeatureEnvironmentSeenCell } from 'component/common/Table/cells/FeatureSeenCell/FeatureEnvironmentSeenCell'; import useToast from 'hooks/useToast'; @@ -58,15 +56,11 @@ export const FeatureToggleListTable: VFC = () => { const featureSearchFeedback = useUiFlag('featureSearchFeedback'); const { trackEvent } = usePlausibleTracker(); const { environments } = useEnvironments(); - const enabledEnvironments = environments - .filter((env) => env.enabled) - .map((env) => env.name); const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg')); const [showExportDialog, setShowExportDialog] = useState(false); const { setToastApiError } = useToast(); - const { uiConfig } = useUiConfig(); const variant = featureSearchFeedback !== false @@ -429,17 +423,6 @@ export const FeatureToggleListTable: VFC = () => { } /> - setShowExportDialog(false)} - environments={enabledEnvironments} - /> - } - /> ); }; diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx index 69762f7eaa0f..29cae5987e05 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx @@ -1,12 +1,5 @@ import { type ReactNode, type FC, useState } from 'react'; -import { - Box, - Button, - IconButton, - Tooltip, - useMediaQuery, - useTheme, -} from '@mui/material'; +import { Box, Button, useMediaQuery, useTheme } from '@mui/material'; import useLoading from 'hooks/useLoading'; import { PageHeader } from 'component/common/PageHeader/PageHeader'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; @@ -18,14 +11,12 @@ import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton import { useSearchParams } from 'react-router-dom'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions'; -import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog'; import type { FeatureSchema } from 'openapi'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; import ReviewsOutlined from '@mui/icons-material/ReviewsOutlined'; import { useFeedback } from 'component/feedbackNew/useFeedback'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { CreateFeatureDialog } from './CreateFeatureDialog'; -import IosShare from '@mui/icons-material/IosShare'; import type { OverridableStringUnion } from '@mui/types'; import type { ButtonPropsVariantOverrides } from '@mui/material/Button/Button'; @@ -85,20 +76,11 @@ export const FlagCreationButton = ({ export const ProjectFeatureTogglesHeader: FC< IProjectFeatureTogglesHeaderProps -> = ({ - isLoading, - totalItems, - searchQuery, - onChangeSearchQuery, - environmentsToExport, - actions, -}) => { - const projectId = useRequiredPathParam('projectId'); +> = ({ isLoading, totalItems, searchQuery, onChangeSearchQuery, actions }) => { const headerLoadingRef = useLoading(isLoading || false); const [showTitle, setShowTitle] = useState(true); const theme = useTheme(); const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); - const featuresExportImportFlag = useUiFlag('featuresExportImport'); const [showExportDialog, setShowExportDialog] = useState(false); const { trackEvent } = usePlausibleTracker(); const projectOverviewRefactorFeedback = useUiFlag( @@ -162,48 +144,6 @@ export const ProjectFeatureTogglesHeader: FC< /> {actions} - - - - setShowExportDialog(true) - } - sx={(theme) => ({ - marginRight: theme.spacing(2), - })} - > - - - - - - setShowExportDialog(false) - } - environments={ - environmentsToExport || [] - } - /> - } - /> - - } - /> { - - setModalOpen(true)} - tooltipProps={{ title: 'Import' }} - data-testid={IMPORT_BUTTON} - data-loading-project - > - - - } - /> - +