This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 5baae778407 Revert "[v3-1-test] Fix text selection jumping in logs
pane to match text edi…" (#57874)
5baae778407 is described below
commit 5baae7784074754f478021aa4e1ac6c1de22cd22
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Wed Nov 5 17:13:08 2025 +0100
Revert "[v3-1-test] Fix text selection jumping in logs pane to match text
edi…" (#57874)
This reverts commit e4d4514aeee0eb330599eceabdf61df453db496f.
---
.../src/pages/TaskInstance/Logs/TaskLogContent.tsx | 25 ++--------------------
1 file changed, 2 insertions(+), 23 deletions(-)
diff --git
a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx
b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx
index 8347bc54ee6..dab2a4c6676 100644
--- a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx
@@ -100,11 +100,6 @@ export const TaskLogContent = ({ error, isLoading,
logError, parsedLogs, wrap }:
}
}, [isLoading, rowVirtualizer, hash, parsedLogs]);
- useLayoutEffect(() => {
- // Force remeasurement when wrap changes since item heights will change
- rowVirtualizer.measure();
- }, [wrap, rowVirtualizer]);
-
const handleScrollTo = (to: "bottom" | "top") => {
if (parsedLogs.length > 0) {
rowVirtualizer.scrollToIndex(to === "bottom" ? parsedLogs.length - 1 :
0);
@@ -131,17 +126,10 @@ export const TaskLogContent = ({ error, isLoading,
logError, parsedLogs, wrap }:
position="relative"
py={3}
ref={parentRef}
- textWrap={wrap ? "pre-wrap" : "nowrap"}
+ textWrap={wrap ? "pre" : "nowrap"}
width="100%"
>
- <VStack
- alignItems="flex-start"
- gap={0}
- h={`${rowVirtualizer.getTotalSize()}px`}
- minH="100%"
- position="relative"
- width="100%"
- >
+ <VStack alignItems="flex-start" gap={0}
h={`${rowVirtualizer.getTotalSize()}px`}>
{rowVirtualizer.getVirtualItems().map((virtualRow) => (
<Box
_ltr={{
@@ -158,7 +146,6 @@ export const TaskLogContent = ({ error, isLoading,
logError, parsedLogs, wrap }:
data-index={virtualRow.index}
data-testid={`virtualized-item-${virtualRow.index}`}
key={virtualRow.key}
- minWidth="100%"
position="absolute"
ref={rowVirtualizer.measureElement}
top={`${virtualRow.start}px`}
@@ -167,14 +154,6 @@ export const TaskLogContent = ({ error, isLoading,
logError, parsedLogs, wrap }:
{parsedLogs[virtualRow.index] ?? undefined}
</Box>
))}
- <Box
- bottom={0}
- left={0}
- minH={`calc(100% - ${rowVirtualizer.getTotalSize()}px)`}
- position="absolute"
- top={`${rowVirtualizer.getTotalSize()}px`}
- width="100%"
- />
</VStack>
</Code>