From 5cce1ba6bbbfd0a5386dd082065ec9ad8ce44748 Mon Sep 17 00:00:00 2001 From: Dheeraj Turaga Date: Thu, 30 Apr 2026 20:56:13 -0500 Subject: [PATCH] [v3-2-test] UI: Make DAG detail page scrollable on mobile viewports (#65899) On phones the horizontal split between the Graph/Grid/Gantt pane and the Details pane was squeezed to ~200px each, and nested overflow:hidden containers hid the panes' internal scrollbars. The page was effectively unusable on mobile. Pin a 1280px min-width on the DAG page wrapper below Chakra's breakpoint and switch the main-content box to overflow=auto so the browser exposes horizontal and vertical scrollbars. Desktop layout (>=768px) is unchanged. (cherry picked from commit e6f5de4f5eda87c702a5a1c7625ba395221cce48) Co-authored-by: Dheeraj Turaga --- .../src/airflow/ui/src/layouts/BaseLayout.tsx | 2 +- .../ui/src/layouts/Details/DetailsLayout.tsx | 347 +++++++++--------- 2 files changed, 178 insertions(+), 171 deletions(-) diff --git a/airflow-core/src/airflow/ui/src/layouts/BaseLayout.tsx b/airflow-core/src/airflow/ui/src/layouts/BaseLayout.tsx index 30023505e6273..062caca76d342 100644 --- a/airflow-core/src/airflow/ui/src/layouts/BaseLayout.tsx +++ b/airflow-core/src/airflow/ui/src/layouts/BaseLayout.tsx @@ -113,7 +113,7 @@ export const BaseLayout = ({ children }: PropsWithChildren) => { flex={1} flexDirection="column" minH={0} - overflowY="auto" + overflow="auto" p={3} > {baseReactPlugins.map((plugin) => ( diff --git a/airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx b/airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx index dacd6171f5dda..89f9507cdb5f1 100644 --- a/airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx +++ b/airflow-core/src/airflow/ui/src/layouts/Details/DetailsLayout.tsx @@ -110,191 +110,198 @@ export const DetailsLayout = ({ children, error, isLoading, tabs }: Props) => { return ( - - - - - {dag === undefined ? undefined : ( - - )} - - - - - - {isRightPanelCollapsed ? ( - - setIsRightPanelCollapsed(false)} - position="absolute" - right={direction === "ltr" ? "-5px" : undefined} - size="2xs" - top="50%" - zIndex={10} - > - {direction === "ltr" ? : } - - - ) : undefined} - - - - + + + + + {dag === undefined ? undefined : ( + - {dagView === "graph" ? ( - - ) : ( - - - {showGantt ? ( - + + + + + {isRightPanelCollapsed ? ( + + setIsRightPanelCollapsed(false)} + position="absolute" + right={direction === "ltr" ? "-5px" : undefined} + size="2xs" + top="50%" + zIndex={10} + > + {direction === "ltr" ? : } + + + ) : undefined} + + + + + {dagView === "graph" ? ( + + ) : ( + + - ) : undefined} - - )} - - - {!isRightPanelCollapsed && ( - <> - { - if (!isDragging) { - const zoom = getZoom(); + {showGantt ? ( + + ) : undefined} + + )} + + + {!isRightPanelCollapsed && ( + <> + { + if (!isDragging) { + const zoom = getZoom(); - void fitView({ maxZoom: zoom, minZoom: zoom }); - } - }} - > - console.log(e)} - /> - + void fitView({ maxZoom: zoom, minZoom: zoom }); + } + }} + > + console.log(e)} + /> + - {/* Collapse button positioned next to the resize handle */} + {/* Collapse button positioned next to the resize handle */} - - - - setIsRightPanelCollapsed(true)} - position="absolute" - right={direction === "rtl" ? "-5px" : undefined} - size="2xs" - top="50%" - zIndex={2} - > - {direction === "ltr" ? : } - - - {children} - {Boolean(error) || (warningData?.dag_warnings.length ?? 0) > 0 ? ( - <> - + + + setIsRightPanelCollapsed(true)} + position="absolute" + right={direction === "rtl" ? "-5px" : undefined} + size="2xs" + top="50%" + zIndex={2} > - : } + + + {children} + {Boolean(error) || (warningData?.dag_warnings.length ?? 0) > 0 ? ( + <> + - - - + + + + - - - ) : undefined} - - - - + + + ) : undefined} + + + + + - - - - )} - + + + )} + +