diff --git a/frontend/cypress/support/UI.ts b/frontend/cypress/support/UI.ts index e4cdad5ef1..d9801a4943 100644 --- a/frontend/cypress/support/UI.ts +++ b/frontend/cypress/support/UI.ts @@ -65,13 +65,13 @@ export const createFeature_UI = ( cy.wait(300); - cy.get("[data-testid='CF_NAME_ID'] input").type(name, uiOpts); - cy.get("[data-testid='CF_DESC_ID'] textarea") + cy.get("[data-testid='FORM_NAME_INPUT'] input").type(name, uiOpts); + cy.get("[data-testid='FORM_DESCRIPTION_INPUT'] textarea") .first() .type('hello-world', uiOpts); if (!shouldWait) - return cy.get("[data-testid='CF_CREATE_BTN_ID']").click(uiOpts); - else cy.get("[data-testid='CF_CREATE_BTN_ID']").click(uiOpts); + return cy.get("[data-testid='FORM_CREATE_BUTTON']").click(uiOpts); + else cy.get("[data-testid='FORM_CREATE_BUTTON']").click(uiOpts); return cy.wait('@createFeature'); }; diff --git a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx index 8d747a0b7d..99313c69df 100644 --- a/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx +++ b/frontend/src/component/application/ApplicationIssues/ApplicationIssues.tsx @@ -9,7 +9,6 @@ import { } from 'component/providers/AccessProvider/permissions'; import { useContext } from 'react'; import AccessContext from 'contexts/AccessContext'; -import { useUiFlag } from 'hooks/useUiFlag'; const WarningContainer = styled(Box)(({ theme }) => ({ display: 'flex', @@ -109,7 +108,6 @@ type ApplicationIssues = const FeaturesMissing = ({ features }: IFeaturesMissingProps) => { const { hasAccess } = useContext(AccessContext); - const improveCreateFlagFlow = useUiFlag('improveCreateFlagFlow'); const length = features.length; if (length === 0) { @@ -130,25 +128,12 @@ const FeaturesMissing = ({ features }: IFeaturesMissingProps) => { - Create feature flag - - } - elseShow={ - - Create feature flag - - } - /> + + Create feature flag + } /> diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx index 0f018024b3..edc7b28b16 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader.tsx @@ -16,9 +16,8 @@ import Add from '@mui/icons-material/Add'; import FileDownload from '@mui/icons-material/FileDownload'; import { styled } from '@mui/material'; import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton'; -import { useNavigate, useSearchParams } from 'react-router-dom'; +import { useSearchParams } from 'react-router-dom'; import { useRequiredPathParam } from 'hooks/useRequiredPathParam'; -import { getCreateTogglePath } from 'utils/routePathHelpers'; import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions'; import { ExportDialog } from 'component/feature/FeatureToggleList/ExportDialog'; import type { FeatureSchema } from 'openapi'; @@ -48,44 +47,25 @@ const FlagCreationButton: FC = () => { const showCreateDialog = Boolean(searchParams.get('create')); const [openCreateDialog, setOpenCreateDialog] = useState(showCreateDialog); const { loading } = useUiConfig(); - const navigate = useNavigate(); - const improveCreateFlagFlow = useUiFlag('improveCreateFlagFlow'); return ( - - setOpenCreateDialog(true)} - maxWidth='960px' - Icon={Add} - projectId={projectId} - disabled={loading} - permission={CREATE_FEATURE} - data-testid='NAVIGATE_TO_CREATE_FEATURE' - > - New feature flag - - setOpenCreateDialog(false)} - /> - - } - elseShow={ - navigate(getCreateTogglePath(projectId))} - maxWidth='960px' - Icon={Add} - projectId={projectId} - permission={CREATE_FEATURE} - data-testid='NAVIGATE_TO_CREATE_FEATURE' - > - New feature flag - - } - /> + <> + setOpenCreateDialog(true)} + maxWidth='960px' + Icon={Add} + projectId={projectId} + disabled={loading} + permission={CREATE_FEATURE} + data-testid='NAVIGATE_TO_CREATE_FEATURE' + > + New feature flag + + setOpenCreateDialog(false)} + /> + ); }; diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 8b49b8c827..299f2a98a2 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -91,7 +91,6 @@ export type UiFlags = { resourceLimits?: boolean; insightsV2?: boolean; integrationEvents?: boolean; - improveCreateFlagFlow?: boolean; newEventSearch?: boolean; changeRequestPlayground?: boolean; archiveProjects?: boolean; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index edb2c70695..ace3e69cee 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -120,7 +120,6 @@ exports[`should create default config 1`] = ` }, "filterInvalidClientMetrics": false, "googleAuthEnabled": false, - "improveCreateFlagFlow": false, "insightsV2": false, "integrationEvents": false, "killInsightsUI": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 2fb4cceaa6..5696ec73b0 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -61,7 +61,6 @@ export type IFlagKey = | 'removeUnsafeInlineStyleSrc' | 'insightsV2' | 'integrationEvents' - | 'improveCreateFlagFlow' | 'originMiddleware' | 'newEventSearch' | 'changeRequestPlayground' @@ -298,10 +297,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS, false, ), - improveCreateFlagFlow: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_IMPROVE_CREATE_FLAG_FLOW, - false, - ), originMiddleware: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_ORIGIN_MIDDLEWARE, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index 1126798731..1c5368b49a 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -54,7 +54,6 @@ process.nextTick(async () => { extendedMetrics: true, insightsV2: true, integrationEvents: true, - improveCreateFlagFlow: true, originMiddleware: true, newEventSearch: true, changeRequestPlayground: true,