sujitha-saranam opened a new pull request, #54257: URL: https://github.com/apache/airflow/pull/54257
This PR replaces #54172 (that PR was auto-closed after the branch was deleted). #### Overview This PR addresses https://github.com/apache/airflow/issues/53919 ensures that the Expand/Collapse all groups buttons are consistently visible in both the Grid and Graph views. #### Root Cause: The Expand/Collapse all groups buttons are visible only when the DAG contains task groups. These task groups (allGroupIds) were being calculated only in graph.tsx, but not in grid.tsx. As a result, the buttons were not rendered in the Grid view unless the Graph view was opened first, which triggered the group ID calculation. #### Solution: Refactored the task group calculation logic into a shared hook so it can be reused in both graph.tsx and grid.tsx, ensuring consistent visibility of the buttons across both views. #### Changes Made: - Extracted task group calculation logic from graph.tsx into a new reusable hook: useGraphStructureSync.tsx. - This hook syncs the DAG's task group data (allGroupIds) by fetching and flattening graph nodes. - Imported and used the hook in both graph.tsx and grid.tsx to ensure task group data is consistently available. #### Related issue: https://github.com/apache/airflow/issues/53919 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
