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