1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

feat: show draft automation inline in release plans (#10856)

This commit is contained in:
Fredrik Strand Oseberg 2025-10-24 09:34:01 +02:00 committed by GitHub
parent dc745cfac8
commit 0e26f463e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 23 deletions

View File

@ -36,12 +36,6 @@ const StyledAddAutomationButton = styled(Button)(({ theme }) => ({
},
}));
const StyledAddAutomationContainer = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(1),
}));
interface MilestoneAutomationProps {
milestone: IReleasePlanMilestone;
status: MilestoneStatus;
@ -82,8 +76,6 @@ export const MilestoneAutomation = ({
return null;
}
const hasPendingCreate =
pendingProgressionChange?.action === 'createMilestoneProgression';
const hasPendingChange =
pendingProgressionChange?.action === 'changeMilestoneProgression';
const hasPendingDelete =
@ -117,18 +109,13 @@ export const MilestoneAutomation = ({
badge={badge}
/>
) : (
<StyledAddAutomationContainer>
<StyledAddAutomationButton
onClick={onOpenProgressionForm}
color='primary'
startIcon={<Add />}
>
Add automation
</StyledAddAutomationButton>
{hasPendingCreate && (
<Badge color='warning'>Modified in draft</Badge>
)}
</StyledAddAutomationContainer>
<StyledAddAutomationButton
onClick={onOpenProgressionForm}
color='primary'
startIcon={<Add />}
>
Add automation
</StyledAddAutomationButton>
)}
</MilestoneAutomationSection>
);

View File

@ -97,7 +97,8 @@ export const ReleasePlanMilestoneItem = ({
sourceMilestone: milestone.id,
},
});
return { shouldReset: true };
handleCloseProgressionForm();
return {};
}
try {

View File

@ -15,10 +15,10 @@ export const getPendingProgressionData = (
): PendingProgressionChangeResult => {
const pendingProgressionChange = getPendingProgressionChange(milestone.id);
// Determine effective transition condition (use pending create if exists)
// Determine effective transition condition (use pending change if exists)
let effectiveTransitionCondition = milestone.transitionCondition;
if (
pendingProgressionChange?.action === 'createMilestoneProgression' &&
pendingProgressionChange?.action === 'changeMilestoneProgression' &&
'transitionCondition' in pendingProgressionChange.payload &&
pendingProgressionChange.payload.transitionCondition
) {