This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 73ddeb7a040 [v3-1-test] fix(ui): only apply elk.portConstraints for LR 
orientation in graph view (#62144) (#62187)
73ddeb7a040 is described below

commit 73ddeb7a0402c8470668377fc1e9a9dfce0b079b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Feb 20 11:44:08 2026 +0100

    [v3-1-test] fix(ui): only apply elk.portConstraints for LR orientation in 
graph view (#62144) (#62187)
    
    The `elk.portConstraints: "FIXED_SIDE"` layout option breaks ELK.js
    layout for non-LR orientations (TB, BT, RL) when TaskGroups are present,
    causing nodes to spread horizontally and overlap. This is a regression
    introduced between 3.0.6 and 3.1.x.
    
    Conditionally apply the constraint only for RIGHT (LR) direction,
    restoring correct layout behavior for all orientations.
    (cherry picked from commit d2377a9bed131adfaa9c08f16d68f5162518fda3)
    
    
    Closes: #61384
    
    Co-authored-by: Michael Silvestre 
<[email protected]>
---
 airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts 
b/airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts
index 7d1711efe64..de6548993af 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts
@@ -164,7 +164,7 @@ const generateElkGraph = ({
         label: node.label,
         layoutOptions: {
           "elk.padding": "[top=80,left=15,bottom=15,right=15]",
-          "elk.portConstraints": "FIXED_SIDE",
+          ...(direction === "RIGHT" ? { "elk.portConstraints": "FIXED_SIDE" } 
: {}),
         },
       };
     }
@@ -215,7 +215,7 @@ const generateElkGraph = ({
       isGroup: Boolean(node.children),
       isMapped: node.is_mapped === null ? undefined : node.is_mapped,
       label: node.label,
-      layoutOptions: { "elk.portConstraints": "FIXED_SIDE" },
+      layoutOptions: direction === "RIGHT" ? { "elk.portConstraints": 
"FIXED_SIDE" } : undefined,
       operator: node.operator,
       setupTeardownType: node.setup_teardown_type,
       type: node.type,

Reply via email to