mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
[Gitar] Cleaning up stale flag: changeRequestPlayground with value true (#7920)
This commit is contained in:
parent
004038e872
commit
662c7ab4dc
@ -145,9 +145,7 @@ const uiConfig = () => {
|
||||
versionInfo: {
|
||||
current: { oss: 'version', enterprise: 'version' },
|
||||
},
|
||||
flags: {
|
||||
changeRequestPlayground: true,
|
||||
},
|
||||
flags: {},
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,6 @@ import {
|
||||
import { ScheduleChangeRequestDialog } from './ChangeRequestScheduledDialogs/ScheduleChangeRequestDialog';
|
||||
import type { PlausibleChangeRequestState } from '../changeRequest.types';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
const StyledAsideBox = styled(Box)(({ theme }) => ({
|
||||
width: '30%',
|
||||
@ -104,7 +103,6 @@ export const ChangeRequestOverview: FC = () => {
|
||||
useChangeRequestsEnabled(projectId);
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
const changeRequestPlaygroundEnabled = useUiFlag('changeRequestPlayground');
|
||||
|
||||
if (!changeRequest) {
|
||||
return null;
|
||||
@ -266,25 +264,6 @@ export const ChangeRequestOverview: FC = () => {
|
||||
|
||||
const countOfChanges = changesCount(changeRequest);
|
||||
|
||||
const reason = (() => {
|
||||
if (!('schedule' in changeRequest)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
switch (changeRequest.schedule.status) {
|
||||
case 'failed':
|
||||
return (
|
||||
(changeRequest.schedule.reason ||
|
||||
changeRequest.schedule.failureReason) ??
|
||||
undefined
|
||||
);
|
||||
case 'suspended':
|
||||
return changeRequest.schedule.reason;
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
})();
|
||||
|
||||
const scheduledAt =
|
||||
'schedule' in changeRequest
|
||||
? changeRequest.schedule.scheduledAt
|
||||
@ -421,10 +400,9 @@ export const ChangeRequestOverview: FC = () => {
|
||||
|
||||
<ConditionallyRender
|
||||
condition={
|
||||
changeRequestPlaygroundEnabled &&
|
||||
(changeRequest.state === 'In review' ||
|
||||
changeRequest.state === 'Approved' ||
|
||||
changeRequest.state === 'Scheduled')
|
||||
changeRequest.state === 'In review' ||
|
||||
changeRequest.state === 'Approved' ||
|
||||
changeRequest.state === 'Scheduled'
|
||||
}
|
||||
show={
|
||||
<StyledButton
|
||||
|
@ -12,9 +12,7 @@ beforeEach(() => {
|
||||
versionInfo: {
|
||||
current: { oss: 'version', enterprise: 'version' },
|
||||
},
|
||||
flags: {
|
||||
changeRequestPlayground: true,
|
||||
},
|
||||
flags: {},
|
||||
});
|
||||
testServerRoute(
|
||||
server,
|
||||
|
@ -29,7 +29,6 @@ import {
|
||||
import Clear from '@mui/icons-material/Clear';
|
||||
import { ProjectSelect } from '../../../../common/ProjectSelect/ProjectSelect';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import { EnvironmentsField } from './EnvironmentsField/EnvironmentsField';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
@ -99,8 +98,6 @@ export const PlaygroundConnectionFieldset: FC<
|
||||
|
||||
const { projects: availableProjects } = useProjects();
|
||||
|
||||
const changeRequestPlaygroundEnabled = useUiFlag('changeRequestPlayground');
|
||||
|
||||
const projectsOptions = [
|
||||
allOption,
|
||||
...availableProjects.map(({ name: label, id }) => ({
|
||||
@ -269,9 +266,7 @@ export const PlaygroundConnectionFieldset: FC<
|
||||
/>
|
||||
</Box>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(
|
||||
changeRequestPlaygroundEnabled && changeRequest,
|
||||
)}
|
||||
condition={Boolean(changeRequest)}
|
||||
show={
|
||||
<Box sx={{ display: 'flex', gap: 2 }}>
|
||||
<Box sx={{ flex: 1 }}>
|
||||
|
@ -92,7 +92,6 @@ export type UiFlags = {
|
||||
insightsV2?: boolean;
|
||||
integrationEvents?: boolean;
|
||||
newEventSearch?: boolean;
|
||||
changeRequestPlayground?: boolean;
|
||||
archiveProjects?: boolean;
|
||||
projectListImprovements?: boolean;
|
||||
};
|
||||
|
@ -80,7 +80,6 @@ exports[`should create default config 1`] = `
|
||||
"automatedActions": false,
|
||||
"caseInsensitiveInOperators": false,
|
||||
"celebrateUnleash": false,
|
||||
"changeRequestPlayground": false,
|
||||
"collectTrafficDataUsage": false,
|
||||
"demo": false,
|
||||
"disableBulkToggle": false,
|
||||
|
@ -63,7 +63,6 @@ export type IFlagKey =
|
||||
| 'integrationEvents'
|
||||
| 'originMiddleware'
|
||||
| 'newEventSearch'
|
||||
| 'changeRequestPlayground'
|
||||
| 'archiveProjects'
|
||||
| 'projectListImprovements'
|
||||
| 'useProjectReadModel'
|
||||
@ -309,10 +308,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_NEW_EVENT_SEARCH,
|
||||
false,
|
||||
),
|
||||
changeRequestPlayground: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_CHANGE_REQUEST_PLAYGROUND,
|
||||
false,
|
||||
),
|
||||
archiveProjects: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_ARCHIVE_PROJECTS,
|
||||
false,
|
||||
|
@ -56,7 +56,6 @@ process.nextTick(async () => {
|
||||
integrationEvents: true,
|
||||
originMiddleware: true,
|
||||
newEventSearch: true,
|
||||
changeRequestPlayground: true,
|
||||
projectListImprovements: true,
|
||||
useProjectReadModel: true,
|
||||
webhookServiceNameLogging: true,
|
||||
|
Loading…
Reference in New Issue
Block a user