bbovenzi commented on code in PR #47994:
URL: https://github.com/apache/airflow/pull/47994#discussion_r2021050866
##########
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}>
Review Comment:
<img width="586" alt="Screenshot 2025-03-28 at 1 14 49 PM"
src="https://github.com/user-attachments/assets/74be036c-1918-4063-b1fa-d9272480bc99"
/>
So this doesn't quite work. The task name has a max of 150px even if I have
plenty of space.
We really need the box with the task names to grow to fit the available
width.
--
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]