bbovenzi commented on code in PR #47994:
URL: https://github.com/apache/airflow/pull/47994#discussion_r2021053617


##########
airflow-core/src/airflow/ui/src/layouts/Details/Grid/Grid.tsx:
##########
@@ -73,13 +73,21 @@ export const Grid = ({ limit }: Props) => {
     [structure?.nodes, openGroupIds],
   );
 
+  const maxTaskNameLength = Math.max.apply(
+    undefined,
+    flatNodes.map((node) => node.label.length),
+  );
+
+  const extraPadding = maxTaskNameLength < 20 ? 30 : 0;
+  const taskNameWidth = maxTaskNameLength > 30 ? "150px" : 
`${maxTaskNameLength * 8 + extraPadding}px`;
+
   return (
-    <Flex justifyContent="flex-end" mr={3} position="relative" pt={50} 
width="100%">
-      <Box position="absolute" top="150px" width="100%">
+    <Flex justifyContent="flex-start" mr={3} position="relative" pt={50} 
width="100%">
+      <Box position="absolute" top="150px" width={taskNameWidth}>
         <TaskNames nodes={flatNodes} />
       </Box>
       <Box>
-        <Flex position="relative">
+        <Flex ml={taskNameWidth} position="absolute">

Review Comment:
   Yes, we probably need to rearrange a bit of this css so the task name column 
can do something like flexGrow={1} to fit the available space instead of 
needing this absolute positioning.



-- 
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]

Reply via email to