mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
chore: remove custom strategy deprecation warnings from release tempates (#10929)
Remove two more deprecations for custom stategies
This commit is contained in:
parent
94554ed4f8
commit
40d917d392
@ -10,7 +10,6 @@ import {
|
||||
Box,
|
||||
Divider,
|
||||
Typography,
|
||||
Link,
|
||||
} from '@mui/material';
|
||||
import type {
|
||||
IFeatureStrategy,
|
||||
@ -43,7 +42,7 @@ import { useHasProjectEnvironmentAccess } from 'hooks/useHasAccess';
|
||||
import { FeatureStrategyTitle } from './FeatureStrategyTitle/FeatureStrategyTitle.tsx';
|
||||
import { FeatureStrategyEnabledDisabled } from './FeatureStrategyEnabledDisabled/FeatureStrategyEnabledDisabled.tsx';
|
||||
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
|
||||
import { BuiltInStrategies, formatStrategyName } from 'utils/strategyNames';
|
||||
import { formatStrategyName } from 'utils/strategyNames';
|
||||
import { Badge } from 'component/common/Badge/Badge';
|
||||
import { UpgradeChangeRequests } from '../../FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/UpgradeChangeRequests/UpgradeChangeRequests.tsx';
|
||||
import { ConstraintSeparator } from 'component/common/ConstraintsList/ConstraintSeparator/ConstraintSeparator';
|
||||
@ -343,29 +342,6 @@ export const FeatureStrategyForm = ({
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
<ConditionallyRender
|
||||
condition={
|
||||
!BuiltInStrategies.includes(strategy.name || 'default')
|
||||
}
|
||||
show={
|
||||
<Alert severity='warning'>
|
||||
Custom strategies are deprecated. We recommend not
|
||||
adding them to any flags going forward and using the
|
||||
predefined strategies like Gradual rollout with{' '}
|
||||
<Link
|
||||
href={
|
||||
'https://docs.getunleash.io/reference/activation-strategies#constraints'
|
||||
}
|
||||
target='_blank'
|
||||
variant='body2'
|
||||
>
|
||||
constraints
|
||||
</Link>{' '}
|
||||
instead.
|
||||
</Alert>
|
||||
}
|
||||
/>
|
||||
</StyledAlertBox>
|
||||
|
||||
<StyledTabs value={tab} onChange={handleChange}>
|
||||
|
||||
@ -3,7 +3,6 @@ import {
|
||||
Button,
|
||||
styled,
|
||||
Alert,
|
||||
Link,
|
||||
Tab,
|
||||
Tabs,
|
||||
Typography,
|
||||
@ -14,7 +13,7 @@ import FormTemplate from 'component/common/FormTemplate/FormTemplate';
|
||||
import type { IReleasePlanMilestoneStrategy } from 'interfaces/releasePlans';
|
||||
import type { ISegment } from 'interfaces/segment';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { BuiltInStrategies, formatStrategyName } from 'utils/strategyNames';
|
||||
import { formatStrategyName } from 'utils/strategyNames';
|
||||
import { useStrategy } from 'hooks/api/getters/useStrategy/useStrategy';
|
||||
import { useFormErrors } from 'hooks/useFormErrors';
|
||||
import produce from 'immer';
|
||||
@ -66,15 +65,6 @@ const StyledTitle = styled('h1')(({ theme }) => ({
|
||||
paddingBottom: theme.spacing(2),
|
||||
}));
|
||||
|
||||
const StyledAlertBox = styled(Box)(({ theme }) => ({
|
||||
paddingLeft: theme.spacing(6),
|
||||
paddingRight: theme.spacing(6),
|
||||
'& > *': {
|
||||
marginTop: theme.spacing(2),
|
||||
marginBottom: theme.spacing(2),
|
||||
},
|
||||
}));
|
||||
|
||||
const StyledTabs = styled(Tabs)(({ theme }) => ({
|
||||
borderTop: `1px solid ${theme.palette.divider}`,
|
||||
borderBottom: `1px solid ${theme.palette.divider}`,
|
||||
@ -245,27 +235,6 @@ export const ReleasePlanTemplateAddStrategyForm = ({
|
||||
)}
|
||||
</StyledTitle>
|
||||
</StyledHeaderBox>
|
||||
{!BuiltInStrategies.includes(
|
||||
strategy.strategyName || 'default',
|
||||
) && (
|
||||
<StyledAlertBox>
|
||||
<Alert severity='warning'>
|
||||
Custom strategies are deprecated. We recommend not
|
||||
adding them to any templates going forward and using the
|
||||
predefined strategies like Gradual rollout with{' '}
|
||||
<Link
|
||||
href={
|
||||
'https://docs.getunleash.io/reference/activation-strategies#constraints'
|
||||
}
|
||||
target='_blank'
|
||||
variant='body2'
|
||||
>
|
||||
constraints
|
||||
</Link>{' '}
|
||||
instead.
|
||||
</Alert>
|
||||
</StyledAlertBox>
|
||||
)}
|
||||
<StyledTabs value={activeTab} onChange={handleChange}>
|
||||
<StyledTab label='General' />
|
||||
<Tab
|
||||
|
||||
Loading…
Reference in New Issue
Block a user