GLCq4&_D2Iy|SbZr}|3x(3GPIb+&
zvfQON;f~~}_oJronqCLFTO`O?J-z~?{#7<<*F^VhwkjT;k8nW)nx9DmtOk(u)uMW4
z19w*$x=bEOj_4#G!k|P!d6+7hrQIrOHls{o%Y@aTD{yXJO28fcYQ#X%tq19zI&OND
z+c!IkQVJV}@<`?VlTtoSjOF(S*B1oJEw%`OKN4rOH!1oa)f?q_r%w2rYP@QSq~EUy
z_>%M~$A>?k6TM#pOoQyyA0tNT*@x;jQ>r8@9cDeJ9YNVhQz5qseLf+zdaItLbq$%^
zBROEx1qA_ITLA6
zTDuMY@$#+CmGPv0TSmb2!>>r;uNALfqi&gd~8I=l8s-%3&7_&!x>l
zw&0c*(!1OIec@<#a*#+0?ki!2&;-tfoT8?EYUzgr>6;w4V%GU>Ou3g6$<(7|CvYn)
z2d4)wxV6Uo<B@6^q-)jgW3yaa2wJ>z%Zj$|Qbv&J6@t-nUBc;e
zeJ!tImIvMZHm6chc2W@TGh@lS%9vKbp;p66Nw&Y7}#w`#&71vQcpx70z
z=V5wXwlX-jjg!E4BDtrMV`NHsf<7SO_VGIQiI)FQ3OVWn|F-00CuMQ+kjx~7N6F%
zzjc=)8AED25!+)-sHu#PvSm)(rs!s0aEu*N5TQa~%8wn;{Dg8!j>CVg5{HLeZ}Y+M
z)^}FJwMtlCfFesxxp0Ky!nObeZ{D3pN?41`nzk$~-ysPcHf)a|D7}|L=3e9m?68WL
zzwV~29-efEdS)ta(w}X(W4{L;2|IoUq$^dY5yZ#3TA`)M3G7rG+;8}bJ(+-CW(pg^
zx+#x&OA_-)!p_$8wvm0w)ym*pisFY9?nc`R
zF=vArrEcofXzE%|W(5y1xmZbHm$=4f;or549%hN+TB(`EbRnyV*dJ8?0Pk4`
z;ZZoEiMUf%L8LhC%%5(4^z0TWjwFJ0h
zj7)^=OM&9+$8>kvqzU$zG44CI*OB!!8zX}q``ksXK0xdTl@4gy&6O^vYm*&zSjO03
zT-#DxLbnPBZT9-o+-FEGc~nPkcjo99yI9FP`ojXl=}zV*`V)G?xli
zK3k2&C+L$7)qQr>*?OO-Q`$_2oEQ!=}KpB3~r0VZ@(5Dsn6vEuB|4+(_L!
zflZAx$?osz;|g`~NlxUE^c3CJJjVSW5ld{#;y526PUVyq?4=ZiH+6ng42g%~%U3e%
zYAM|I@~&=m1!`Uaol2SFq#;C*58`U}yLFi|)$dYP7O>vIM13lN_2({1uZnZWP$fVR
zKN>+TGi8%9HO&rf)FYT{yV0(0L5en8hhz{tQh2#eU3P|DT*iPS_-HCIn?%-Inx)B}xfd
z1Am~Q!to_YAgyQfq6Xg;YfvciHSgK6KZ1{KGe8Qg#RrQG+oS4Qletf+q72xc?aRyS
zM(kGjtre6vOT#S=;R3H{YZuokzTK5gq^T(bw|e^2a+Bpo+)7FhZM%9>7MejmRr82)
cgNY?!9k&OOBk(oqT+3+N%hJ73$`n`s*
Date: Tue, 23 Nov 2021 10:34:03 +0300
Subject: [PATCH 2/6] Export rotation field when backup a task (#3932)
---
cvat/apps/engine/backup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/cvat/apps/engine/backup.py b/cvat/apps/engine/backup.py
index da42cab6b305..3d340b815a5b 100644
--- a/cvat/apps/engine/backup.py
+++ b/cvat/apps/engine/backup.py
@@ -106,6 +106,7 @@ def _prepare_annotations(self, annotations, label_mapping):
'outside',
'z_order',
'points',
+ 'rotation',
'frame',
'group',
'source',
From 1f33f505efebf42d91fbfa8b8443fa37f648b07a Mon Sep 17 00:00:00 2001
From: Eric Hofesmann
Date: Tue, 23 Nov 2021 15:15:14 -0500
Subject: [PATCH 3/6] Add FiftyOne to partners list (#3943)
* Add FiftyOne to partners list
* remove screenshot
* Fix linter issues
Co-authored-by: Nikita Manovich
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 2b430cab55e6..29d59df4fb4d 100644
--- a/README.md
+++ b/README.md
@@ -142,6 +142,10 @@ connection with your use of FFmpeg.
- [Human Protocol](https://hmt.ai) uses CVAT as a way of adding annotation service to the human protocol.
- [Cogito Tech LLC](https://bit.ly/3klT0h6), a Human-in-the-Loop Workforce Solutions Provider, used CVAT
in annotation of about 5,000 images for a brand operating in the fashion segment.
+- [FiftyOne](https://fiftyone.ai) is an open-source dataset curation and model analysis
+tool for visualizing, exploring, and improving computer vision datasets and models that is
+[tightly integrated](https://voxel51.com/docs/fiftyone/integrations/cvat.html) with CVAT
+for annotation and label refinement.
## Questions
From f36735c71c6729ca13c591aae1f0a055c980c3b7 Mon Sep 17 00:00:00 2001
From: Michael Lynch
Date: Tue, 30 Nov 2021 13:52:59 +1100
Subject: [PATCH 4/6] Initial commit of Weed AI custom annotation workspace
---
cvat-ui/package-lock.json | 16 +-
.../annotation-page/annotation-page.tsx | 6 +
.../weed-ai-annotation-workspace/styles.scss | 297 ++++++++++++++++++
.../weed-ai-annotation-workspace.tsx | 30 ++
cvat-ui/src/reducers/interfaces.ts | 1 +
package-lock.json | 6 +-
6 files changed, 344 insertions(+), 12 deletions(-)
create mode 100644 cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss
create mode 100644 cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx
diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json
index f90e12606495..07187455c154 100644
--- a/cvat-ui/package-lock.json
+++ b/cvat-ui/package-lock.json
@@ -35,7 +35,7 @@
"platform": "^1.3.6",
"prop-types": "^15.7.2",
"react": "^16.14.0",
- "react-awesome-query-builder": "^4.4.2",
+ "react-awesome-query-builder": "^4.5.1",
"react-color": "^2.19.3",
"react-cookie": "^4.0.3",
"react-dom": "^16.14.0",
@@ -53,7 +53,7 @@
"devDependencies": {}
},
"../cvat-canvas": {
- "version": "2.8.0",
+ "version": "2.9.0",
"license": "MIT",
"dependencies": {
"svg.draggable.js": "2.2.2",
@@ -75,13 +75,13 @@
"devDependencies": {}
},
"../cvat-core": {
- "version": "3.16.1",
+ "version": "3.19.0",
"license": "MIT",
"dependencies": {
"axios": "^0.21.4",
"browser-or-node": "^1.2.1",
"cvat-data": "../cvat-data",
- "detect-browser": "^5.2.0",
+ "detect-browser": "^5.2.1",
"error-stack-parser": "^2.0.2",
"form-data": "^2.5.0",
"jest-config": "^26.6.3",
@@ -89,8 +89,7 @@
"json-logic-js": "^2.0.1",
"platform": "^1.3.5",
"quickhull": "^1.0.3",
- "store": "^2.0.12",
- "worker-loader": "^2.0.0"
+ "store": "^2.0.12"
},
"devDependencies": {
"coveralls": "^3.0.5",
@@ -7931,7 +7930,7 @@
"browser-or-node": "^1.2.1",
"coveralls": "^3.0.5",
"cvat-data": "../cvat-data",
- "detect-browser": "^5.2.0",
+ "detect-browser": "^5.2.1",
"error-stack-parser": "^2.0.2",
"form-data": "^2.5.0",
"jest": "^26.6.3",
@@ -7942,8 +7941,7 @@
"json-logic-js": "^2.0.1",
"platform": "^1.3.5",
"quickhull": "^1.0.3",
- "store": "^2.0.12",
- "worker-loader": "^2.0.0"
+ "store": "^2.0.12"
}
},
"cyclist": {
diff --git a/cvat-ui/src/components/annotation-page/annotation-page.tsx b/cvat-ui/src/components/annotation-page/annotation-page.tsx
index 973e8cebe8cd..66c7c4615bee 100644
--- a/cvat-ui/src/components/annotation-page/annotation-page.tsx
+++ b/cvat-ui/src/components/annotation-page/annotation-page.tsx
@@ -14,6 +14,7 @@ import SubmitAnnotationsModal from 'components/annotation-page/request-review-mo
import ReviewAnnotationsWorkspace from 'components/annotation-page/review-workspace/review-workspace';
import SubmitReviewModal from 'components/annotation-page/review/submit-review-modal';
import StandardWorkspaceComponent from 'components/annotation-page/standard-workspace/standard-workspace';
+import WeedAIAnnotationWorkspaceComponent from 'components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace';
import StandardWorkspace3DComponent from 'components/annotation-page/standard3D-workspace/standard3D-workspace';
import TagAnnotationWorkspace from 'components/annotation-page/tag-annotation-workspace/tag-annotation-workspace';
import FiltersModalComponent from 'components/annotation-page/top-bar/filters-modal';
@@ -121,6 +122,11 @@ export default function AnnotationPageComponent(props: Props): JSX.Element {
)}
+ {workspace === Workspace.WEED_AI_ANNOTATION && (
+
+
+
+ )}
{workspace === Workspace.TAG_ANNOTATION && (
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss b/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss
new file mode 100644
index 000000000000..ac11a6b5bfcd
--- /dev/null
+++ b/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss
@@ -0,0 +1,297 @@
+// Copyright (C) 2020-2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+@import 'base.scss';
+
+.cvat-weed-ai-annotation-workspace.ant-layout {
+ height: 100%;
+}
+
+.cvat-context-image-wrapper {
+ height: auto;
+ width: $grid-unit-size * 32;
+ position: absolute;
+ top: $grid-unit-size;
+ right: $grid-unit-size;
+ z-index: 100;
+ background: black;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ user-select: none;
+
+ > .cvat-context-image-wrapper-header {
+ height: $grid-unit-size * 4;
+ width: 100%;
+ z-index: 101;
+ background: rgba(0, 0, 0, 0.2);
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+
+ > .ant-image {
+ margin: $grid-unit-size * 0.5;
+ }
+
+ > span {
+ position: absolute;
+ font-size: 18px;
+ top: 7px;
+ right: 7px;
+ z-index: 102;
+ color: white;
+
+ &:hover {
+ > svg {
+ transform: scale(1.2);
+ }
+ }
+ }
+}
+
+.cvat-context-image {
+ width: 100%;
+ height: auto;
+ display: block;
+}
+
+.cvat-objects-sidebar-sider {
+ top: 0;
+ right: 0;
+ left: auto;
+ background-color: $background-color-2;
+ border-left: 1px solid $border-color-1;
+ border-bottom: 1px solid $border-color-1;
+ border-radius: 4px 0 0 4px;
+ z-index: 2;
+}
+
+.cvat-objects-sidebar {
+ height: 100%;
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ > .ant-layout-sider-children {
+ display: flex;
+ flex-direction: column;
+
+ > .cvat-objects-sidebar-tabs {
+ flex-grow: 10;
+
+ > div {
+ display: flex;
+
+ div[role='tabpanel'] {
+ height: 100%;
+ }
+ }
+ }
+ }
+
+ &.ant-layout-sider-collapsed {
+ overflow: initial;
+ }
+}
+
+.cvat-rotate-canvas-controls-right > svg {
+ transform: scaleX(-1);
+}
+
+.cvat-canvas-controls-sidebar {
+ background-color: $background-color-2;
+ border-right: 1px solid $border-color-1;
+ overflow: hidden;
+}
+
+.cvat-cursor-control,
+.cvat-move-control,
+.cvat-rotate-canvas-control,
+.cvat-fit-control,
+.cvat-resize-control,
+.cvat-draw-rectangle-control,
+.cvat-draw-polygon-control,
+.cvat-draw-polyline-control,
+.cvat-draw-points-control,
+.cvat-draw-cuboid-control,
+.cvat-setup-tag-control,
+.cvat-merge-control,
+.cvat-group-control,
+.cvat-split-track-control,
+.cvat-issue-control,
+.cvat-tools-control,
+.cvat-extra-controls-control,
+.cvat-opencv-control {
+ border-radius: 3.3px;
+ transform: scale(0.65);
+ padding: 2px;
+
+ &:hover:not(.cvat-disabled-canvas-control) {
+ background: $header-color;
+ transform: scale(0.75);
+ }
+
+ &:active:not(.cvat-disabled-canvas-control) {
+ transform: scale(0.65);
+ }
+
+ > svg {
+ transform: scale(0.8);
+ }
+}
+
+.cvat-antd-icon-control {
+ > svg {
+ width: 40px;
+ height: 40px;
+ }
+}
+
+.cvat-active-canvas-control {
+ background: $header-color;
+ transform: scale(0.75);
+}
+
+.cvat-disabled-canvas-control > svg {
+ filter: opacity(0.45);
+}
+
+.cvat-rotate-canvas-controls-left,
+.cvat-rotate-canvas-controls-right {
+ transform: scale(0.65);
+ border-radius: 5px;
+
+ &:hover {
+ transform: scale(0.75);
+ }
+
+ &:active {
+ transform: scale(0.65);
+ }
+}
+
+.cvat-rotate-canvas-popover {
+ .ant-popover-inner-content {
+ padding: 0;
+ }
+}
+
+.cvat-draw-shape-popover,
+.cvat-opencv-control-popover,
+.cvat-setup-tag-popover,
+.cvat-tools-control-popover {
+ .ant-popover-inner-content {
+ padding: 0;
+ }
+}
+
+.cvat-tools-track-button,
+.cvat-tools-interact-button {
+ width: 100%;
+ margin-top: 10px;
+}
+
+.cvat-interactors-tips-icon-container {
+ text-align: center;
+ font-size: 20px;
+}
+
+.cvat-interactor-tip-container {
+ background: $background-color-2;
+ padding: $grid-unit-size;
+ box-shadow: $box-shadow-base;
+ width: $grid-unit-size * 40;
+ text-align: center;
+ border-radius: 4px;
+}
+
+.cvat-interactor-tip-image {
+ width: $grid-unit-size * 37;
+}
+
+.cvat-draw-shape-popover-points-selector {
+ width: 100%;
+}
+
+.cvat-tools-control-popover-content,
+.cvat-opencv-control-popover-content {
+ width: fit-content;
+ padding: $grid-unit-size;
+ border-radius: $grid-unit-size;
+ background: $background-color-2;
+
+ .ant-tabs-tab {
+ width: $grid-unit-size * 14;
+ justify-content: center;
+ }
+}
+
+.cvat-opencv-initialization-button {
+ width: 100%;
+ margin: $grid-unit-size 0;
+}
+
+.cvat-opencv-drawing-tools {
+ margin-top: $grid-unit-size;
+}
+
+.cvat-opencv-drawing-tool {
+ padding: $grid-unit-size;
+ width: $grid-unit-size * 5;
+ height: $grid-unit-size * 5;
+
+ > i {
+ font-size: 16px;
+ }
+}
+
+.cvat-opencv-image-tool {
+ @extend .cvat-opencv-drawing-tool;
+}
+
+.cvat-opencv-image-tool-active {
+ color: #40a9ff;
+ border-color: #40a9ff;
+}
+
+.cvat-setup-tag-popover-content,
+.cvat-draw-shape-popover-content {
+ padding: $grid-unit-size;
+ border-radius: $grid-unit-size;
+ background: $background-color-2;
+ width: 34 * $grid-unit-size;
+
+ > div {
+ margin-top: $grid-unit-size;
+ }
+
+ > div:nth-child(3) > div > div {
+ width: 100%;
+ }
+
+ > div:last-child {
+ span {
+ width: 100%;
+ }
+
+ button {
+ width: 100%;
+
+ &:nth-child(1) {
+ border-radius: 3px 0 0 3px;
+ }
+
+ &:nth-child(2) {
+ border-radius: 0 3px 3px 0;
+ }
+ }
+ }
+}
+
+.cvat-propagate-confirm {
+ > .ant-input-number {
+ width: 70px;
+ margin: 0 5px;
+ }
+}
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx b/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx
new file mode 100644
index 000000000000..d356aaa5a24a
--- /dev/null
+++ b/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx
@@ -0,0 +1,30 @@
+// Copyright (C) 2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+import './styles.scss';
+import React from 'react';
+import Layout from 'antd/lib/layout';
+
+import CanvasWrapperContainer from 'containers/annotation-page/canvas/canvas-wrapper';
+import ControlsSideBarContainer from 'containers/annotation-page/standard-workspace/controls-side-bar/controls-side-bar';
+import PropagateConfirmContainer from 'containers/annotation-page/standard-workspace/propagate-confirm';
+import CanvasContextMenuContainer from 'containers/annotation-page/canvas/canvas-context-menu';
+import ObjectsListContainer from 'containers/annotation-page/standard-workspace/objects-side-bar/objects-list';
+import ObjectSideBarComponent from 'components/annotation-page/standard-workspace/objects-side-bar/objects-side-bar';
+import CanvasPointContextMenuComponent from 'components/annotation-page/canvas/canvas-point-context-menu';
+import IssueAggregatorComponent from 'components/annotation-page/review/issues-aggregator';
+
+export default function WeedAIAnnotationWorkspaceComponent(): JSX.Element {
+ return (
+
+
+
+ } />
+
+
+
+
+
+ );
+}
diff --git a/cvat-ui/src/reducers/interfaces.ts b/cvat-ui/src/reducers/interfaces.ts
index 00b1d3bc4674..cc1e21e145a6 100644
--- a/cvat-ui/src/reducers/interfaces.ts
+++ b/cvat-ui/src/reducers/interfaces.ts
@@ -584,6 +584,7 @@ export enum Workspace {
STANDARD3D = 'Standard 3D',
STANDARD = 'Standard',
ATTRIBUTE_ANNOTATION = 'Attribute annotation',
+ WEED_AI_ANNOTATION = 'Weed AI annotation',
TAG_ANNOTATION = 'Tag annotation',
REVIEW_WORKSPACE = 'Review',
}
diff --git a/package-lock.json b/package-lock.json
index 9ce7c5a9c0ad..24a371f0d250 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -91,7 +91,7 @@
}
},
"cvat-canvas": {
- "version": "2.8.0",
+ "version": "2.9.0",
"license": "MIT",
"dependencies": {
"svg.draggable.js": "2.2.2",
@@ -113,7 +113,7 @@
"devDependencies": {}
},
"cvat-core": {
- "version": "3.17.0",
+ "version": "3.19.0",
"license": "MIT",
"dependencies": {
"axios": "^0.21.4",
@@ -251,7 +251,7 @@
"devDependencies": {}
},
"cvat-ui": {
- "version": "1.25.0",
+ "version": "1.26.0",
"license": "MIT",
"dependencies": {
"@ant-design/icons": "^4.6.3",
From e87df649b050c1cbadd092b8844e6a9d3b2b9017 Mon Sep 17 00:00:00 2001
From: Mike Lynch
Date: Wed, 1 Dec 2021 14:31:47 +1100
Subject: [PATCH 5/6] Made a new workspace, weed-ai-workspace, as a
proof-of-concept for a workspace with a reduced set of annotation tools.
Weed-ai-workspace doesn't have the cuboid.
---
.../annotation-page/annotation-page.tsx | 6 +-
.../controls-side-bar/controls-side-bar.tsx | 301 ++++++++++++++++++
.../styles.scss | 2 +-
.../weed-ai-workspace.tsx} | 6 +-
.../controls-side-bar/controls-side-bar.tsx | 96 ++++++
cvat-ui/src/reducers/interfaces.ts | 2 +-
6 files changed, 405 insertions(+), 8 deletions(-)
create mode 100644 cvat-ui/src/components/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
rename cvat-ui/src/components/annotation-page/{weed-ai-annotation-workspace => weed-ai-workspace}/styles.scss (99%)
rename cvat-ui/src/components/annotation-page/{weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx => weed-ai-workspace/weed-ai-workspace.tsx} (86%)
create mode 100644 cvat-ui/src/containers/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
diff --git a/cvat-ui/src/components/annotation-page/annotation-page.tsx b/cvat-ui/src/components/annotation-page/annotation-page.tsx
index 66c7c4615bee..4fc40481d07b 100644
--- a/cvat-ui/src/components/annotation-page/annotation-page.tsx
+++ b/cvat-ui/src/components/annotation-page/annotation-page.tsx
@@ -14,7 +14,7 @@ import SubmitAnnotationsModal from 'components/annotation-page/request-review-mo
import ReviewAnnotationsWorkspace from 'components/annotation-page/review-workspace/review-workspace';
import SubmitReviewModal from 'components/annotation-page/review/submit-review-modal';
import StandardWorkspaceComponent from 'components/annotation-page/standard-workspace/standard-workspace';
-import WeedAIAnnotationWorkspaceComponent from 'components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace';
+import WeedAIWorkspaceComponent from 'components/annotation-page/weed-ai-workspace/weed-ai-workspace';
import StandardWorkspace3DComponent from 'components/annotation-page/standard3D-workspace/standard3D-workspace';
import TagAnnotationWorkspace from 'components/annotation-page/tag-annotation-workspace/tag-annotation-workspace';
import FiltersModalComponent from 'components/annotation-page/top-bar/filters-modal';
@@ -122,9 +122,9 @@ export default function AnnotationPageComponent(props: Props): JSX.Element {
)}
- {workspace === Workspace.WEED_AI_ANNOTATION && (
+ {workspace === Workspace.WEED_AI_WORKSPACE && (
-
+
)}
{workspace === Workspace.TAG_ANNOTATION && (
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx b/cvat-ui/src/components/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
new file mode 100644
index 000000000000..5997fea08639
--- /dev/null
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
@@ -0,0 +1,301 @@
+// Copyright (C) 2020-2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+import React from 'react';
+import Layout from 'antd/lib/layout';
+
+import { ActiveControl, Rotation } from 'reducers/interfaces';
+import GlobalHotKeys, { KeyMap } from 'utils/mousetrap-react';
+import { Canvas } from 'cvat-canvas-wrapper';
+
+import ControlVisibilityObserver, {
+ ExtraControlsControl,
+} from '../../standard-workspace/controls-side-bar/control-visibility-observer';
+import RotateControl, {
+ Props as RotateControlProps,
+} from '../../standard-workspace/controls-side-bar/rotate-control';
+import CursorControl, {
+ Props as CursorControlProps,
+} from '../../standard-workspace/controls-side-bar/cursor-control';
+import MoveControl, {
+ Props as MoveControlProps,
+} from '../../standard-workspace/controls-side-bar/move-control';
+import FitControl, {
+ Props as FitControlProps,
+} from '../../standard-workspace/controls-side-bar/fit-control';
+import ResizeControl, {
+ Props as ResizeControlProps,
+} from '../../standard-workspace/controls-side-bar/resize-control';
+import ToolsControl from '../../standard-workspace/controls-side-bar/tools-control';
+import OpenCVControl from '../../standard-workspace/controls-side-bar/opencv-control';
+import DrawRectangleControl, {
+ Props as DrawRectangleControlProps,
+} from '../../standard-workspace/controls-side-bar/draw-rectangle-control';
+import DrawPolygonControl, {
+ Props as DrawPolygonControlProps,
+} from '../../standard-workspace/controls-side-bar/draw-polygon-control';
+import DrawPolylineControl, {
+ Props as DrawPolylineControlProps,
+} from '../../standard-workspace/controls-side-bar/draw-polyline-control';
+import DrawPointsControl, {
+ Props as DrawPointsControlProps,
+} from '../../standard-workspace/controls-side-bar/draw-points-control';
+import SetupTagControl, {
+ Props as SetupTagControlProps,
+} from '../../standard-workspace/controls-side-bar/setup-tag-control';
+import MergeControl, {
+ Props as MergeControlProps,
+} from '../../standard-workspace/controls-side-bar/merge-control';
+import GroupControl, {
+ Props as GroupControlProps,
+} from '../../standard-workspace/controls-side-bar/group-control';
+import SplitControl, {
+ Props as SplitControlProps,
+} from '../../standard-workspace/controls-side-bar/split-control';
+
+interface Props {
+ canvasInstance: Canvas;
+ activeControl: ActiveControl;
+ keyMap: KeyMap;
+ normalizedKeyMap: Record;
+ labels: any[];
+
+ mergeObjects(enabled: boolean): void;
+ groupObjects(enabled: boolean): void;
+ splitTrack(enabled: boolean): void;
+ rotateFrame(rotation: Rotation): void;
+ repeatDrawShape(): void;
+ pasteShape(): void;
+ resetGroup(): void;
+ redrawShape(): void;
+}
+
+// We use the observer to see if these controls are in the viewport
+// They automatically put to extra if not
+const ObservedCursorControl = ControlVisibilityObserver(CursorControl);
+const ObservedMoveControl = ControlVisibilityObserver(MoveControl);
+const ObservedRotateControl = ControlVisibilityObserver(RotateControl);
+const ObservedFitControl = ControlVisibilityObserver(FitControl);
+const ObservedResizeControl = ControlVisibilityObserver(ResizeControl);
+const ObservedToolsControl = ControlVisibilityObserver(ToolsControl);
+const ObservedOpenCVControl = ControlVisibilityObserver(OpenCVControl);
+const ObservedDrawRectangleControl = ControlVisibilityObserver(DrawRectangleControl);
+const ObservedDrawPolygonControl = ControlVisibilityObserver(DrawPolygonControl);
+const ObservedDrawPolylineControl = ControlVisibilityObserver(DrawPolylineControl);
+const ObservedDrawPointsControl = ControlVisibilityObserver(DrawPointsControl);
+// const ObservedDrawCuboidControl = ControlVisibilityObserver(DrawCuboidControl);
+const ObservedSetupTagControl = ControlVisibilityObserver(SetupTagControl);
+const ObservedMergeControl = ControlVisibilityObserver(MergeControl);
+const ObservedGroupControl = ControlVisibilityObserver(GroupControl);
+const ObservedSplitControl = ControlVisibilityObserver(SplitControl);
+
+export default function ControlsSideBarComponent(props: Props): JSX.Element {
+ const {
+ activeControl,
+ canvasInstance,
+ normalizedKeyMap,
+ keyMap,
+ labels,
+ mergeObjects,
+ groupObjects,
+ splitTrack,
+ rotateFrame,
+ repeatDrawShape,
+ pasteShape,
+ resetGroup,
+ redrawShape,
+ } = props;
+
+ const preventDefault = (event: KeyboardEvent | undefined): void => {
+ if (event) {
+ event.preventDefault();
+ }
+ };
+
+ let subKeyMap: any = {
+ CANCEL: keyMap.CANCEL,
+ CLOCKWISE_ROTATION: keyMap.CLOCKWISE_ROTATION,
+ ANTICLOCKWISE_ROTATION: keyMap.ANTICLOCKWISE_ROTATION,
+ };
+
+ let handlers: any = {
+ CANCEL: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ if (activeControl !== ActiveControl.CURSOR) {
+ canvasInstance.cancel();
+ }
+ },
+ CLOCKWISE_ROTATION: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ rotateFrame(Rotation.CLOCKWISE90);
+ },
+ ANTICLOCKWISE_ROTATION: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ rotateFrame(Rotation.ANTICLOCKWISE90);
+ },
+ };
+
+ if (labels.length) {
+ handlers = {
+ ...handlers,
+ PASTE_SHAPE: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ canvasInstance.cancel();
+ pasteShape();
+ },
+ SWITCH_DRAW_MODE: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ const drawing = [
+ ActiveControl.DRAW_POINTS,
+ ActiveControl.DRAW_POLYGON,
+ ActiveControl.DRAW_POLYLINE,
+ ActiveControl.DRAW_RECTANGLE,
+ ActiveControl.DRAW_CUBOID,
+ ActiveControl.AI_TOOLS,
+ ActiveControl.OPENCV_TOOLS,
+ ].includes(activeControl);
+
+ if (!drawing) {
+ canvasInstance.cancel();
+ // repeateDrawShapes gets all the latest parameters
+ // and calls canvasInstance.draw() with them
+
+ if (event && event.shiftKey) {
+ redrawShape();
+ } else {
+ repeatDrawShape();
+ }
+ } else {
+ if ([ActiveControl.AI_TOOLS, ActiveControl.OPENCV_TOOLS].includes(activeControl)) {
+ // separated API method
+ canvasInstance.interact({ enabled: false });
+ return;
+ }
+
+ canvasInstance.draw({ enabled: false });
+ }
+ },
+ SWITCH_MERGE_MODE: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ const merging = activeControl === ActiveControl.MERGE;
+ if (!merging) {
+ canvasInstance.cancel();
+ }
+ canvasInstance.merge({ enabled: !merging });
+ mergeObjects(!merging);
+ },
+ SWITCH_SPLIT_MODE: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ const splitting = activeControl === ActiveControl.SPLIT;
+ if (!splitting) {
+ canvasInstance.cancel();
+ }
+ canvasInstance.split({ enabled: !splitting });
+ splitTrack(!splitting);
+ },
+ SWITCH_GROUP_MODE: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ const grouping = activeControl === ActiveControl.GROUP;
+ if (!grouping) {
+ canvasInstance.cancel();
+ }
+ canvasInstance.group({ enabled: !grouping });
+ groupObjects(!grouping);
+ },
+ RESET_GROUP: (event: KeyboardEvent | undefined) => {
+ preventDefault(event);
+ const grouping = activeControl === ActiveControl.GROUP;
+ if (!grouping) {
+ return;
+ }
+ resetGroup();
+ canvasInstance.group({ enabled: false });
+ groupObjects(false);
+ },
+ };
+ subKeyMap = {
+ ...subKeyMap,
+ PASTE_SHAPE: keyMap.PASTE_SHAPE,
+ SWITCH_DRAW_MODE: keyMap.SWITCH_DRAW_MODE,
+ SWITCH_MERGE_MODE: keyMap.SWITCH_MERGE_MODE,
+ SWITCH_SPLIT_MODE: keyMap.SWITCH_SPLIT_MODE,
+ SWITCH_GROUP_MODE: keyMap.SWITCH_GROUP_MODE,
+ RESET_GROUP: keyMap.RESET_GROUP,
+ };
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss b/cvat-ui/src/components/annotation-page/weed-ai-workspace/styles.scss
similarity index 99%
rename from cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss
rename to cvat-ui/src/components/annotation-page/weed-ai-workspace/styles.scss
index ac11a6b5bfcd..5c4eb383e7ed 100644
--- a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/styles.scss
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/styles.scss
@@ -4,7 +4,7 @@
@import 'base.scss';
-.cvat-weed-ai-annotation-workspace.ant-layout {
+.cvat-weed-ai-workspace.ant-layout {
height: 100%;
}
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx b/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
similarity index 86%
rename from cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx
rename to cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
index d356aaa5a24a..21551890fc61 100644
--- a/cvat-ui/src/components/annotation-page/weed-ai-annotation-workspace/weed-ai-annotation-workspace.tsx
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
@@ -7,7 +7,7 @@ import React from 'react';
import Layout from 'antd/lib/layout';
import CanvasWrapperContainer from 'containers/annotation-page/canvas/canvas-wrapper';
-import ControlsSideBarContainer from 'containers/annotation-page/standard-workspace/controls-side-bar/controls-side-bar';
+import ControlsSideBarContainer from 'containers/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar';
import PropagateConfirmContainer from 'containers/annotation-page/standard-workspace/propagate-confirm';
import CanvasContextMenuContainer from 'containers/annotation-page/canvas/canvas-context-menu';
import ObjectsListContainer from 'containers/annotation-page/standard-workspace/objects-side-bar/objects-list';
@@ -15,9 +15,9 @@ import ObjectSideBarComponent from 'components/annotation-page/standard-workspac
import CanvasPointContextMenuComponent from 'components/annotation-page/canvas/canvas-point-context-menu';
import IssueAggregatorComponent from 'components/annotation-page/review/issues-aggregator';
-export default function WeedAIAnnotationWorkspaceComponent(): JSX.Element {
+export default function WeedAIWorkspaceComponent(): JSX.Element {
return (
-
+
} />
diff --git a/cvat-ui/src/containers/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx b/cvat-ui/src/containers/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
new file mode 100644
index 000000000000..fa670b5c6230
--- /dev/null
+++ b/cvat-ui/src/containers/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar.tsx
@@ -0,0 +1,96 @@
+// Copyright (C) 2020-2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+//
+// This is only here so that line 20 can call the weed-ai-workspace version of the controls-side-bar
+// component.
+
+import { connect } from 'react-redux';
+
+import { Canvas } from 'cvat-canvas-wrapper';
+import {
+ mergeObjects,
+ groupObjects,
+ splitTrack,
+ redrawShapeAsync,
+ rotateCurrentFrame,
+ repeatDrawShapeAsync,
+ pasteShapeAsync,
+ resetAnnotationsGroup,
+} from 'actions/annotation-actions';
+import ControlsSideBarComponent from 'components/annotation-page/weed-ai-workspace/controls-side-bar/controls-side-bar';
+import { ActiveControl, CombinedState, Rotation } from 'reducers/interfaces';
+import { KeyMap } from 'utils/mousetrap-react';
+
+interface StateToProps {
+ canvasInstance: Canvas;
+ rotateAll: boolean;
+ activeControl: ActiveControl;
+ keyMap: KeyMap;
+ normalizedKeyMap: Record;
+ labels: any[];
+}
+
+interface DispatchToProps {
+ mergeObjects(enabled: boolean): void;
+ groupObjects(enabled: boolean): void;
+ splitTrack(enabled: boolean): void;
+ rotateFrame(angle: Rotation): void;
+ resetGroup(): void;
+ repeatDrawShape(): void;
+ pasteShape(): void;
+ redrawShape(): void;
+}
+
+function mapStateToProps(state: CombinedState): StateToProps {
+ const {
+ annotation: {
+ canvas: { instance: canvasInstance, activeControl },
+ job: { labels },
+ },
+ settings: {
+ player: { rotateAll },
+ },
+ shortcuts: { keyMap, normalizedKeyMap },
+ } = state;
+
+ return {
+ rotateAll,
+ canvasInstance,
+ activeControl,
+ labels,
+ normalizedKeyMap,
+ keyMap,
+ };
+}
+
+function dispatchToProps(dispatch: any): DispatchToProps {
+ return {
+ mergeObjects(enabled: boolean): void {
+ dispatch(mergeObjects(enabled));
+ },
+ groupObjects(enabled: boolean): void {
+ dispatch(groupObjects(enabled));
+ },
+ splitTrack(enabled: boolean): void {
+ dispatch(splitTrack(enabled));
+ },
+ rotateFrame(rotation: Rotation): void {
+ dispatch(rotateCurrentFrame(rotation));
+ },
+ repeatDrawShape(): void {
+ dispatch(repeatDrawShapeAsync());
+ },
+ pasteShape(): void {
+ dispatch(pasteShapeAsync());
+ },
+ resetGroup(): void {
+ dispatch(resetAnnotationsGroup());
+ },
+ redrawShape(): void {
+ dispatch(redrawShapeAsync());
+ },
+ };
+}
+
+export default connect(mapStateToProps, dispatchToProps)(ControlsSideBarComponent);
diff --git a/cvat-ui/src/reducers/interfaces.ts b/cvat-ui/src/reducers/interfaces.ts
index cc1e21e145a6..9916da7c164b 100644
--- a/cvat-ui/src/reducers/interfaces.ts
+++ b/cvat-ui/src/reducers/interfaces.ts
@@ -584,7 +584,7 @@ export enum Workspace {
STANDARD3D = 'Standard 3D',
STANDARD = 'Standard',
ATTRIBUTE_ANNOTATION = 'Attribute annotation',
- WEED_AI_ANNOTATION = 'Weed AI annotation',
+ WEED_AI_WORKSPACE = 'Weed AI',
TAG_ANNOTATION = 'Tag annotation',
REVIEW_WORKSPACE = 'Review',
}
From 65b2fb0b3205f2253b8c0fd12cef0f9fee4f21d2 Mon Sep 17 00:00:00 2001
From: Mike Lynch
Date: Tue, 7 Dec 2021 09:50:32 +1100
Subject: [PATCH 6/6] Proof-of-concept adding a user help panel to the weeds-ai
workspace
---
cvat-ui/src/actions/annotation-actions.ts | 8 ++
.../objects-side-bar/objects-side-bar.tsx | 132 ++++++++++++++++++
.../weed-ai-workspace/user-help-block.tsx | 76 ++++++++++
.../weed-ai-workspace/weed-ai-workspace.tsx | 2 +-
cvat-ui/src/reducers/annotation-reducer.ts | 7 +
5 files changed, 224 insertions(+), 1 deletion(-)
create mode 100644 cvat-ui/src/components/annotation-page/weed-ai-workspace/objects-side-bar/objects-side-bar.tsx
create mode 100644 cvat-ui/src/components/annotation-page/weed-ai-workspace/user-help-block.tsx
diff --git a/cvat-ui/src/actions/annotation-actions.ts b/cvat-ui/src/actions/annotation-actions.ts
index 99bfb84ca927..c82facc6a91b 100644
--- a/cvat-ui/src/actions/annotation-actions.ts
+++ b/cvat-ui/src/actions/annotation-actions.ts
@@ -147,6 +147,7 @@ export enum AnnotationActionTypes {
SPLIT_ANNOTATIONS_FAILED = 'SPLIT_ANNOTATIONS_FAILED',
COLLAPSE_SIDEBAR = 'COLLAPSE_SIDEBAR',
COLLAPSE_APPEARANCE = 'COLLAPSE_APPEARANCE',
+ COLLAPSE_USER_HELP = 'COLLAPSE_USER_HELP',
COLLAPSE_OBJECT_ITEMS = 'COLLAPSE_OBJECT_ITEMS',
ACTIVATE_OBJECT = 'ACTIVATE_OBJECT',
REMOVE_OBJECT_SUCCESS = 'REMOVE_OBJECT_SUCCESS',
@@ -587,6 +588,13 @@ export function collapseAppearance(): AnyAction {
};
}
+export function collapseUserHelp(): AnyAction {
+ return {
+ type: AnnotationActionTypes.COLLAPSE_USER_HELP,
+ payload: {},
+ };
+}
+
export function collapseObjectItems(states: any[], collapsed: boolean): AnyAction {
return {
type: AnnotationActionTypes.COLLAPSE_OBJECT_ITEMS,
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-workspace/objects-side-bar/objects-side-bar.tsx b/cvat-ui/src/components/annotation-page/weed-ai-workspace/objects-side-bar/objects-side-bar.tsx
new file mode 100644
index 000000000000..84812da56d3a
--- /dev/null
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/objects-side-bar/objects-side-bar.tsx
@@ -0,0 +1,132 @@
+// Copyright (C) 2020-2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+import './styles.scss';
+import React, { Dispatch, TransitionEvent } from 'react';
+import { AnyAction } from 'redux';
+import { connect } from 'react-redux';
+import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
+import Text from 'antd/lib/typography/Text';
+import Tabs from 'antd/lib/tabs';
+import Layout from 'antd/lib/layout';
+
+import { Canvas } from 'cvat-canvas-wrapper';
+import { Canvas3d } from 'cvat-canvas3d-wrapper';
+import { CombinedState, DimensionType } from 'reducers/interfaces';
+import LabelsList from 'components/annotation-page/standard-workspace/objects-side-bar/labels-list';
+import { adjustContextImagePosition } from 'components/annotation-page/standard-workspace/context-image/context-image';
+import { collapseSidebar as collapseSidebarAction } from 'actions/annotation-actions';
+import UserHelpBlock from 'components/annotation-page/weed-ai-workspace/user-help-block';
+import AppearanceBlock from 'components/annotation-page/appearance-block';
+import IssuesListComponent from 'components/annotation-page/standard-workspace/objects-side-bar/issues-list';
+
+interface OwnProps {
+ objectsList: JSX.Element;
+}
+
+interface StateToProps {
+ sidebarCollapsed: boolean;
+ canvasInstance: Canvas | Canvas3d;
+ jobInstance: any;
+}
+
+interface DispatchToProps {
+ collapseSidebar(): void;
+}
+
+function mapStateToProps(state: CombinedState): StateToProps {
+ const {
+ annotation: {
+ sidebarCollapsed,
+ canvas: { instance: canvasInstance },
+ job: { instance: jobInstance },
+ },
+ } = state;
+
+ return {
+ sidebarCollapsed,
+ canvasInstance,
+ jobInstance,
+ };
+}
+
+function mapDispatchToProps(dispatch: Dispatch): DispatchToProps {
+ return {
+ collapseSidebar(): void {
+ dispatch(collapseSidebarAction());
+ },
+ };
+}
+
+function ObjectsSideBar(props: StateToProps & DispatchToProps & OwnProps): JSX.Element {
+ const {
+ sidebarCollapsed, canvasInstance, collapseSidebar, objectsList, jobInstance,
+ } = props;
+
+ const collapse = (): void => {
+ const [collapser] = window.document.getElementsByClassName('cvat-objects-sidebar');
+ const listener = (event: TransitionEvent): void => {
+ if (event.target && event.propertyName === 'width' && event.target === collapser) {
+ canvasInstance.fitCanvas();
+ canvasInstance.fit();
+ (collapser as HTMLElement).removeEventListener('transitionend', listener as any);
+ }
+ };
+
+ if (collapser) {
+ (collapser as HTMLElement).addEventListener('transitionend', listener as any);
+ }
+
+ adjustContextImagePosition(!sidebarCollapsed);
+ collapseSidebar();
+ };
+
+ let is2D = true;
+ if (jobInstance) {
+ is2D = jobInstance.task.dimension === DimensionType.DIM_2D;
+ }
+
+ return (
+
+ {/* eslint-disable-next-line */}
+
+ {sidebarCollapsed ? : }
+
+
+
+ Objects} key='objects'>
+ {objectsList}
+
+ Labels} key='labels'>
+
+
+
+ {is2D ? (
+ Issues} key='issues'>
+
+
+ ) : null}
+
+
+ {!sidebarCollapsed && }
+ {!sidebarCollapsed && }
+
+ );
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(React.memo(ObjectsSideBar));
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-workspace/user-help-block.tsx b/cvat-ui/src/components/annotation-page/weed-ai-workspace/user-help-block.tsx
new file mode 100644
index 000000000000..5d295e49b119
--- /dev/null
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/user-help-block.tsx
@@ -0,0 +1,76 @@
+// Copyright (C) 2020-2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+import React, { Dispatch } from 'react';
+import { AnyAction } from 'redux';
+import { connect } from 'react-redux';
+import Text from 'antd/lib/typography/Text';
+import Collapse from 'antd/lib/collapse';
+
+import { CombinedState } from 'reducers/interfaces';
+import { collapseUserHelp as collapseUserHelpAction } from 'actions/annotation-actions';
+
+interface StateToProps {
+ userHelpCollapsed: boolean;
+}
+
+interface DispatchToProps {
+ collapseUserHelp(): void;
+}
+
+function mapStateToProps(state: CombinedState): StateToProps {
+ const {
+ annotation: {
+ userHelpCollapsed,
+ },
+ } = state;
+
+ return {
+ userHelpCollapsed,
+ };
+}
+
+function mapDispatchToProps(dispatch: Dispatch): DispatchToProps {
+ return {
+ collapseUserHelp(): void {
+ dispatch(collapseUserHelpAction());
+ },
+ };
+}
+
+type Props = StateToProps & DispatchToProps;
+
+function UserHelpBlock(props: Props): JSX.Element {
+ const {
+ userHelpCollapsed,
+ collapseUserHelp,
+ } = props;
+
+ return (
+
+
+ Annotation guide
+
+ )}
+ key='userhelp'
+ >
+
+ Some text to help the user with a
+ {' '}
+
link
+ {' '}
+ to further info
+
+
+
+ );
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(React.memo(UserHelpBlock));
diff --git a/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx b/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
index 21551890fc61..de407112b4df 100644
--- a/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
+++ b/cvat-ui/src/components/annotation-page/weed-ai-workspace/weed-ai-workspace.tsx
@@ -11,7 +11,7 @@ import ControlsSideBarContainer from 'containers/annotation-page/weed-ai-workspa
import PropagateConfirmContainer from 'containers/annotation-page/standard-workspace/propagate-confirm';
import CanvasContextMenuContainer from 'containers/annotation-page/canvas/canvas-context-menu';
import ObjectsListContainer from 'containers/annotation-page/standard-workspace/objects-side-bar/objects-list';
-import ObjectSideBarComponent from 'components/annotation-page/standard-workspace/objects-side-bar/objects-side-bar';
+import ObjectSideBarComponent from 'components/annotation-page/weed-ai-workspace/objects-side-bar/objects-side-bar';
import CanvasPointContextMenuComponent from 'components/annotation-page/canvas/canvas-point-context-menu';
import IssueAggregatorComponent from 'components/annotation-page/review/issues-aggregator';
diff --git a/cvat-ui/src/reducers/annotation-reducer.ts b/cvat-ui/src/reducers/annotation-reducer.ts
index 028db9268195..affa58a5d763 100644
--- a/cvat-ui/src/reducers/annotation-reducer.ts
+++ b/cvat-ui/src/reducers/annotation-reducer.ts
@@ -110,6 +110,7 @@ const defaultState: AnnotationState = {
colors: [],
sidebarCollapsed: false,
appearanceCollapsed: false,
+ userHelpCollapsed: false,
filtersPanelVisible: false,
requestReviewDialogVisible: false,
submitReviewDialogVisible: false,
@@ -410,6 +411,12 @@ export default (state = defaultState, action: AnyAction): AnnotationState => {
appearanceCollapsed: !state.appearanceCollapsed,
};
}
+ case AnnotationActionTypes.COLLAPSE_USER_HELP: {
+ return {
+ ...state,
+ userHelpCollapsed: !state.userHelpCollapsed,
+ };
+ }
case AnnotationActionTypes.COLLAPSE_OBJECT_ITEMS: {
const { states, collapsed } = action.payload;