Skip to content

Commit 63eb59d

Browse files
guan404mingRoyLee1224
authored andcommitted
Update renderStructuredLog and TaskLogContent to support RTL (apache#51853)
1 parent e38ad85 commit 63eb59d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

airflow-core/src/airflow/ui/src/components/renderStructuredLog.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const renderStructuredLog = ({
160160
));
161161

162162
return (
163-
<chakra.details key={error.exc_type} ml="20em" open={true}>
163+
<chakra.details key={error.exc_type} ms="20em" open={true}>
164164
<chakra.summary data-testid={`summary-${error.exc_type}`}>
165165
<chakra.span color="fg.info" cursor="pointer">
166166
{error.exc_type}: {error.exc_value}
@@ -203,9 +203,9 @@ export const renderStructuredLog = ({
203203
style={{
204204
display: "inline-block",
205205
flexShrink: 0,
206-
marginRight: "10px",
207-
paddingRight: "5px",
208-
textAlign: "right",
206+
marginInlineEnd: "10px",
207+
paddingInlineEnd: "5px",
208+
textAlign: "end",
209209
userSelect: "none",
210210
WebkitUserSelect: "none",
211211
width: "3em",

airflow-core/src/airflow/ui/src/pages/TaskInstance/Logs/TaskLogContent.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,17 @@ export const TaskLogContent = ({ error, isLoading, logError, parsedLogs, wrap }:
8282
<VStack alignItems="flex-start" gap={0} h={`${rowVirtualizer.getTotalSize()}px`}>
8383
{rowVirtualizer.getVirtualItems().map((virtualRow) => (
8484
<Box
85+
_ltr={{
86+
left: 0,
87+
right: "auto",
88+
}}
89+
_rtl={{
90+
left: "auto",
91+
right: 0,
92+
}}
8593
data-index={virtualRow.index}
8694
data-testid={`virtualized-item-${virtualRow.index}`}
8795
key={virtualRow.key}
88-
left={0}
8996
position="absolute"
9097
ref={rowVirtualizer.measureElement}
9198
top={0}

0 commit comments

Comments
 (0)