>;
@@ -32,14 +31,7 @@ export const RecentlyUsedSegments = ({
}: RecentlyUsedSegmentsProps) => {
const { items: recentlyUsedSegmentIds } = useRecentlyUsedSegments();
const { segments: allSegments } = useSegments();
- const addEditStrategyEnabled = useUiFlag('addEditStrategy');
-
- if (
- !addEditStrategyEnabled ||
- recentlyUsedSegmentIds.length === 0 ||
- !setSegments ||
- !allSegments
- ) {
+ if (recentlyUsedSegmentIds.length === 0 || !setSegments || !allSegments) {
return null;
}
diff --git a/frontend/src/component/feature/StrategyTypes/RolloutSlider/ConditionalRolloutSlider.tsx b/frontend/src/component/feature/StrategyTypes/RolloutSlider/ConditionalRolloutSlider.tsx
index bca74ec228..5a6004d4f8 100644
--- a/frontend/src/component/feature/StrategyTypes/RolloutSlider/ConditionalRolloutSlider.tsx
+++ b/frontend/src/component/feature/StrategyTypes/RolloutSlider/ConditionalRolloutSlider.tsx
@@ -1,6 +1,4 @@
import RolloutSlider from './RolloutSlider.tsx';
-import LegacyRolloutSlider from './LegacyRolloutSlider.tsx';
-import { useUiFlag } from 'hooks/useUiFlag';
interface IRolloutSliderProps {
name: string;
@@ -12,13 +10,7 @@ interface IRolloutSliderProps {
}
const ConditionalRolloutSlider = (props: IRolloutSliderProps) => {
- const addEditStrategy = useUiFlag('addEditStrategy');
-
- if (addEditStrategy) {
- return ;
- }
-
- return ;
+ return ;
};
export default ConditionalRolloutSlider;
diff --git a/frontend/src/component/feature/StrategyTypes/RolloutSlider/LegacyRolloutSlider.tsx b/frontend/src/component/feature/StrategyTypes/RolloutSlider/LegacyRolloutSlider.tsx
deleted file mode 100644
index f195734d35..0000000000
--- a/frontend/src/component/feature/StrategyTypes/RolloutSlider/LegacyRolloutSlider.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import { makeStyles, withStyles } from 'tss-react/mui';
-import { Slider, Typography, Box, styled } from '@mui/material';
-import { ROLLOUT_SLIDER_ID } from 'utils/testIds';
-import { HelpIcon } from 'component/common/HelpIcon/HelpIcon';
-
-const StyledSlider = withStyles(Slider, (theme) => ({
- root: {
- height: 8,
- },
- thumb: {
- height: 24,
- width: 24,
- backgroundColor: theme.palette.background.paper,
- border: '2px solid currentColor',
- },
- active: {},
- valueLabel: {},
- track: {
- height: 8,
- borderRadius: theme.shape.borderRadius,
- },
- rail: {
- height: 8,
- borderRadius: theme.shape.borderRadius,
- },
-}));
-
-const StyledHeader = styled(Typography)(({ theme }) => ({
- marginBottom: theme.spacing(1),
-}));
-
-const StyledSubheader = styled(Typography)(({ theme }) => ({
- marginBottom: theme.spacing(1),
- marginTop: theme.spacing(1),
-}));
-
-const StyledBox = styled(Box)(({ theme }) => ({
- display: 'flex',
- alignItems: 'center',
- marginBottom: theme.spacing(1),
-}));
-
-const useStyles = makeStyles()((theme) => ({
- slider: {
- width: '100%',
- maxWidth: '100%',
- },
- margin: {
- height: theme.spacing(3),
- },
-}));
-
-const marks = [
- {
- value: 0,
- label: '0%',
- },
- {
- value: 25,
- label: '25%',
- },
- {
- value: 50,
- label: '50%',
- },
- {
- value: 75,
- label: '75%',
- },
- {
- value: 100,
- label: '100%',
- },
-];
-
-interface IRolloutSliderProps {
- name: string;
- minLabel?: string;
- maxLabel?: string;
- value: number;
- onChange: (e: Event, newValue: number | number[]) => void;
- disabled?: boolean;
-}
-
-const LegacyRolloutSlider = ({
- name,
- value,
- onChange,
- disabled = false,
-}: IRolloutSliderProps) => {
- const { classes } = useStyles();
-
- const valuetext = (value: number) => `${value}%`;
-
- return (
-
-
- {name}
-
-
- Rollout percentage
-
-
- The rollout percentage determines the proportion
- of users exposed to a feature. It's based on the
- MurmurHash of a user's unique identifier,
- normalized to a number between 1 and 100. If the
- normalized hash is less than or equal to the
- rollout percentage, the user sees the feature.
- This ensures a consistent, random distribution
- of the feature among users.
-
-
-
- Stickiness
-
-
- Stickiness refers to the value used for hashing
- to ensure a consistent user experience. It
- determines the input for the MurmurHash,
- ensuring that a user's feature exposure remains
- consistent across sessions.
-
- By default Unleash will use the first value
- present in the context in the order of{' '}
- userId, sessionId and random.
-
-
-
- GroupId
-
-
- The groupId is used as a seed for the hash
- function, ensuring consistent feature exposure
- across different feature flags for a uniform
- user experience.
-
-
- }
- />
-
-
-
- );
-};
-
-export default LegacyRolloutSlider;
diff --git a/frontend/src/component/insights/components/InsightsHeader/InsightsHeader.tsx b/frontend/src/component/insights/components/InsightsHeader/InsightsHeader.tsx
index 5ea399549c..4265ff761f 100644
--- a/frontend/src/component/insights/components/InsightsHeader/InsightsHeader.tsx
+++ b/frontend/src/component/insights/components/InsightsHeader/InsightsHeader.tsx
@@ -49,7 +49,7 @@ const StyledActionsSmallScreen = styled('div')(({ theme }) => ({
export const InsightsHeader: VFC = ({ actions }) => {
const showInactiveUsers = useUiFlag('showInactiveUsers');
- const pageName = useUiFlag('sideMenuCleanup') ? 'Analytics' : 'Insights';
+ const pageName = 'Analytics';
const theme = useTheme();
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
diff --git a/frontend/src/component/releases/ReleasePlanTemplate/TemplateForm/MilestoneStrategy/MilestoneStrategySegment.tsx b/frontend/src/component/releases/ReleasePlanTemplate/TemplateForm/MilestoneStrategy/MilestoneStrategySegment.tsx
index 39baee135d..d3eaef9075 100644
--- a/frontend/src/component/releases/ReleasePlanTemplate/TemplateForm/MilestoneStrategy/MilestoneStrategySegment.tsx
+++ b/frontend/src/component/releases/ReleasePlanTemplate/TemplateForm/MilestoneStrategy/MilestoneStrategySegment.tsx
@@ -9,7 +9,6 @@ import {
type IAutocompleteBoxOption,
} from 'component/common/AutocompleteBox/AutocompleteBox';
import { MilestoneStrategySegmentList } from './MilestoneStrategySegmentList.tsx';
-import { useUiFlag } from 'hooks/useUiFlag';
const StyledHelpIconBox = styled(Box)(({ theme }) => ({
display: 'flex',
@@ -27,7 +26,6 @@ export const MilestoneStrategySegment = ({
segments: selectedSegments,
setSegments: setSelectedSegments,
}: IMilestoneStrategySegmentProps) => {
- const addEditStrategy = useUiFlag('addEditStrategy');
const { segments: allSegments } = useSegments();
const { strategySegmentsLimit } = useSegmentLimits();
@@ -90,7 +88,7 @@ export const MilestoneStrategySegment = ({
options={autocompleteOptions}
onChange={onChange}
disabled={atStrategySegmentsLimit}
- icon={addEditStrategy ? null : undefined}
+ icon={null}
width={'175px'}
/>
{
]);
testServerRoute(server, '/api/admin/ui-config', {
- flags: {
- addEditStrategy: true,
- },
+ flags: {},
});
};
diff --git a/frontend/src/component/segments/SegmentFormStepTwo.tsx b/frontend/src/component/segments/SegmentFormStepTwo.tsx
index 86d843e273..ddb84cf021 100644
--- a/frontend/src/component/segments/SegmentFormStepTwo.tsx
+++ b/frontend/src/component/segments/SegmentFormStepTwo.tsx
@@ -15,7 +15,6 @@ import {
import useUnleashContext from 'hooks/api/getters/useUnleashContext/useUnleashContext';
import type { IConstraint } from 'interfaces/strategy';
import { useNavigate } from 'react-router-dom';
-import { ConstraintAccordionList } from 'component/common/LegacyConstraintAccordion/ConstraintAccordionList/ConstraintAccordionList';
import { EditableConstraintsList } from 'component/common/NewConstraintAccordion/ConstraintsList/EditableConstraintsList';
import type { IEditableConstraintsListRef } from 'component/common/NewConstraintAccordion/ConstraintsList/EditableConstraintsList';
import type { SegmentFormStep, SegmentFormMode } from './SegmentForm.tsx';
@@ -31,7 +30,6 @@ import { useSegmentValuesCount } from 'component/segments/hooks/useSegmentValues
import AccessContext from 'contexts/AccessContext';
import { useSegmentLimits } from 'hooks/api/getters/useSegmentLimits/useSegmentLimits';
import { GO_BACK } from 'constants/navigate';
-import { useUiFlag } from 'hooks/useUiFlag';
interface ISegmentFormPartTwoProps {
project?: string;
@@ -122,7 +120,6 @@ export const SegmentFormStepTwo: React.FC = ({
? [CREATE_SEGMENT, UPDATE_PROJECT_SEGMENT]
: [UPDATE_SEGMENT, UPDATE_PROJECT_SEGMENT];
const { segmentValuesLimit } = useSegmentLimits();
- const addEditStrategy = useUiFlag('addEditStrategy');
const overSegmentValuesLimit: boolean = Boolean(
segmentValuesLimit && segmentValuesCount > segmentValuesLimit,
@@ -202,25 +199,13 @@ export const SegmentFormStepTwo: React.FC = ({
}
/>
- {addEditStrategy ? (
- hasAccess(modePermission, project) && setConstraints ? (
-
- ) : null
- ) : (
-
- )}
+ ) : null}
diff --git a/frontend/src/hooks/api/actions/useFeatureStrategyApi/useFeatureStrategyApi.ts b/frontend/src/hooks/api/actions/useFeatureStrategyApi/useFeatureStrategyApi.ts
index 7df2521bf7..cb1ed63e5c 100644
--- a/frontend/src/hooks/api/actions/useFeatureStrategyApi/useFeatureStrategyApi.ts
+++ b/frontend/src/hooks/api/actions/useFeatureStrategyApi/useFeatureStrategyApi.ts
@@ -6,7 +6,6 @@ import type {
import useAPI from '../useApi/useApi.js';
import { useRecentlyUsedConstraints } from 'component/feature/FeatureStrategy/FeatureStrategyConstraints/RecentlyUsedConstraints/useRecentlyUsedConstraints';
import { useRecentlyUsedSegments } from 'component/feature/FeatureStrategy/FeatureStrategySegment/RecentlyUsedSegments/useRecentlyUsedSegments';
-import { useUiFlag } from 'hooks/useUiFlag';
const useFeatureStrategyApi = () => {
const { makeRequest, createRequest, errors, loading } = useAPI({
@@ -16,7 +15,6 @@ const useFeatureStrategyApi = () => {
const { addItem: addToRecentlyUsedConstraints } =
useRecentlyUsedConstraints();
const { addItem: addToRecentlyUsedSegments } = useRecentlyUsedSegments();
- const addEditStrategyEnabled = useUiFlag('addEditStrategy');
const addStrategyToFeature = async (
projectId: string,
@@ -24,14 +22,12 @@ const useFeatureStrategyApi = () => {
environmentId: string,
payload: IFeatureStrategyPayload,
): Promise => {
- if (addEditStrategyEnabled) {
- if (payload.constraints && payload.constraints.length > 0) {
- addToRecentlyUsedConstraints(payload.constraints);
- }
+ if (payload.constraints && payload.constraints.length > 0) {
+ addToRecentlyUsedConstraints(payload.constraints);
+ }
- if (payload.segments && payload.segments.length > 0) {
- addToRecentlyUsedSegments(payload.segments);
- }
+ if (payload.segments && payload.segments.length > 0) {
+ addToRecentlyUsedSegments(payload.segments);
}
const path = `api/admin/projects/${projectId}/features/${featureId}/environments/${environmentId}/strategies`;
@@ -67,14 +63,12 @@ const useFeatureStrategyApi = () => {
strategyId: string,
payload: IFeatureStrategyPayload,
): Promise => {
- if (addEditStrategyEnabled) {
- if (payload.constraints && payload.constraints.length > 0) {
- addToRecentlyUsedConstraints(payload.constraints);
- }
+ if (payload.constraints && payload.constraints.length > 0) {
+ addToRecentlyUsedConstraints(payload.constraints);
+ }
- if (payload.segments && payload.segments.length > 0) {
- addToRecentlyUsedSegments(payload.segments);
- }
+ if (payload.segments && payload.segments.length > 0) {
+ addToRecentlyUsedSegments(payload.segments);
}
const path = `api/admin/projects/${projectId}/features/${featureId}/environments/${environmentId}/strategies/${strategyId}`;
diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts
index 90a9d84cbf..6de2be58fa 100644
--- a/frontend/src/interfaces/uiConfig.ts
+++ b/frontend/src/interfaces/uiConfig.ts
@@ -86,7 +86,6 @@ export type UiFlags = {
showUserDeviceCount?: boolean;
consumptionModel?: boolean;
edgeObservability?: boolean;
- addEditStrategy?: boolean;
registerFrontendClient?: boolean;
customMetrics?: boolean;
lifecycleMetrics?: boolean;
diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts
index 7dd22d3db0..cb927a2cd4 100644
--- a/src/lib/types/experimental.ts
+++ b/src/lib/types/experimental.ts
@@ -56,7 +56,6 @@ export type IFlagKey =
| 'uniqueSdkTracking'
| 'consumptionModel'
| 'edgeObservability'
- | 'addEditStrategy'
| 'registerFrontendClient'
| 'reportUnknownFlags'
| 'lastSeenBulkQuery'
@@ -268,10 +267,6 @@ const flags: IFlags = {
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
false,
),
- addEditStrategy: parseEnvVarBoolean(
- process.env.UNLEASH_EXPERIMENTAL_ADD_EDIT_STRATEGY,
- false,
- ),
registerFrontendClient: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_REGISTER_FRONTEND_CLIENT,
false,
diff --git a/src/server-dev.ts b/src/server-dev.ts
index 96ee24ceb4..10c38c4f27 100644
--- a/src/server-dev.ts
+++ b/src/server-dev.ts
@@ -50,7 +50,6 @@ process.nextTick(async () => {
showUserDeviceCount: true,
deltaApi: true,
uniqueSdkTracking: true,
- addEditStrategy: true,
strictSchemaValidation: true,
registerFrontendClient: true,
reportUnknownFlags: true,