Implement creating node before initial step + deleting loop edge (#14525)

https://github.com/user-attachments/assets/d4ef0fa1-89e0-4848-9a4d-93dee81254f7

## Remaining to handle in future PRs

- It would be easier for the frontend if the loop edge was stored in the
backend instead of being an edge case the frontend must handle
- Optimistic rendering when deleting loop edge
This commit is contained in:
Baptiste Devessier
2025-09-16 13:50:56 +02:00
committed by GitHub
parent e505e9cf9f
commit 60de57f469
14 changed files with 74 additions and 178 deletions
@@ -1,10 +1,12 @@
import { createComponentState } from '@/ui/utilities/state/component-state/utils/createComponentState';
import { WorkflowVisualizerComponentInstanceContext } from '@/workflow/workflow-diagram/states/contexts/WorkflowVisualizerComponentInstanceContext';
import { type WorkflowStepConnectionOptions } from '@/workflow/workflow-diagram/workflow-iterator/types/WorkflowStepConnectionOptions';
type WorkflowInsertStepIdsState = {
parentStepId: string | undefined;
nextStepId: string | undefined;
position?: { x: number; y: number };
connectionOptions?: WorkflowStepConnectionOptions;
};
export const workflowInsertStepIdsComponentState =
@@ -14,6 +16,7 @@ export const workflowInsertStepIdsComponentState =
parentStepId: undefined,
nextStepId: undefined,
position: undefined,
connectionOptions: undefined,
},
componentInstanceContext: WorkflowVisualizerComponentInstanceContext,
});