Skip to content

Commit 75b8ff0

Browse files
feat: add tooltip for explaining task filter traversal (#61401)
* feat: add tooltip for explaining task filter traversal * fix: lint
1 parent 8f0920f commit 75b8ff0

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

airflow-core/src/airflow/ui/public/i18n/locales/en/dag.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"direction": "Direction",
130130
"label": "Filter",
131131
"mode": "Mode",
132+
"modeTooltip": "Static mode keeps the current view when navigating to different tasks, while Traverse mode automatically updates the active filter to the clicked task for easier DAG traversal.",
132133
"modes": {
133134
"static": "Static",
134135
"traverse": "Traverse"

airflow-core/src/airflow/ui/src/layouts/Details/TaskStreamFilter.tsx

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable max-lines */
2+
13
/*!
24
* Licensed to the Apache Software Foundation (ASF) under one
35
* or more contributor license agreements. See the NOTICE file
@@ -16,12 +18,23 @@
1618
* specific language governing permissions and limitations
1719
* under the License.
1820
*/
19-
import { Button, ButtonGroup, IconButton, Input, Portal, Separator, Text, VStack } from "@chakra-ui/react";
21+
import {
22+
Button,
23+
ButtonGroup,
24+
HStack,
25+
IconButton,
26+
Input,
27+
Portal,
28+
Separator,
29+
Text,
30+
VStack,
31+
} from "@chakra-ui/react";
2032
import { useEffect } from "react";
2133
import { useTranslation } from "react-i18next";
22-
import { FiFilter } from "react-icons/fi";
34+
import { FiFilter, FiInfo } from "react-icons/fi";
2335
import { useParams, useSearchParams } from "react-router-dom";
2436

37+
import { Tooltip } from "src/components/ui";
2538
import { Menu } from "src/components/ui/Menu";
2639

2740
export const TaskStreamFilter = () => {
@@ -217,9 +230,18 @@ export const TaskStreamFilter = () => {
217230

218231
{/* Mode Section */}
219232
<VStack align="stretch" gap={2} width="100%">
220-
<Text fontSize="xs" fontWeight="semibold">
221-
{translate("dag:panel.taskStreamFilter.mode")}
222-
</Text>
233+
<HStack gap={1}>
234+
<Text fontSize="xs" fontWeight="semibold">
235+
{translate("dag:panel.taskStreamFilter.mode")}
236+
</Text>
237+
<Tooltip
238+
closeDelay={200}
239+
content={translate("dag:panel.taskStreamFilter.modeTooltip")}
240+
openDelay={0}
241+
>
242+
<FiInfo size={12} />
243+
</Tooltip>
244+
</HStack>
223245
<ButtonGroup attached colorPalette="brand" size="sm" variant="outline" width="100%">
224246
<Button
225247
disabled={!hasActiveFilter}

0 commit comments

Comments
 (0)