1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00

chore: set min height in release template dialog

This commit is contained in:
Nuno Góis 2025-09-23 11:37:15 +01:00
parent 38de4db3e2
commit 9c84c422d0
No known key found for this signature in database
GPG Key ID: 71ECC689F1091765

View File

@ -19,10 +19,17 @@ import CloseIcon from '@mui/icons-material/Close';
const StyledDialog = styled(Dialog)(({ theme }) => ({
'& .MuiDialog-paper': {
borderRadius: theme.shape.borderRadiusLarge,
width: theme.breakpoints.values.md,
},
}));
const StyledScrollableContent = styled(Box)(({ theme }) => ({
width: theme.breakpoints.values.md,
minHeight: '318px',
overflowY: 'auto',
display: 'flex',
flexDirection: 'column',
}));
const StyledHeader = styled(Box)(({ theme }) => ({
display: 'flex',
justifyContent: 'space-between',
@ -104,30 +111,35 @@ export const ReleasePlanReviewDialog = ({
Go back
</Button>
</StyledSubHeader>
{activeReleasePlan && (
<Box sx={{ px: 4, pb: 2 }}>
<Alert severity='error'>
This feature environment currently has{' '}
<strong>{activeReleasePlan.name}</strong> -{' '}
<strong>{activeReleasePlan.milestones[0].name}</strong>
{environmentEnabled ? ' running' : ' paused'}. Adding a
new release plan will replace the existing release plan.
</Alert>
<StyledScrollableContent>
{activeReleasePlan && (
<Box sx={{ px: 4, pb: 2 }}>
<Alert severity='error'>
This feature environment currently has{' '}
<strong>{activeReleasePlan.name}</strong> -{' '}
<strong>
{activeReleasePlan.milestones[0].name}
</strong>
{environmentEnabled ? ' running' : ' paused'}.
Adding a new release plan will replace the existing
release plan.
</Alert>
</Box>
)}
<Box sx={{ px: 2 }}>
<ReleasePlan plan={planPreview} readonly />
</Box>
)}
<Box sx={{ px: 2 }}>
<ReleasePlan plan={planPreview} readonly />
</Box>
{crProtected && (
<Box sx={{ px: 4, pt: 1 }}>
<Typography>
<strong>Adding</strong> release template{' '}
<strong>{template?.name}</strong> to{' '}
<strong>{featureName}</strong> in{' '}
<strong>{environment}</strong>.
</Typography>
</Box>
)}
{crProtected && (
<Box sx={{ px: 4, pt: 1 }}>
<Typography>
<strong>Adding</strong> release template{' '}
<strong>{template?.name}</strong> to{' '}
<strong>{featureName}</strong> in{' '}
<strong>{environment}</strong>.
</Typography>
</Box>
)}
</StyledScrollableContent>
<StyledDialogActions>
<Button variant='contained' color='primary' onClick={onConfirm}>
{crProtected ? 'Add suggestion to draft' : 'Apply template'}