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

refactor: white space

This commit is contained in:
FredrikOseberg 2025-10-21 14:34:03 +02:00
parent 0bdf2d3d1c
commit f19df22fd6
No known key found for this signature in database
GPG Key ID: 282FD8A6D8F9BCF0

View File

@ -75,13 +75,9 @@ interface IReleasePlanMilestoneItemProps {
activeIndex: number; activeIndex: number;
environmentIsDisabled?: boolean; environmentIsDisabled?: boolean;
readonly?: boolean; readonly?: boolean;
// Automation-related
milestoneProgressionsEnabled: boolean; milestoneProgressionsEnabled: boolean;
progressionFormOpenIndex: number | null; progressionFormOpenIndex: number | null;
onSetProgressionFormOpenIndex: (index: number | null) => void; onSetProgressionFormOpenIndex: (index: number | null) => void;
// API callbacks
onStartMilestone?: (milestone: IReleasePlanMilestone) => void; onStartMilestone?: (milestone: IReleasePlanMilestone) => void;
onDeleteProgression: (milestone: IReleasePlanMilestone) => void; onDeleteProgression: (milestone: IReleasePlanMilestone) => void;
onAddToChangeRequest: ( onAddToChangeRequest: (
@ -96,17 +92,12 @@ interface IReleasePlanMilestoneItemProps {
payload: UpdateMilestoneProgressionSchema; payload: UpdateMilestoneProgressionSchema;
}, },
) => void; ) => void;
// Context
getPendingProgressionChange: ( getPendingProgressionChange: (
sourceMilestoneId: string, sourceMilestoneId: string,
) => PendingProgressionChange | null; ) => PendingProgressionChange | null;
// IDs
projectId: string; projectId: string;
environment: string; environment: string;
featureName: string; featureName: string;
onUpdate: () => void | Promise<void>; onUpdate: () => void | Promise<void>;
} }
@ -143,7 +134,6 @@ export const ReleasePlanMilestoneItem = ({
const handleCloseProgressionForm = () => const handleCloseProgressionForm = () =>
onSetProgressionFormOpenIndex(null); onSetProgressionFormOpenIndex(null);
// Unified handler for creating progression
const handleCreateProgression = async ( const handleCreateProgression = async (
payload: CreateMilestoneProgressionSchema, payload: CreateMilestoneProgressionSchema,
) => { ) => {
@ -174,7 +164,6 @@ export const ReleasePlanMilestoneItem = ({
} }
}; };
// Unified handler for updating progression
const handleUpdateProgression = async ( const handleUpdateProgression = async (
payload: UpdateMilestoneProgressionSchema, payload: UpdateMilestoneProgressionSchema,
): Promise<{ shouldReset?: boolean }> => { ): Promise<{ shouldReset?: boolean }> => {
@ -184,7 +173,6 @@ export const ReleasePlanMilestoneItem = ({
sourceMilestoneId: milestone.id, sourceMilestoneId: milestone.id,
payload, payload,
}); });
// Return shouldReset=true for change requests so form resets to current value
return { shouldReset: true }; return { shouldReset: true };
} }
@ -201,7 +189,6 @@ export const ReleasePlanMilestoneItem = ({
text: 'Automation updated successfully', text: 'Automation updated successfully',
}); });
await onUpdate(); await onUpdate();
// Return empty object for direct updates - form will sync via useEffect
return {}; return {};
} catch (error: unknown) { } catch (error: unknown) {
setToastApiError(formatUnknownError(error)); setToastApiError(formatUnknownError(error));