Skip to content

Commit

Permalink
chore: remove create feature component (#7959)
Browse files Browse the repository at this point in the history
After we implemented new feature flag creation flow, this are not used
anymore.

Creation is now handled by **CreateFeatureDialog**.

Also edit component can be minified, because it does not need so many
fields anymore.
  • Loading branch information
sjaanus authored Aug 22, 2024
1 parent e5cca66 commit 4a4dafc
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 452 deletions.
2 changes: 0 additions & 2 deletions frontend/src/component/common/BreadcrumbNav/BreadcrumbNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const BreadcrumbNav = () => {
item !== 'copy' &&
item !== 'features' &&
item !== 'features2' &&
// TODO: this can be removed after new create flag flow goes live
item !== 'create-toggle' &&
item !== 'settings' &&
item !== 'profile' &&
item !== 'insights',
Expand Down

This file was deleted.

235 changes: 0 additions & 235 deletions frontend/src/component/feature/CreateFeature/CreateFeature.tsx

This file was deleted.

15 changes: 3 additions & 12 deletions frontend/src/component/feature/EditFeature/EditFeature.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FormTemplate from 'component/common/FormTemplate/FormTemplate';
import { useNavigate } from 'react-router-dom';
import FeatureForm from '../FeatureForm/FeatureForm';
import EditFeatureForm from '../FeatureForm/EditFeatureForm';
import useFeatureForm from '../hooks/useFeatureForm';
import * as jsonpatch from 'fast-json-patch';
import { UpdateButton } from 'component/common/UpdateButton/UpdateButton';
Expand All @@ -26,15 +26,12 @@ const EditFeature = () => {
type,
setType,
name,
setName,
project,
setProject,
description,
setDescription,
impressionData,
setImpressionData,
clearErrors,
errors,
} = useFeatureForm(
feature?.name,
feature?.type,
Expand Down Expand Up @@ -88,25 +85,19 @@ const EditFeature = () => {
documentationLinkLabel='Feature flag types documentation'
formatApiCode={formatApiCode}
>
<FeatureForm
<EditFeatureForm
type={type}
name={name}
project={project}
description={description}
setType={setType}
setName={setName}
setProject={setProject}
setDescription={setDescription}
errors={errors}
handleSubmit={handleSubmit}
handleCancel={handleCancel}
impressionData={impressionData}
setImpressionData={setImpressionData}
mode='Edit'
clearErrors={clearErrors}
>
<UpdateButton permission={UPDATE_FEATURE} projectId={project} />
</FeatureForm>
</EditFeatureForm>
</FormTemplate>
);
};
Expand Down
Loading

0 comments on commit 4a4dafc

Please sign in to comment.