Skip to content

Refactor execution input dialog

Loic Huder requested to merge refactor-execution-input-dialog into main

In prevision for the addition of the workers selection feature, I started refactoring the execution input dialog since it is a rather complex component.

The MR is threefold:

  1. Encapsulate things better.
  • Move all execution inputs components/models in a dedicated folders (0a7c3ccc)
  • Then, move stuff out of the ExecutionInputDialog so that we can better distinguish functional blocks (da513f02, 659917c1, 8f115905)
  1. Rework ExecutionInputTableRow type that is at the heart of ExecutionInputDialog. (4c699305)
  • The type does not need to be close to the actual API call but must instead only contain fields that are actually relevant to the ExecutionInputDialog features.
  • Notably, I added a field target that holds the input target as 'All nodes' | 'All input nodes' | {id: string} to encompass all current usecases. It can easily be extended for future usecases (by label, by task identifier).
  1. Add tests for the ExecutionInputDialog. (4eedb931)
  • I had to add a bunch of aria-label to be able to find components in the Cypress tests.
  • This uncovered an important bug that needs to be fixed in a future MR: input of type number are still JSON serialized as string.

Tell me if these refactorings make sense to you. It might easier to review commit by commit.

Edited by Loic Huder

Merge request reports

Loading