pierrejeambrun commented on code in PR #63180:
URL: https://github.com/apache/airflow/pull/63180#discussion_r2989628970


##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx:
##########
@@ -83,6 +86,12 @@ export const TaskLogContent = ({ error, isLoading, logError, 
parsedLogs, wrap }:
   const hash = location.hash.replace("#", "");
   const parentRef = useRef<HTMLDivElement | null>(null);
 
+  // Track whether user is at the bottom so we don't hijack their scroll 
position
+  // if they scrolled up to read something
+  const isAtBottomRef = useRef<boolean>(true);
+  // Track previous log count to detect new lines arriving
+  const prevLogCountRef = useRef<number>(0);
+

Review Comment:
   We're using Ref but the usage we have is similar to a 'state' instead. I'm 
not sure why using a Ref is preferable?



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