Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
74 stars 81 forks source link

Parallel branches which "run after" multiple parallel actions render very awkwardly #5587

Open ek68794998 opened 2 weeks ago

ek68794998 commented 2 weeks ago

Describe the Bug with repro steps

  1. Add a trigger
  2. Add an Initialize Variable action
  3. Add a parallel branch from trigger w/ a new Initialize Variable action
  4. Add another parallel branch from trigger w/ a new Initialize Variable action
  5. Add a Current Time action on one of the branches
  6. Add another Current Time action after the one in step 5
  7. Set the Run After configuration for both Current Time actions to be after all 3 Initialize Variable actions succeed

What actually happens: image

What I would expect: image

What type of Logic App Is this happening in?

Consumption (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {
      "Initialize_variable": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "",
              "type": "boolean"
            }
          ]
        },
        "runAfter": {}
      },
      "Initialize_variable_1": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "",
              "type": "boolean"
            }
          ]
        },
        "runAfter": {}
      },
      "Initialize_variable_2": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "",
              "type": "boolean"
            }
          ]
        },
        "runAfter": {}
      },
      "Current_time": {
        "type": "Expression",
        "kind": "CurrentTime",
        "inputs": {},
        "runAfter": {
          "Initialize_variable_2": [
            "SUCCEEDED"
          ],
          "Initialize_variable_1": [
            "SUCCEEDED"
          ],
          "Initialize_variable": [
            "SUCCEEDED"
          ]
        }
      },
      "Current_time-copy": {
        "type": "Expression",
        "kind": "CurrentTime",
        "inputs": {},
        "runAfter": {
          "Initialize_variable_1": [
            "SUCCEEDED"
          ],
          "Initialize_variable": [
            "SUCCEEDED"
          ],
          "Initialize_variable_2": [
            "SUCCEEDED"
          ]
        }
      }
    },
    "contentVersion": "1.0.0.0",
    "outputs": {},
    "triggers": {
      "Recurrence": {
        "type": "Recurrence",
        "recurrence": {
          "interval": 3,
          "frequency": "Minute"
        }
      }
    }
  },
  "connectionReferences": {},
  "parameters": {}
}

Screenshots or Videos

No response

Browser

Additional context

No response

rllyy97 commented 2 weeks ago

This sort of behavior is pretty tricky from just first impressions, and it also cuts out a couple places users might want to add nodes. ie. if you want to add a node between a specific parent and a specific child that isn't possible with your example solution. I do agree it renders very awkward/bad, but I'm not sure what a better option would be with this configuration of run afters. I'm not sure this is a very common use-case as well so I'm not sure it's worth investigating for the amount of time/effort it would take to fix

rllyy97 commented 2 weeks ago

I think there's bound to be some overlap, even if we changed the line shape there's still edge button/midpoint overlap just because of the layout of the nodes.

If we do want to make some sort of change here, I think we may need to have some discussions about changing the edge shape for start/end readability, and having conditional visibility on the edge buttons under certain circumstances (ie. if a node is selected only show the edge buttons connected to that node)

image