diff --git a/frontend/src/component/playground/Playground/PlaygroundForm/PlaygroundConnectionFieldset/PlaygroundConnectionFieldset.tsx b/frontend/src/component/playground/Playground/PlaygroundForm/PlaygroundConnectionFieldset/PlaygroundConnectionFieldset.tsx index ca7e024cf9..58205a355e 100644 --- a/frontend/src/component/playground/Playground/PlaygroundForm/PlaygroundConnectionFieldset/PlaygroundConnectionFieldset.tsx +++ b/frontend/src/component/playground/Playground/PlaygroundForm/PlaygroundConnectionFieldset/PlaygroundConnectionFieldset.tsx @@ -8,6 +8,7 @@ import { import { Autocomplete, Box, + Button, IconButton, InputAdornment, styled, @@ -29,6 +30,8 @@ import { } from '../../playground.utils'; 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'; interface IPlaygroundConnectionFieldsetProps { environments: string[]; @@ -51,6 +54,21 @@ const SmallClear = styled(Clear)({ fontSize: '1.25rem', }); +const StyledInput = styled(Input)(() => ({ + width: '100%', +})); + +const StyledGrid = styled(Box)(({ theme }) => ({ + display: 'grid', + columnGap: theme.spacing(2), + rowGap: theme.spacing(4), + gridTemplateColumns: '1fr', + + [theme.breakpoints.up('md')]: { + gridTemplateColumns: '1fr 1fr', + }, +})); + export const PlaygroundConnectionFieldset: VFC< IPlaygroundConnectionFieldsetProps > = ({ @@ -68,6 +86,10 @@ export const PlaygroundConnectionFieldset: VFC< const { projects: availableProjects } = useProjects(); + const isChangeRequestPlaygroundEnabled = useUiFlag( + 'changeRequestPlayground', + ); + const projectsOptions = [ allOption, ...availableProjects.map(({ name: label, id }) => ({ @@ -209,8 +231,8 @@ export const PlaygroundConnectionFieldset: VFC< Access configuration - - + + - + - - + + + + + + {}} + type={'text'} + // error={Boolean(tokenError)} + // errorText={tokenError} + placeholder={'Enter your API token'} + data-testid={'PLAYGROUND_TOKEN_INPUT'} + // disabled + InputProps={{ + endAdornment: renderClearButton(), + sx: { + cursor: 'default', + }, + }} + /> + + + + } + /> + ); }; diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index c2d2cf554c..aa7f23a6b6 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -96,6 +96,7 @@ export type UiFlags = { integrationEvents?: boolean; improveCreateFlagFlow?: boolean; newEventSearch?: boolean; + changeRequestPlayground?: boolean; }; export interface IVersionInfo {