diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md
index 8258147c6b..2310f42d92 100644
--- a/CHANGELOG.unreleased.md
+++ b/CHANGELOG.unreleased.md
@@ -32,6 +32,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug in ND volume annotation downloads where the additionalAxes metadata had wrong indices. [#7592](https://github.com/scalableminds/webknossos/pull/7592)
- Fixed a bug in proofreading aka editable mapping annotations where splitting would sometimes give the new id to the selected segment rather than to the split-off one. [#7608](https://github.com/scalableminds/webknossos/pull/7608)
- Fixed small styling errors as a follow up to the antd v5 upgrade [#7612](https://github.com/scalableminds/webknossos/pull/7612)
+-Fixed deprecation warnings caused by Antd components. [#7610](https://github.com/scalableminds/webknossos/pull/7610)
### Removed
diff --git a/frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx b/frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx
index e725619c4e..ad6ad9c004 100644
--- a/frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx
+++ b/frontend/javascripts/admin/dataset/dataset_add_remote_view.tsx
@@ -39,7 +39,6 @@ import { Unicode } from "oxalis/constants";
import { readFileAsText } from "libs/read_file";
import * as Utils from "libs/utils";
-const { Panel } = Collapse;
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
@@ -552,13 +551,20 @@ function AddZarrLayer({
{exploreLog ? (
-
-
-
-
{exploreLog}
-
-
-
+
+
{exploreLog}
+
+ ),
+ },
+ ]}
+ />
) : null}
diff --git a/frontend/javascripts/admin/tasktype/recommended_configuration_view.tsx b/frontend/javascripts/admin/tasktype/recommended_configuration_view.tsx
index 6d926cd90a..b15bf6badd 100644
--- a/frontend/javascripts/admin/tasktype/recommended_configuration_view.tsx
+++ b/frontend/javascripts/admin/tasktype/recommended_configuration_view.tsx
@@ -1,4 +1,4 @@
-import { Checkbox, Col, Collapse, Form, Input, Row, Table, Button } from "antd";
+import { Checkbox, Col, Collapse, Form, Input, Row, Table, Button, CollapseProps } from "antd";
import { FormInstance } from "antd/lib/form";
import * as React from "react";
import _ from "lodash";
@@ -9,7 +9,6 @@ import { validateUserSettingsJSON } from "types/validation";
import { TDViewDisplayModeEnum } from "oxalis/constants";
import features from "features";
const FormItem = Form.Item;
-const { Panel } = Collapse;
function getRecommendedConfigByCategory() {
return {
@@ -138,79 +137,84 @@ export default function RecommendedConfigurationView({
};
});
+ const recommendedSettingsView = (
+
+
+
+ The recommended configuration will be displayed to users when starting to work on a task
+ with this task type. The user is able to accept or decline this recommendation.
+
+
+
+ enabled ? validateUserSettingsJSON(rule, value) : Promise.resolve(),
+ },
+ ]}
+ >
+
+
+
+
+
+
+
+
+ Valid settings and their default values:
+
+
+
+
+ );
+
+ const collapseItems: CollapseProps["items"] = [
+ {
+ key: "config",
+ label: (
+
+ {" "}
+ Add Recommended User Settings
+
+ ),
+ showArrow: false,
+ children: recommendedSettingsView,
+ },
+ ];
+
return (
onChangeEnabled(openedPanels.length === 1)}
- // @ts-expect-error ts-migrate(2322) FIXME: Type 'string | null' is not assignable to type 'st... Remove this comment to see the full error message
- activeKey={enabled ? "config" : null}
- >
-
- {" "}
- Add Recommended User Settings
-
- }
- showArrow={false}
- >
-
-
-
- The recommended configuration will be displayed to users when starting to work on a
- task with this task type. The user is able to accept or decline this recommendation.
-
-
-
- enabled ? validateUserSettingsJSON(rule, value) : Promise.resolve(),
- },
- ]}
- >
-
-
-
-
-
-
-
-
- Valid settings and their default values:
-
-
-
-
-
-
+ activeKey={enabled ? "config" : undefined}
+ items={collapseItems}
+ />
);
}
diff --git a/frontend/javascripts/admin/voxelytics/task_list_view.tsx b/frontend/javascripts/admin/voxelytics/task_list_view.tsx
index a560c66700..3da4e52ad2 100644
--- a/frontend/javascripts/admin/voxelytics/task_list_view.tsx
+++ b/frontend/javascripts/admin/voxelytics/task_list_view.tsx
@@ -13,6 +13,7 @@ import {
Select,
MenuProps,
App,
+ CollapseProps,
} from "antd";
import {
ClockCircleOutlined,
@@ -50,8 +51,8 @@ import { addAfterPadding, addBeforePadding } from "./utils";
import { LOG_LEVELS } from "oxalis/constants";
import { getVoxelyticsLogs } from "admin/admin_rest_api";
import ArtifactsDiskUsageList from "./artifacts_disk_usage_list";
+import { ArrayElement, notEmpty } from "libs/utils";
-const { Panel } = Collapse;
const { Search } = Input;
function getFilteredTasks(
@@ -441,97 +442,101 @@ export default function TaskListView({
],
};
- const renderTaskGroupOrTask = (taskGroup: VoxelyticsTaskConfigWithHierarchy) => {
+ type ItemType = ArrayElement;
+
+ const getTaskGroupOrTaskItem = (
+ taskGroup: VoxelyticsTaskConfigWithHierarchy,
+ ): ItemType | undefined => {
const taskInfo = aggregateTaskInfos(taskGroup, report.tasks, runId);
if (taskGroup.isMetaTask) {
// If tasks are filtered away by the search query, it can happen that a meta task
// has "no children", anymore. In that case, don't render the entire meta task.
const subtasks = taskGroup.subtasks;
- const children = subtasks.map(renderTaskGroupOrTask).filter((c) => c != null);
- if (children.length === 0) {
- return null;
+ const collapseItems = subtasks.map(getTaskGroupOrTaskItem).filter(notEmpty);
+ if (collapseItems.length === 0) {
+ return undefined;
}
- return (
-
-
- {taskGroup.key}
-
-
-
-
-
- }
- key={taskGroup.key}
- id={`task-panel-${taskGroup.key}`}
- >
- {openMetatask !== taskGroup.key && (
-