bbovenzi commented on code in PR #64271:
URL: https://github.com/apache/airflow/pull/64271#discussion_r3040237476
##########
airflow-core/src/airflow/ui/public/i18n/locales/hu/dag.json:
##########
@@ -122,6 +122,14 @@
"graphDirection": {
"label": "Gráf iránya"
},
+ "graphFilters": {
+ "clearFilters": "Clear Filters",
+ "durationGte": "Min duration (s)",
+ "mapIndex": "Map index",
+ "selectStatus": "Select status",
+ "selectTaskGroup": "Select task group",
+ "title": "Task Filters"
+ },
Review Comment:
We should only be editing the english translation file if we don't actually
have translations available
##########
airflow-core/src/airflow/ui/src/layouts/Details/Graph/Graph.tsx:
##########
@@ -74,6 +78,21 @@ export const Graph = () => {
const hasActiveFilter = includeUpstream || includeDownstream;
+ const graphFilters: GraphFilterValues = useMemo(() => {
Review Comment:
With React 19, most of the time we do not need useMemo anymore
##########
airflow-core/src/airflow/ui/src/components/Graph/TaskNode.tsx:
##########
@@ -83,7 +84,13 @@ export const TaskNode = ({
return (
<NodeWrapper>
- <Flex alignItems="center" cursor="default" flexDirection="column">
+ <Flex
+ alignItems="center"
+ cursor="default"
+ flexDirection="column"
+ opacity={isFiltered ? 0.2 : 1}
+ transition="opacity 0.2s"
Review Comment:
We should make this "opacity 0.2s" a constant to make sure it is always the
same.
##########
airflow-core/src/airflow/ui/src/layouts/Details/Graph/GraphTaskFilters.tsx:
##########
@@ -0,0 +1,246 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import {
+ Button,
+ IconButton,
+ type NumberInputValueChangeDetails,
+ Portal,
+ Separator,
+ Text,
+ VStack,
+} from "@chakra-ui/react";
+import { useMemo, useState } from "react";
+import { useHotkeys } from "react-hotkeys-hook";
+import { useTranslation } from "react-i18next";
+import { FiSearch } from "react-icons/fi";
+import { useParams, useSearchParams } from "react-router-dom";
+
+import { useStructureServiceStructureData } from "openapi/queries";
+import type { NodeResponse } from "openapi/requests/types.gen";
+import { Menu } from "src/components/ui/Menu";
+import { NumberInputField, NumberInputRoot } from
"src/components/ui/NumberInput";
+import { SearchParamsKeys } from "src/constants/searchParams";
+import { taskInstanceStateOptions } from "src/constants/stateOptions";
+import useSelectedVersion from "src/hooks/useSelectedVersion";
+import { AttrSelectFilterMulti } from
"src/pages/Dag/Tasks/TaskFilters/AttrSelectFilterMulti";
Review Comment:
We should move this file into `src/components` to make it easier to reuse
--
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]