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


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:
##########
@@ -17,22 +17,39 @@
  * under the License.
  */
 import { Box, Code, VStack, useToken } from "@chakra-ui/react";
-import type { ReactNode } from "react";
-import { useLayoutEffect } from "react";
+import { useVirtualizer } from "@tanstack/react-virtual";
+import { useLayoutEffect, useRef } from "react";
 
 import { ErrorAlert } from "src/components/ErrorAlert";
 import { ProgressBar } from "src/components/ui";
 
+const EMPTY_ARRAY: Array<JSX.Element | string | undefined> = [];
+
 type Props = {
   readonly error: unknown;
+  readonly height?: number | string;
   readonly isLoading: boolean;
   readonly logError: unknown;
-  readonly parsedLogs: ReactNode;
+  readonly parsedLogs: Array<JSX.Element | string | undefined> | undefined;
   readonly wrap: boolean;
 };
 
-export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap 
}: Props) => {
+export const TaskLogContent = ({
+  error,
+  height = "600px",
+  isLoading,
+  logError,
+  parsedLogs = EMPTY_ARRAY,
+  wrap,
+}: Props) => {
   const [bgLine] = useToken("colors", ["blue.emphasized"]);
+  const parentRef = useRef(null);
+  const rowVirtualizer = useVirtualizer({
+    count: parsedLogs.length,
+    estimateSize: () => 20,

Review Comment:
   Can you add a video of the Task Log previews we have in the Dag Overview 
page? We should make sure the visible portion of the virtualized list is 
shorter for those.



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