1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

chore: clarify deleted legal values warning (#9969)

This commit is contained in:
Jaanus Sellin 2025-05-13 10:19:11 +03:00 committed by GitHub
parent 8bf3b1f135
commit 31a23db05e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 13 deletions

View File

@ -28,7 +28,7 @@ test('should show alert when you have illegal legal values', async () => {
);
await screen.findByText(
'This constraint is using legal values that have been deleted as valid options. If you save changes on this constraint and then save the strategy the following values will be removed:',
'This constraint is currently using values that were valid in the past but have since been deleted. If you save changes on this constraint and then save the strategy the following values will be removed:',
);
});

View File

@ -173,10 +173,10 @@ export const RestrictiveLegalValues = ({
condition={Boolean(illegalValues && illegalValues.length > 0)}
show={
<Alert severity='warning'>
This constraint is using legal values that have been
deleted as valid options. If you save changes on this
constraint and then save the strategy the following
values will be removed:
This constraint is currently using values that were
valid in the past but have since been deleted. If you
save changes on this constraint and then save the
strategy the following values will be removed:
<ul>
{illegalValues?.map((value) => (
<li key={value}>{value}</li>

View File

@ -17,7 +17,6 @@ import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
import { useLocationSettings } from 'hooks/useLocationSettings';
import { getLocalizedDateString } from '../../../util';
import { Tag } from 'component/common/Tag/Tag';
import { useUiFlag } from 'hooks/useUiFlag';
import { formatTag } from 'utils/format-tag';
interface IFeatureNameCellProps {

View File

@ -77,9 +77,10 @@ const BaseLegalValueSelector: FC<BaseProps> = ({
<LegalValuesSelectorWidget>
{deletedLegalValues?.size ? (
<Alert id={alertId} severity='warning'>
This constraint is using legal values that have been deleted
as valid options. If you save changes on this constraint and
then save the strategy the following values will be removed:
This constraint is currently using values that were valid in
the past but have since been deleted. If you save changes on
this constraint and then save the strategy the following
values will be removed:
<ul>
{[...deletedLegalValues].map((value) => (
<li key={value}>{value}</li>

View File

@ -2,7 +2,6 @@ import type { IFeatureToggle } from 'interfaces/featureToggle';
import { useContext, useState } from 'react';
import { styled, Tooltip, Chip } from '@mui/material';
import useFeatureTags from 'hooks/api/getters/useFeatureTags/useFeatureTags';
import DeleteTagIcon from '@mui/icons-material/Cancel';
import ClearIcon from '@mui/icons-material/Clear';
import { ManageTagsDialog } from 'component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog';
import { UPDATE_FEATURE } from 'component/providers/AccessProvider/permissions';
@ -15,7 +14,6 @@ import { formatUnknownError } from 'utils/formatUnknownError';
import { StyledMetaDataItem } from './FeatureOverviewMetaData';
import { AddTagButton } from './AddTagButton';
import { Tag } from 'component/common/Tag/Tag';
import { useUiFlag } from 'hooks/useUiFlag';
import { formatTag } from 'utils/format-tag';
const StyledLabel = styled('span')(({ theme }) => ({

View File

@ -1,7 +1,6 @@
import { useEffect, useState } from 'react';
import useTagTypesApi from 'hooks/api/actions/useTagTypesApi/useTagTypesApi';
import { formatUnknownError } from 'utils/formatUnknownError';
import { useUiFlag } from 'hooks/useUiFlag';
interface TagTypePayload {
name: string;

View File

@ -31,7 +31,6 @@ import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell';
import { sortTypes } from 'utils/sortTypes';
import { AddTagTypeButton } from './AddTagTypeButton/AddTagTypeButton';
import { Search } from 'component/common/Search/Search';
import { useUiFlag } from 'hooks/useUiFlag';
const StyledColorDot = styled('div')<{ $color: string }>(
({ theme, $color }) => ({