diff --git a/CHANGELOG.md b/CHANGELOG.md index cf868054cee..e50e059a663 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - No mapping between side object element and context menu in some attributes () - Interpolated shapes exported as `keyframe = True` () - Stylelint filetype scans () +- Fixed toolip closing issue () ### Security - diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 26e0217c3ae..f6ff3fd89d7 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.6.4", + "version": "1.6.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index add2deab7ed..922033dbac3 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.6.4", + "version": "1.6.5", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx b/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx index f2ddbac945b..f11893dbf5e 100644 --- a/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx +++ b/cvat-ui/src/components/annotation-page/annotations-filters-input.tsx @@ -147,7 +147,7 @@ function AnnotationsFiltersInput(props: StateToProps & DispatchToProps): JSX.Ele placeholder={ underCursor ? ( <> - + { diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx index da835b60851..23675d0b255 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-switcher.tsx @@ -28,16 +28,16 @@ function AttributeSwitcher(props: Props): JSX.Element { const title = `${currentAttribute} [${currentIndex + 1}/${attributesCount}]`; return (
- + - + {currentAttribute} {` [${currentIndex + 1}/${attributesCount}]`} - + diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx index 97e77d0b6ec..a6a92a56782 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/object-switcher.tsx @@ -32,17 +32,17 @@ function ObjectSwitcher(props: Props): JSX.Element { const title = `${currentLabel} ${clientID} [${currentIndex + 1}/${objectsCount}]`; return (
- + - + {currentLabel} {` ${clientID} `} {`[${currentIndex + 1}/${objectsCount}]`} - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-point-context-menu.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-point-context-menu.tsx index 2e782a4f40e..9d6f56c0546 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-point-context-menu.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-point-context-menu.tsx @@ -111,7 +111,7 @@ function CanvasPointContextMenu(props: Props): React.ReactPortal | null { return visible && contextMenuFor && type === ContextMenuType.CANVAS_SHAPE_POINT ? (ReactDOM.createPortal(
- + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx index b10cd3d6bfe..14a13014e76 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx @@ -876,7 +876,7 @@ export default class CanvasWrapperComponent extends React.PureComponent { defaultValue={0} onChange={(value: SliderValue): void => onSwitchZLayer(value as number)} /> - +
diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx index 0222008d927..e4f0ec15b8b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/cursor-control.tsx @@ -24,7 +24,7 @@ function CursorControl(props: Props): JSX.Element { } = props; return ( - + + - + - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx index 4de7cfc48da..0ad4e788455 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/fit-control.tsx @@ -19,7 +19,7 @@ function FitControl(props: Props): JSX.Element { } = props; return ( - + canvasInstance.fit()} /> ); diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx index 968b4b3feb1..15cf9be125c 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/group-control.tsx @@ -45,7 +45,7 @@ function GroupControl(props: Props): JSX.Element { const title = `Group shapes/tracks ${switchGroupShortcut}.` + ` Select and press ${resetGroupShortcut} to reset a group`; return ( - + ); diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx index c70a90c0d73..2ac9f432991 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/merge-control.tsx @@ -41,7 +41,7 @@ function MergeControl(props: Props): JSX.Element { }; return ( - + ); diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx index 3446a5954c6..1a25f2bf589 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/move-control.tsx @@ -19,7 +19,7 @@ function MoveControl(props: Props): JSX.Element { const { canvasInstance, activeControl } = props; return ( - + + - + rotateFrame(Rotation.ANTICLOCKWISE90)} component={RotateIcon} /> - + rotateFrame(Rotation.CLOCKWISE90)} diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx index 3366079d0a9..11c1c1f60f9 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/setup-tag-popover.tsx @@ -61,7 +61,7 @@ function SetupTagPopover(props: Props): JSX.Element { - + diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx index 7624e6f0b26..e700d2873cd 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/split-control.tsx @@ -41,7 +41,7 @@ function SplitControl(props: Props): JSX.Element { }; return ( - + ); diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx index 08536f877ed..99a243b8f78 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item-basics.tsx @@ -74,7 +74,7 @@ function ItemTopComponent(props: Props): JSX.Element { {type} - + { - onChangeShortcutLabel(value, Number.parseInt(id, 10)); - }} - size='default' - style={{ width: 200 }} - className='cvat-tag-annotation-label-select' - > - - - None - - - { - (labels as any[]).map((label: any) => ( - - {label.name} + { + shift(Object.keys(shortcutLabelMap), 1).slice(0, Math.min(labels.length, 10)) + .map((id) => ( + + + {`Key ${id}:`} + - - - ))} + { + (labels as any[]).map((label: any) => ( + + {label.name} + + )) + } + + + + )) + }
); }; diff --git a/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx b/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx index 5033c9bed85..2813e729dc2 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/player-buttons.tsx @@ -54,19 +54,19 @@ function PlayerButtons(props: Props): JSX.Element { return ( - + - + - + {!playing ? ( - + ) : ( - + )} - + - + - + diff --git a/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx b/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx index bf723a77c9e..f536b08185c 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/player-navigation.tsx @@ -62,19 +62,19 @@ function PlayerNavigation(props: Props): JSX.Element { - + {frameFilename} - + - + - + Similarity threshold: @@ -62,7 +62,7 @@ function InputModal(props: InputModalProps): JSX.Element { - + Max pixel distance: @@ -189,6 +189,8 @@ function ReIDPlugin(props: StateToProps & DispatchToProps): JSX.Element { }); await jobInstance.annotations.clear(); updateAnnotations(); // one more call to do not confuse canvas + // False positive of no-unsanitized/method + // eslint-disable-next-line no-unsanitized/method await jobInstance.annotations.import(merged); updateAnnotations(); } catch (error) { diff --git a/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx b/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx index ae7f88329f3..54c7723eb93 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/right-group.tsx @@ -49,7 +49,7 @@ function RightGroup(props: Props): JSX.Element { value={workspace} > {Object.values(Workspace).map((ws) => ( - + {ws} ))} diff --git a/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx b/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx index eb4e379620b..d68d58d9c03 100644 --- a/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx +++ b/cvat-ui/src/components/annotation-page/top-bar/statistics-modal.tsx @@ -89,7 +89,7 @@ export default function StatisticsModalComponent(props: Props): JSX.Element { }); const makeShapesTracksTitle = (title: string): JSX.Element => ( - + {title} diff --git a/cvat-ui/src/components/create-model-page/create-model-content.tsx b/cvat-ui/src/components/create-model-page/create-model-content.tsx index a320b805643..a562bfce327 100644 --- a/cvat-ui/src/components/create-model-page/create-model-content.tsx +++ b/cvat-ui/src/components/create-model-page/create-model-content.tsx @@ -18,8 +18,8 @@ import ConnectedFileManager, { } from 'containers/file-manager/file-manager'; import { ModelFiles } from 'reducers/interfaces'; -import CreateModelForm, { - CreateModelForm as WrappedCreateModelForm, +import WrappedCreateModelForm, { + CreateModelForm, } from './create-model-form'; interface Props { @@ -29,12 +29,12 @@ interface Props { } export default class CreateModelContent extends React.PureComponent { - private modelForm: WrappedCreateModelForm; + private modelForm: CreateModelForm; private fileManagerContainer: FileManagerContainer; public constructor(props: Props) { super(props); - this.modelForm = null as any as WrappedCreateModelForm; + this.modelForm = null as any as CreateModelForm; this.fileManagerContainer = null as any as FileManagerContainer; } @@ -107,7 +107,7 @@ export default class CreateModelContent extends React.PureComponent { return ( - + { // false positive @@ -119,9 +119,9 @@ export default class CreateModelContent extends React.PureComponent { - { + (ref: CreateModelForm): void => { this.modelForm = ref; } } diff --git a/cvat-ui/src/components/create-model-page/create-model-form.tsx b/cvat-ui/src/components/create-model-page/create-model-form.tsx index e1dbcb33667..004e96458d2 100644 --- a/cvat-ui/src/components/create-model-page/create-model-form.tsx +++ b/cvat-ui/src/components/create-model-page/create-model-form.tsx @@ -57,7 +57,7 @@ export class CreateModelForm extends React.PureComponent { - + { getFieldDecorator('global', { initialValue: false, valuePropName: 'checked', diff --git a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx index b038408bf83..a5ed8eae6f6 100644 --- a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx +++ b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx @@ -142,7 +142,7 @@ class AdvancedConfigurationForm extends React.PureComponent { return ( Image quality}> - + {form.getFieldDecorator('imageQuality', { initialValue: 70, rules: [{ @@ -168,7 +168,7 @@ class AdvancedConfigurationForm extends React.PureComponent { return ( Overlap size}> - + {form.getFieldDecorator('overlapSize', { rules: [{ validator: isNonNegativeInteger, @@ -186,7 +186,7 @@ class AdvancedConfigurationForm extends React.PureComponent { return ( Segment size}> - + {form.getFieldDecorator('segmentSize', { rules: [{ validator: isPositiveInteger, @@ -403,6 +403,7 @@ class AdvancedConfigurationForm extends React.PureComponent { More: 1 - 4 )} + mouseLeaveDelay={0} > {form.getFieldDecorator('dataChunkSize', { rules: [{ diff --git a/cvat-ui/src/components/create-task-page/create-task-content.tsx b/cvat-ui/src/components/create-task-page/create-task-content.tsx index 2bd32807749..7ee99a6a1e5 100644 --- a/cvat-ui/src/components/create-task-page/create-task-content.tsx +++ b/cvat-ui/src/components/create-task-page/create-task-content.tsx @@ -10,7 +10,7 @@ import Collapse from 'antd/lib/collapse'; import notification from 'antd/lib/notification'; import Text from 'antd/lib/typography/Text'; -import FileManagerContainer from 'containers/file-manager/file-manager'; +import ConnectedFileManager from 'containers/file-manager/file-manager'; import BasicConfigurationForm, { BaseConfiguration } from './basic-configuration-form'; import AdvancedConfigurationForm, { AdvancedConfiguration } from './advanced-configuration-form'; import LabelsEditor from '../labels-editor/labels-editor'; @@ -184,7 +184,7 @@ export default class CreateTaskContent extends React.PureComponent * Select files: - { this.fileManagerContainer = container; } } diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index 9eeecd78509..22dccb88ec6 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -189,6 +189,7 @@ class CVATApplication extends React.PureComponent 200 ? 'Open the Browser Console to get details' : error, }); + // eslint-disable-next-line no-console console.error(error); } diff --git a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx index fc8ca195826..9be93aae9ea 100644 --- a/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx +++ b/cvat-ui/src/components/global-error-boundary/global-error-boundary.tsx @@ -153,7 +153,7 @@ class GlobalErrorBoundary extends React.PureComponent {
  • - + {/* eslint-disable-next-line */} {copy(message)}}> Copy diff --git a/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx b/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx index a21962e0a9c..67bf793744e 100644 --- a/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx +++ b/cvat-ui/src/components/labels-editor/constructor-viewer-item.tsx @@ -27,7 +27,7 @@ export default function ConstructorViewerItem(props: ConstructorViewerItemProps) return (
    {label.name} - + { label.id < 0 && ( - + { return ( - + { form.getFieldDecorator(`type[${key}]`, { initialValue: type, })( @@ -187,7 +187,7 @@ class LabelForm extends React.PureComponent { }; return ( - + { form.getFieldDecorator(`values[${key}]`, { initialValue: existedValues, @@ -214,7 +214,7 @@ class LabelForm extends React.PureComponent { const { form } = this.props; return ( - + { form.getFieldDecorator(`values[${key}]`, { initialValue: value, @@ -304,7 +304,7 @@ class LabelForm extends React.PureComponent { return ( - + { form.getFieldDecorator(`mutable[${key}]`, { initialValue: value, valuePropName: 'checked', @@ -321,7 +321,7 @@ class LabelForm extends React.PureComponent { return ( - + | - @@ -150,7 +152,7 @@ function JobListComponent(props: Props & RouteComponentProps): JSX.Element { Jobs - +