You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rsilvestre (via GitHub)" <gi...@apache.org> on 2026/02/04 08:17:55 UTC

Re: [I] Graph View layout broken for TB/RL/BT orientations when using TaskGroups (nodes spread horizontally) [airflow]

rsilvestre commented on issue #61384:
URL: https://github.com/apache/airflow/issues/61384#issuecomment-3846006242

   ## Fix Available
   
   I've identified the root cause and created a fix for this issue.
   
   **Root Cause:** The `elk.portConstraints: "FIXED_SIDE"` added in 3.1.6 breaks graph layout for TB/RL/BT orientations when TaskGroups are present. This constraint should only be applied for RIGHT (LR) orientation.
   
   **Solution:** Conditionally apply `elk.portConstraints` only when `direction === "RIGHT"`, restoring 3.0.6 behavior for other orientations.
   
   **Patch:** https://gist.github.com/rsilvestre/e37315e3677253eec075f3d5af31f460
   
   The patch modifies `airflow-core/src/airflow/ui/src/components/Graph/useGraphLayout.ts` to:
   1. Only apply `elk.portConstraints` for open TaskGroup nodes when `direction === "RIGHT"`
   2. Only apply `elk.portConstraints` for individual nodes when `direction === "RIGHT"`
   
   **To apply:**
   cd /path/to/apache/airflow
   git apply graph-layout-orientation-fix.patch
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org