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

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ee10bbb994c fix: calculate TaskName indentation instead of using 
chakra spacing vars (#54419)
ee10bbb994c is described below

commit ee10bbb994c0f732727811929e58e1185f65f532
Author: codecae <[email protected]>
AuthorDate: Tue Aug 12 14:37:31 2025 -0400

    fix: calculate TaskName indentation instead of using chakra spacing vars 
(#54419)
    
    Co-authored-by: Curtis Bangert <[email protected]>
---
 airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx 
b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx
index 05df276a493..c58a992002f 100644
--- a/airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx
+++ b/airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx
@@ -49,6 +49,8 @@ const onMouseLeave = (event: MouseEvent<HTMLDivElement>) => {
   });
 };
 
+const indent = (depth: number) => `${depth * 0.75 + 0.5}rem`;
+
 export const TaskNames = ({ nodes, onRowClick }: Props) => {
   const { t: translate } = useTranslation("dag");
   const { toggleGroupId } = useOpenGroups();
@@ -86,7 +88,7 @@ export const TaskNames = ({ nodes, onRowClick }: Props) => {
                 isGroup={true}
                 isMapped={Boolean(node.is_mapped)}
                 label={node.label}
-                paddingLeft={node.depth * 3 + 2}
+                paddingLeft={indent(node.depth)}
                 setupTeardownType={node.setup_teardown_type}
               />
               <chakra.span
@@ -129,7 +131,7 @@ export const TaskNames = ({ nodes, onRowClick }: Props) => {
               fontWeight="normal"
               isMapped={Boolean(node.is_mapped)}
               label={node.label}
-              paddingLeft={node.depth * 3 + 2}
+              paddingLeft={indent(node.depth)}
               setupTeardownType={node.setup_teardown_type}
             />
           </RouterLink>

Reply via email to