Skip to content

Add "Tidy up workflow" in workflow command menu #1586

@Bonapara

Description

@Bonapara

Current behavior

To tidy up a workflow, you either have to right-click the canvas and click "Tidy up workflow"

Desired Behavior

We want to add a "Tidy up workflow" button in the command menu ⌘K. Icon should be a reorder tabler icon

Image

Technical strategy

  1. Split useTidyUpWorkflowVersion into two separated hooks. One for retrieving diagram from context, the other to perform the query:
  • first one will be called useTidyUp. It will get the workflowDiagram from component context (as it's done today) and call useTidyUpWorkflowVersion
  • second one will be called useTidyUpWorkflowVersion, like today, but it will receive the diagram as input (instead of retrieving from context) and perform the apollo query
  1. Create a new action 'TIDY_UP' in WORKFLOW_ACTIONS_CONFIG. It should receive workflowWithCurrentVersion as input

  2. Create a new component TidyUpWorkflowSingleRecordAction. Take example for other workflow actions. It should:

  • call getWorkflowVersionDiagram on the workflow version
  • then call useTidyUpWorkflowVersion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🔖 Planned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions