Skip to content

Commit 54e4fd2

Browse files
authored
chore: remove lifecycle v2 flag (#9224)
1 parent f8ed771 commit 54e4fd2

File tree

19 files changed

+20
-649
lines changed

19 files changed

+20
-649
lines changed

frontend/src/assets/icons/stage-archived.svg

-8
This file was deleted.

frontend/src/assets/icons/stage-completed-discarded.svg

-7
This file was deleted.

frontend/src/assets/icons/stage-completed.svg

-7
This file was deleted.

frontend/src/assets/icons/stage-initial.svg

-4
This file was deleted.

frontend/src/assets/icons/stage-live.svg

-6
This file was deleted.

frontend/src/assets/icons/stage-pre-live.svg

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,25 @@
11
import type { FC } from 'react';
2-
import { ReactComponent as InitialStageIcon } from 'assets/icons/stage-initial.svg';
3-
import { ReactComponent as PreLiveStageIcon } from 'assets/icons/stage-pre-live.svg';
4-
import { ReactComponent as LiveStageIcon } from 'assets/icons/stage-live.svg';
5-
import { ReactComponent as CompletedStageIcon } from 'assets/icons/stage-completed.svg';
6-
import { ReactComponent as ArchivedStageIcon } from 'assets/icons/stage-archived.svg';
7-
import { ReactComponent as Stage1 } from 'assets/icons/lifecycle/stage-1.svg';
8-
import { ReactComponent as Stage2 } from 'assets/icons/lifecycle/stage-2.svg';
9-
import { ReactComponent as Stage3 } from 'assets/icons/lifecycle/stage-3.svg';
10-
import { ReactComponent as Stage4 } from 'assets/icons/lifecycle/stage-4.svg';
11-
import { ReactComponent as Stage5 } from 'assets/icons/lifecycle/stage-5.svg';
2+
import { ReactComponent as CreatedIcon } from 'assets/icons/lifecycle/stage-created.svg';
3+
import { ReactComponent as PreLiveIcon } from 'assets/icons/lifecycle/stage-prelive.svg';
4+
import { ReactComponent as LiveIcon } from 'assets/icons/lifecycle/stage-live.svg';
5+
import { ReactComponent as CompletedIcon } from 'assets/icons/lifecycle/stage-completed.svg';
6+
import { ReactComponent as ArchivedIcon } from 'assets/icons/lifecycle/stage-archived.svg';
127
import type { LifecycleStage } from '../../feature/FeatureView/FeatureOverview/FeatureLifecycle/LifecycleStage';
13-
import { useUiFlag } from 'hooks/useUiFlag';
148

159
export const FeatureLifecycleStageIcon: FC<{
1610
stage: Pick<LifecycleStage, 'name'>;
1711
}> = ({ stage, ...props }) => {
18-
const newIcons = useUiFlag('lifecycleImprovements');
19-
2012
if (stage.name === 'archived') {
21-
return newIcons ? (
22-
<Stage5 {...props} />
23-
) : (
24-
<ArchivedStageIcon {...props} />
25-
);
26-
} else if (stage.name === 'pre-live') {
27-
return newIcons ? (
28-
<Stage2 {...props} />
29-
) : (
30-
<PreLiveStageIcon {...props} />
31-
);
32-
} else if (stage.name === 'live') {
33-
return newIcons ? <Stage3 {...props} /> : <LiveStageIcon {...props} />;
34-
} else if (stage.name === 'completed') {
35-
return newIcons ? (
36-
<Stage4 {...props} />
37-
) : (
38-
<CompletedStageIcon {...props} />
39-
);
40-
} else {
41-
return newIcons ? (
42-
<Stage1 {...props} />
43-
) : (
44-
<InitialStageIcon {...props} />
45-
);
13+
return <ArchivedIcon {...props} />;
14+
}
15+
if (stage.name === 'pre-live') {
16+
return <PreLiveIcon {...props} />;
17+
}
18+
if (stage.name === 'live') {
19+
return <LiveIcon {...props} />;
20+
}
21+
if (stage.name === 'completed') {
22+
return <CompletedIcon {...props} />;
4623
}
24+
return <CreatedIcon {...props} />;
4725
};
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { FeatureLifecycleStageIcon } from 'component/common/FeatureLifecycle/FeatureLifecycleStageIcon';
2-
import { FeatureLifecycleTooltip as LegacyFeatureLifecycleTooltip } from './LegacyFeatureLifecycleTooltip';
32
import { FeatureLifecycleTooltip } from './FeatureLifecycleTooltip';
43
import useFeatureLifecycleApi from 'hooks/api/actions/useFeatureLifecycleApi/useFeatureLifecycleApi';
54
import { populateCurrentStage } from './populateCurrentStage';
65
import type { FC } from 'react';
76
import type { Lifecycle } from 'interfaces/featureToggle';
87
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
9-
import { useUiFlag } from 'hooks/useUiFlag';
108

119
export interface LifecycleFeature {
1210
lifecycle?: Lifecycle;
@@ -29,7 +27,6 @@ export const FeatureLifecycle: FC<{
2927
const currentStage = populateCurrentStage(feature);
3028
const { markFeatureUncompleted, loading } = useFeatureLifecycleApi();
3129
const { trackEvent } = usePlausibleTracker();
32-
const isLifecycleImprovementsEnabled = useUiFlag('lifecycleImprovements');
3330

3431
const onUncompleteHandler = async () => {
3532
await markFeatureUncompleted(feature.name, feature.project);
@@ -41,23 +38,8 @@ export const FeatureLifecycle: FC<{
4138
});
4239
};
4340

44-
if (isLifecycleImprovementsEnabled) {
45-
return currentStage ? (
46-
<FeatureLifecycleTooltip
47-
stage={currentStage!}
48-
project={feature.project}
49-
onArchive={onArchive}
50-
onComplete={onComplete}
51-
onUncomplete={onUncompleteHandler}
52-
loading={loading}
53-
>
54-
<FeatureLifecycleStageIcon stage={currentStage} />
55-
</FeatureLifecycleTooltip>
56-
) : null;
57-
}
58-
5941
return currentStage ? (
60-
<LegacyFeatureLifecycleTooltip
42+
<FeatureLifecycleTooltip
6143
stage={currentStage!}
6244
project={feature.project}
6345
onArchive={onArchive}
@@ -66,6 +48,6 @@ export const FeatureLifecycle: FC<{
6648
loading={loading}
6749
>
6850
<FeatureLifecycleStageIcon stage={currentStage} />
69-
</LegacyFeatureLifecycleTooltip>
51+
</FeatureLifecycleTooltip>
7052
) : null;
7153
};

0 commit comments

Comments
 (0)