From 31a11d270beaa52ed02051e88b1988e1d66f97d0 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Mon, 4 Sep 2023 14:42:17 +0300 Subject: [PATCH 01/18] Do not trigger hotkeys when modals are opened --- cvat-ui/src/utils/mousetrap-react.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cvat-ui/src/utils/mousetrap-react.tsx b/cvat-ui/src/utils/mousetrap-react.tsx index 3e5225071198..927c9aba1eb7 100644 --- a/cvat-ui/src/utils/mousetrap-react.tsx +++ b/cvat-ui/src/utils/mousetrap-react.tsx @@ -52,6 +52,26 @@ export default function GlobalHotKeys(props: Props): JSX.Element { return children || <>; } +Mousetrap.prototype.stopCallback = function (e: KeyboardEvent, element: Element): boolean { + // if the element has the class "mousetrap" then no need to stop + if ((` ${(element as HTMLElement).className} `).indexOf(' mousetrap ') > -1) { + return false; + } + + // stop when modals are opened + const someModalsOpened = Array.from( + window.document.getElementsByClassName('ant-modal'), + ).some((el) => (el as HTMLElement).style.display !== 'none'); + if (someModalsOpened) { + return true; + } + + // stop for input, select, and textarea + return element.tagName === 'INPUT' || + element.tagName === 'SELECT' || + element.tagName === 'TEXTAREA'; +}; + export function getApplicationKeyMap(): KeyMap { return { ...applicationKeyMap, From ce7322bbeb2c24a45c962b8fd87e09ed7b5a27ec Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Mon, 4 Sep 2023 15:03:23 +0300 Subject: [PATCH 02/18] Fixed brush/eraser on click --- cvat-canvas/src/typescript/masksHandler.ts | 2 ++ cvat-ui/src/utils/mousetrap-react.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cvat-canvas/src/typescript/masksHandler.ts b/cvat-canvas/src/typescript/masksHandler.ts index e884bef766f1..dfb9d6b11291 100644 --- a/cvat-canvas/src/typescript/masksHandler.ts +++ b/cvat-canvas/src/typescript/masksHandler.ts @@ -359,6 +359,8 @@ export class MasksHandlerImpl implements MasksHandler { if (!continueInserting) { this.releasePaste(); } + } else { + this.canvas.fire('mouse:move', options); } }); diff --git a/cvat-ui/src/utils/mousetrap-react.tsx b/cvat-ui/src/utils/mousetrap-react.tsx index 927c9aba1eb7..aa234862e975 100644 --- a/cvat-ui/src/utils/mousetrap-react.tsx +++ b/cvat-ui/src/utils/mousetrap-react.tsx @@ -52,7 +52,7 @@ export default function GlobalHotKeys(props: Props): JSX.Element { return children || <>; } -Mousetrap.prototype.stopCallback = function (e: KeyboardEvent, element: Element): boolean { +Mousetrap.prototype.stopCallback = function (e: KeyboardEvent, element: Element, combo: string): boolean { // if the element has the class "mousetrap" then no need to stop if ((` ${(element as HTMLElement).className} `).indexOf(' mousetrap ') > -1) { return false; @@ -62,7 +62,7 @@ Mousetrap.prototype.stopCallback = function (e: KeyboardEvent, element: Element) const someModalsOpened = Array.from( window.document.getElementsByClassName('ant-modal'), ).some((el) => (el as HTMLElement).style.display !== 'none'); - if (someModalsOpened) { + if (someModalsOpened && !['f1', 'f2'].includes(combo)) { return true; } From 5d8409828828f403916048fa9683f292e8326988 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Mon, 4 Sep 2023 16:03:03 +0300 Subject: [PATCH 03/18] Updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b9d809cb9ce..e5b5ec4c8fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Removed -- TDB +- Outdated using of hostname when access git/opencv/analytics from UI () ### Fixed - Zooming canvas when scrooling comments list in an issue () From c6c7545a7f5e916c0a69e026bc40b27609a9482e Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Mon, 4 Sep 2023 16:09:38 +0300 Subject: [PATCH 04/18] Updated changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5b5ec4c8fd9..b95f5d4f4e6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,12 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Removed -- Outdated using of hostname when access git/opencv/analytics from UI () +- TDB ### Fixed - Zooming canvas when scrooling comments list in an issue () - Issues can be created many times when initial submit () - Paddings on tasks/projects/models pages () +- Hotkeys handlers triggered instead of default behaviour with focus when modal windows opened + () +- Need to move a mouse to use brush/eraser, just click not enough () ### Security - TDB From 25ee2f73705b1ea79b432bd7391552d5bada70c0 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 5 Sep 2023 10:25:36 +0300 Subject: [PATCH 05/18] Trigger CI run From 5d43bf2f329d2430d6c7c8f873a9ee6628db07d1 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 5 Sep 2023 14:39:25 +0300 Subject: [PATCH 06/18] Fixed test --- .../e2e/actions_objects/case_24_delete_unlock_lock_object.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js index 288388e0b207..e9345a339702 100644 --- a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js +++ b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js @@ -76,6 +76,7 @@ context('Delete unlock/lock object', () => { cy.get('.cvat-modal-confirm').should('exist'); cy.get('.cvat-modal-confirm').within(() => { cy.contains('Cancel').click(); + cy.get('.cvat-modal-confirm').should('not.be.visible'); }); } From 6c450eed3146cec3adf8ceab642896e56cbb01eb Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 5 Sep 2023 16:30:11 +0300 Subject: [PATCH 07/18] tmp --- .../standard-workspace/remove-confirm.tsx | 3 ++- .../actions_objects/case_24_delete_unlock_lock_object.js | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx index 06086fa3431c..9e76b0ce1697 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx @@ -70,7 +70,8 @@ export default function RemoveConfirmComponent(): JSX.Element | null { visible={visible} onOk={onOk} onCancel={onCancel} - className='cvat-modal-confirm' + destroyOnClose + className='cvat-modal-confirm-remove-object' >
{description} diff --git a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js index e9345a339702..c1c902317ede 100644 --- a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js +++ b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js @@ -60,7 +60,7 @@ context('Delete unlock/lock object', () => { } function actionOnConfirmWindow(textBuntton) { - cy.get('.cvat-modal-confirm').within(() => { + cy.get('.cvat-modal-confirm-remove-object').within(() => { cy.contains(new RegExp(`^${textBuntton}$`, 'g')).click(); }); } @@ -73,10 +73,11 @@ context('Delete unlock/lock object', () => { function checkFailDeleteLockObject(shortcut) { deleteObjectViaShortcut(shortcut, 'lock'); checkExistObject('exist'); - cy.get('.cvat-modal-confirm').should('exist'); - cy.get('.cvat-modal-confirm').within(() => { + cy.get('.cvat-modal-confirm-remove-object').should('exist'); + cy.get('.cvat-modal-confirm-remove-object').within(() => { cy.contains('Cancel').click(); - cy.get('.cvat-modal-confirm').should('not.be.visible'); + cy.get('.cvat-modal-confirm-remove-object').should('not.exist'); + cy.wait(100); }); } From ec7c56895bd659e6d14e4e21f386c601e6ebdb8d Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 5 Sep 2023 16:46:13 +0300 Subject: [PATCH 08/18] Fixed tests --- .../case_24_delete_unlock_lock_object.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js index c1c902317ede..435962f91d7a 100644 --- a/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js +++ b/tests/cypress/e2e/actions_objects/case_24_delete_unlock_lock_object.js @@ -25,12 +25,10 @@ context('Delete unlock/lock object', () => { }); } - function deleteObjectViaShortcut(shortcut, stateLockObject) { - if (stateLockObject === 'unlock') { - cy.get('.cvat-canvas-container').within(() => { - cy.get('.cvat_canvas_shape').trigger('mousemove').should('have.class', 'cvat_canvas_shape_activated'); - }); - } + function deleteObjectViaShortcut(shortcut) { + cy.get('body').click(); + cy.get('.cvat-objects-sidebar-state-item').trigger('mouseover'); + cy.get('.cvat-objects-sidebar-state-item').should('have.class', 'cvat-objects-sidebar-state-active-item'); cy.get('body').type(shortcut); } @@ -71,13 +69,12 @@ context('Delete unlock/lock object', () => { } function checkFailDeleteLockObject(shortcut) { - deleteObjectViaShortcut(shortcut, 'lock'); + deleteObjectViaShortcut(shortcut); checkExistObject('exist'); cy.get('.cvat-modal-confirm-remove-object').should('exist'); cy.get('.cvat-modal-confirm-remove-object').within(() => { cy.contains('Cancel').click(); cy.get('.cvat-modal-confirm-remove-object').should('not.exist'); - cy.wait(100); }); } @@ -88,7 +85,7 @@ context('Delete unlock/lock object', () => { describe(`Testing case "${caseId}"`, () => { it('Create and delete object via "Delete" shortcut', () => { cy.createRectangle(createRectangleShape2Points); - deleteObjectViaShortcut('{del}', 'unlock'); + deleteObjectViaShortcut('{del}'); checkExistObject('not.exist'); }); @@ -102,7 +99,7 @@ context('Delete unlock/lock object', () => { cy.createRectangle(createRectangleShape2Points); lockObject(); checkFailDeleteLockObject('{del}'); - deleteObjectViaShortcut('{shift}{del}', 'lock'); + deleteObjectViaShortcut('{shift}{del}'); checkExistObject('not.exist'); }); From a7d51ec92309f0131d07e9d633a4eb585eaebd1b Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 09:29:03 +0300 Subject: [PATCH 09/18] Applied comment --- cvat-ui/src/components/cvat-app.tsx | 14 ++++++++++---- cvat-ui/src/index.tsx | 5 +++++ cvat-ui/src/utils/mousetrap-react.tsx | 5 ----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index b2a7938ddc18..94071a27b055 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -109,6 +109,8 @@ interface CVATAppProps { userAgreementsInitialized: boolean; authActionsFetching: boolean; authActionsInitialized: boolean; + shortcutsModalVisible: boolean; + settingsModalVisible: boolean; notifications: NotificationsState; user: any; isModelPluginActive: boolean; @@ -396,6 +398,8 @@ class CVATApplication extends React.PureComponent { if (event) event.preventDefault(); - - switchShortcutsDialog(); + if (!settingsModalVisible) { + switchShortcutsDialog(); + } }, SWITCH_SETTINGS: (event: KeyboardEvent) => { if (event) event.preventDefault(); - - switchSettingsDialog(); + if (!shortcutsModalVisible) { + switchSettingsDialog(); + } }, }; diff --git a/cvat-ui/src/index.tsx b/cvat-ui/src/index.tsx index 789825fb0256..0fe3d05e22c6 100644 --- a/cvat-ui/src/index.tsx +++ b/cvat-ui/src/index.tsx @@ -54,6 +54,8 @@ interface StateToProps { user: any; keyMap: KeyMap; isModelPluginActive: boolean; + shortcutsModalVisible: boolean; + settingsModalVisible: boolean; pluginComponents: PluginsState['components']; } @@ -81,6 +83,7 @@ function mapStateToProps(state: CombinedState): StateToProps { const { userAgreements } = state; const { models } = state; const { organizations } = state; + const { settings } = state; return { userInitialized: auth.initialized, @@ -106,6 +109,8 @@ function mapStateToProps(state: CombinedState): StateToProps { keyMap: shortcuts.keyMap, pluginComponents: plugins.components, isModelPluginActive: plugins.list.MODELS, + shortcutsModalVisible: shortcuts.visibleShortcutsHelp, + settingsModalVisible: settings.showDialog, }; } diff --git a/cvat-ui/src/utils/mousetrap-react.tsx b/cvat-ui/src/utils/mousetrap-react.tsx index aa234862e975..690fb3c4cd31 100644 --- a/cvat-ui/src/utils/mousetrap-react.tsx +++ b/cvat-ui/src/utils/mousetrap-react.tsx @@ -53,11 +53,6 @@ export default function GlobalHotKeys(props: Props): JSX.Element { } Mousetrap.prototype.stopCallback = function (e: KeyboardEvent, element: Element, combo: string): boolean { - // if the element has the class "mousetrap" then no need to stop - if ((` ${(element as HTMLElement).className} `).indexOf(' mousetrap ') > -1) { - return false; - } - // stop when modals are opened const someModalsOpened = Array.from( window.document.getElementsByClassName('ant-modal'), From cec5c2244e666531953af8e033a5784a343d0c68 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 09:54:16 +0300 Subject: [PATCH 10/18] Refactoring --- cvat-ui/src/actions/settings-actions.ts | 6 +- cvat-ui/src/actions/shortcuts-actions.ts | 6 +- cvat-ui/src/components/cvat-app.tsx | 138 +++++++----------- cvat-ui/src/components/header/header.tsx | 72 ++++++--- .../shortcuts-dialog/shortcuts-dialog.tsx | 15 +- cvat-ui/src/index.tsx | 11 -- cvat-ui/src/reducers/settings-reducer.ts | 2 +- cvat-ui/src/reducers/shortcuts-reducer.ts | 2 +- 8 files changed, 122 insertions(+), 130 deletions(-) diff --git a/cvat-ui/src/actions/settings-actions.ts b/cvat-ui/src/actions/settings-actions.ts index 0e37fe7d3da5..82a7a0e73259 100644 --- a/cvat-ui/src/actions/settings-actions.ts +++ b/cvat-ui/src/actions/settings-actions.ts @@ -327,12 +327,10 @@ export function changeCanvasBackgroundColor(color: string): AnyAction { }; } -export function switchSettingsDialog(show?: boolean): AnyAction { +export function switchSettingsModalVisible(visible: boolean): AnyAction { return { type: SettingsActionTypes.SWITCH_SETTINGS_DIALOG, - payload: { - show, - }, + payload: { visible }, }; } diff --git a/cvat-ui/src/actions/shortcuts-actions.ts b/cvat-ui/src/actions/shortcuts-actions.ts index 8f35d0a57e63..ddcfc040ec52 100644 --- a/cvat-ui/src/actions/shortcuts-actions.ts +++ b/cvat-ui/src/actions/shortcuts-actions.ts @@ -1,6 +1,8 @@ // Copyright (C) 2020-2022 Intel Corporation +// Copyright (C) 2023 CVAT.ai Corporation // // SPDX-License-Identifier: MIT + import { ActionUnion, createAction } from 'utils/redux'; export enum ShortcutsActionsTypes { @@ -8,7 +10,9 @@ export enum ShortcutsActionsTypes { } export const shortcutsActions = { - switchShortcutsDialog: () => createAction(ShortcutsActionsTypes.SWITCH_SHORTCUT_DIALOG), + switchShortcutsModalVisible: (visible: boolean) => ( + createAction(ShortcutsActionsTypes.SWITCH_SHORTCUT_DIALOG, { visible }) + ), }; export type ShortcutsActions = ActionUnion; diff --git a/cvat-ui/src/components/cvat-app.tsx b/cvat-ui/src/components/cvat-app.tsx index 94071a27b055..986793042fd9 100644 --- a/cvat-ui/src/components/cvat-app.tsx +++ b/cvat-ui/src/components/cvat-app.tsx @@ -60,7 +60,6 @@ import GuidePage from 'components/md-guide/guide-page'; import AnnotationPageContainer from 'containers/annotation-page/annotation-page'; import { getCore } from 'cvat-core-wrapper'; -import GlobalHotKeys, { KeyMap } from 'utils/mousetrap-react'; import { NotificationsState, PluginsState } from 'reducers'; import { customWaViewHit } from 'utils/environment'; import showPlatformNotification, { @@ -88,11 +87,8 @@ interface CVATAppProps { initModels: () => void; resetErrors: () => void; resetMessages: () => void; - switchShortcutsDialog: () => void; - switchSettingsDialog: () => void; loadAuthActions: () => void; loadOrganizations: () => void; - keyMap: KeyMap; userInitialized: boolean; userFetching: boolean; organizationsFetching: boolean; @@ -109,8 +105,6 @@ interface CVATAppProps { userAgreementsInitialized: boolean; authActionsFetching: boolean; authActionsInitialized: boolean; - shortcutsModalVisible: boolean; - settingsModalVisible: boolean; notifications: NotificationsState; user: any; isModelPluginActive: boolean; @@ -139,7 +133,6 @@ class CVATApplication extends React.PureComponent void)[] = []; @@ -398,13 +391,8 @@ class CVATApplication extends React.PureComponent { - if (event) event.preventDefault(); - if (!settingsModalVisible) { - switchShortcutsDialog(); - } - }, - SWITCH_SETTINGS: (event: KeyboardEvent) => { - if (event) event.preventDefault(); - if (!shortcutsModalVisible) { - switchSettingsDialog(); - } - }, - }; - const routesToRender = pluginComponents.router .filter(({ data: { shouldBeRendered } }) => shouldBeRendered(this.props, this.state)) .map(({ component: Component }) => Component()); @@ -461,61 +429,59 @@ class CVATApplication extends React.PureComponent - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + { routesToRender } + {isModelPluginActive && ( - - - - - { routesToRender } - {isModelPluginActive && ( - - - - - - - )} - - - + path='/models' + > + + + + + + )} + + diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx index 4eb45aead988..334f77883aef 100644 --- a/cvat-ui/src/components/header/header.tsx +++ b/cvat-ui/src/components/header/header.tsx @@ -35,10 +35,12 @@ import config from 'config'; import { CVATLogo } from 'icons'; import ChangePasswordDialog from 'components/change-password-modal/change-password-modal'; import CVATTooltip from 'components/common/cvat-tooltip'; -import { switchSettingsDialog as switchSettingsDialogAction } from 'actions/settings-actions'; +import { switchSettingsModalVisible as switchSettingsModalVisibleAction } from 'actions/settings-actions'; import { logoutAsync, authActions } from 'actions/auth-actions'; +import { shortcutsActions } from 'actions/shortcuts-actions'; import { CombinedState } from 'reducers'; import { usePlugins } from 'utils/hooks'; +import GlobalHotKeys, { KeyMap } from 'utils/mousetrap-react'; import SettingsModal from './settings-modal/settings-modal'; interface Tool { @@ -61,8 +63,10 @@ interface Tool { interface StateToProps { user: any; tool: Tool; + keyMap: KeyMap; switchSettingsShortcut: string; - settingsDialogShown: boolean; + settingsModalVisible: boolean; + shortcutsModalVisible: boolean; changePasswordDialogShown: boolean; changePasswordFetching: boolean; logoutFetching: boolean; @@ -77,8 +81,9 @@ interface StateToProps { interface DispatchToProps { onLogout: () => void; - switchSettingsDialog: (show: boolean) => void; - switchChangePasswordDialog: (show: boolean) => void; + switchSettingsModalVisible: (visible: boolean) => void; + switchShortcutsModalVisible: (visible: boolean) => void; + switchChangePasswordDialog: (visible: boolean) => void; } function mapStateToProps(state: CombinedState): StateToProps { @@ -92,8 +97,8 @@ function mapStateToProps(state: CombinedState): StateToProps { }, plugins: { list }, about: { server, packageVersion }, - shortcuts: { normalizedKeyMap }, - settings: { showDialog: settingsDialogShown }, + shortcuts: { normalizedKeyMap, keyMap, visibleShortcutsHelp: shortcutsModalVisible }, + settings: { showDialog: settingsModalVisible }, organizations: { fetching: organizationsFetching, current: currentOrganization, list: organizationsList }, } = state; @@ -116,7 +121,9 @@ function mapStateToProps(state: CombinedState): StateToProps { }, }, switchSettingsShortcut: normalizedKeyMap.SWITCH_SETTINGS, - settingsDialogShown, + keyMap, + settingsModalVisible, + shortcutsModalVisible, changePasswordDialogShown, changePasswordFetching, logoutFetching, @@ -133,29 +140,39 @@ function mapStateToProps(state: CombinedState): StateToProps { function mapDispatchToProps(dispatch: any): DispatchToProps { return { onLogout: (): void => dispatch(logoutAsync()), - switchSettingsDialog: (show: boolean): void => dispatch(switchSettingsDialogAction(show)), - switchChangePasswordDialog: (show: boolean): void => dispatch(authActions.switchChangePasswordDialog(show)), + switchShortcutsModalVisible: (visible: boolean): void => dispatch( + shortcutsActions.switchShortcutsModalVisible(visible), + ), + switchSettingsModalVisible: (visible: boolean): void => dispatch( + switchSettingsModalVisibleAction(visible), + ), + switchChangePasswordDialog: (visible: boolean): void => dispatch( + authActions.switchChangePasswordDialog(visible), + ), }; } type Props = StateToProps & DispatchToProps; -function HeaderContainer(props: Props): JSX.Element { +function HeaderComponent(props: Props): JSX.Element { const { user, tool, + keyMap, logoutFetching, changePasswordFetching, - settingsDialogShown, + settingsModalVisible, + shortcutsModalVisible, switchSettingsShortcut, - switchSettingsDialog, - switchChangePasswordDialog, renderChangePasswordItem, isAnalyticsPluginActive, isModelsPluginActive, organizationsFetching, currentOrganization, organizationsList, + switchSettingsModalVisible, + switchShortcutsModalVisible, + switchChangePasswordDialog, } = props; const { @@ -165,6 +182,26 @@ function HeaderContainer(props: Props): JSX.Element { const history = useHistory(); const location = useLocation(); + const subKeyMap = { + SWITCH_SHORTCUTS: keyMap.SWITCH_SHORTCUTS, + SWITCH_SETTINGS: keyMap.SWITCH_SETTINGS, + }; + + const handlers = { + SWITCH_SHORTCUTS: (event: KeyboardEvent) => { + if (event) event.preventDefault(); + if (!settingsModalVisible) { + switchShortcutsModalVisible(!shortcutsModalVisible); + } + }, + SWITCH_SETTINGS: (event: KeyboardEvent) => { + if (event) event.preventDefault(); + if (!shortcutsModalVisible) { + switchSettingsModalVisible(!settingsModalVisible); + } + }, + }; + const showAboutModal = useCallback((): void => { Modal.info({ title: `${tool.name}`, @@ -221,7 +258,7 @@ function HeaderContainer(props: Props): JSX.Element { }, [tool]); const closeSettings = useCallback(() => { - switchSettingsDialog(false); + switchSettingsModalVisible(false); }, []); const resetOrganization = (): void => { @@ -347,7 +384,7 @@ function HeaderContainer(props: Props): JSX.Element { icon={} key='settings' title={`Press ${switchSettingsShortcut} to switch`} - onClick={() => switchSettingsDialog(true)} + onClick={() => switchSettingsModalVisible(true)} > Settings @@ -409,6 +446,7 @@ function HeaderContainer(props: Props): JSX.Element { return ( +
- + {renderChangePasswordItem && switchChangePasswordDialog(false)} />}
); @@ -554,4 +592,4 @@ function propsAreTheSame(prevProps: Props, nextProps: Props): boolean { return equal; } -export default connect(mapStateToProps, mapDispatchToProps)(React.memo(HeaderContainer, propsAreTheSame)); +export default connect(mapStateToProps, mapDispatchToProps)(React.memo(HeaderComponent, propsAreTheSame)); diff --git a/cvat-ui/src/components/shortcuts-dialog/shortcuts-dialog.tsx b/cvat-ui/src/components/shortcuts-dialog/shortcuts-dialog.tsx index 48967c33f818..bd88206bf5ba 100644 --- a/cvat-ui/src/components/shortcuts-dialog/shortcuts-dialog.tsx +++ b/cvat-ui/src/components/shortcuts-dialog/shortcuts-dialog.tsx @@ -16,7 +16,7 @@ interface StateToProps { } interface DispatchToProps { - switchShortcutsDialog(): void; + switchShortcutsModalVisible(visible: boolean): void; } function mapStateToProps(state: CombinedState): StateToProps { @@ -27,22 +27,19 @@ function mapStateToProps(state: CombinedState): StateToProps { }, } = state; - return { - visible, - jobInstance, - }; + return { visible, jobInstance }; } function mapDispatchToProps(dispatch: any): DispatchToProps { return { - switchShortcutsDialog(): void { - dispatch(shortcutsActions.switchShortcutsDialog()); + switchShortcutsModalVisible(visible: boolean): void { + dispatch(shortcutsActions.switchShortcutsModalVisible(visible)); }, }; } function ShortcutsDialog(props: StateToProps & DispatchToProps): JSX.Element | null { - const { visible, switchShortcutsDialog, jobInstance } = props; + const { visible, switchShortcutsModalVisible, jobInstance } = props; const keyMap = getApplicationKeyMap(); const splitToRows = (data: string[]): JSX.Element[] => data.map( @@ -97,7 +94,7 @@ function ShortcutsDialog(props: StateToProps & DispatchToProps): JSX.Element | n visible={visible} closable={false} width={800} - onOk={switchShortcutsDialog} + onOk={() => switchShortcutsModalVisible(false)} cancelButtonProps={{ style: { display: 'none' } }} zIndex={1001} /* default antd is 1000 */ className='cvat-shortcuts-modal-window' diff --git a/cvat-ui/src/index.tsx b/cvat-ui/src/index.tsx index 0fe3d05e22c6..00087e3830c2 100644 --- a/cvat-ui/src/index.tsx +++ b/cvat-ui/src/index.tsx @@ -13,8 +13,6 @@ import { authorizedAsync, loadAuthActionsAsync } from 'actions/auth-actions'; import { getFormatsAsync } from 'actions/formats-actions'; import { getModelsAsync } from 'actions/models-actions'; import { getPluginsAsync } from 'actions/plugins-actions'; -import { switchSettingsDialog } from 'actions/settings-actions'; -import { shortcutsActions } from 'actions/shortcuts-actions'; import { getUserAgreementsAsync } from 'actions/useragreements-actions'; import CVATApplication from 'components/cvat-app'; import PluginsEntrypoint from 'components/plugins-entrypoint'; @@ -54,8 +52,6 @@ interface StateToProps { user: any; keyMap: KeyMap; isModelPluginActive: boolean; - shortcutsModalVisible: boolean; - settingsModalVisible: boolean; pluginComponents: PluginsState['components']; } @@ -67,9 +63,7 @@ interface DispatchToProps { initPlugins: () => void; resetErrors: () => void; resetMessages: () => void; - switchShortcutsDialog: () => void; loadUserAgreements: () => void; - switchSettingsDialog: () => void; loadAuthActions: () => void; loadOrganizations: () => void; } @@ -83,7 +77,6 @@ function mapStateToProps(state: CombinedState): StateToProps { const { userAgreements } = state; const { models } = state; const { organizations } = state; - const { settings } = state; return { userInitialized: auth.initialized, @@ -109,8 +102,6 @@ function mapStateToProps(state: CombinedState): StateToProps { keyMap: shortcuts.keyMap, pluginComponents: plugins.components, isModelPluginActive: plugins.list.MODELS, - shortcutsModalVisible: shortcuts.visibleShortcutsHelp, - settingsModalVisible: settings.showDialog, }; } @@ -124,8 +115,6 @@ function mapDispatchToProps(dispatch: any): DispatchToProps { loadAbout: (): void => dispatch(getAboutAsync()), resetErrors: (): void => dispatch(resetErrors()), resetMessages: (): void => dispatch(resetMessages()), - switchShortcutsDialog: (): void => dispatch(shortcutsActions.switchShortcutsDialog()), - switchSettingsDialog: (): void => dispatch(switchSettingsDialog()), loadAuthActions: (): void => dispatch(loadAuthActionsAsync()), loadOrganizations: (): void => dispatch(getOrganizationsAsync()), }; diff --git a/cvat-ui/src/reducers/settings-reducer.ts b/cvat-ui/src/reducers/settings-reducer.ts index e732f26a7e7d..101c78f63832 100644 --- a/cvat-ui/src/reducers/settings-reducer.ts +++ b/cvat-ui/src/reducers/settings-reducer.ts @@ -367,7 +367,7 @@ export default (state = defaultState, action: AnyAction): SettingsState => { case SettingsActionTypes.SWITCH_SETTINGS_DIALOG: { return { ...state, - showDialog: typeof action.payload.show === 'undefined' ? !state.showDialog : action.payload.show, + showDialog: action.payload.visible, }; } case SettingsActionTypes.SET_SETTINGS: { diff --git a/cvat-ui/src/reducers/shortcuts-reducer.ts b/cvat-ui/src/reducers/shortcuts-reducer.ts index c2c18f78ee5b..27ec835564ef 100644 --- a/cvat-ui/src/reducers/shortcuts-reducer.ts +++ b/cvat-ui/src/reducers/shortcuts-reducer.ts @@ -452,7 +452,7 @@ export default (state = defaultState, action: ShortcutsActions | BoundariesActio case ShortcutsActionsTypes.SWITCH_SHORTCUT_DIALOG: { return { ...state, - visibleShortcutsHelp: !state.visibleShortcutsHelp, + visibleShortcutsHelp: action.payload.visible, }; } case BoundariesActionTypes.RESET_AFTER_ERROR: From 210c4bcc1f01d2f56eceb564a0142ee4b1312633 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 10:05:16 +0300 Subject: [PATCH 11/18] Simplified about prop --- cvat-ui/package.json | 2 +- cvat-ui/src/components/header/header.tsx | 71 +++++------------------- cvat-ui/src/index.tsx | 4 -- 3 files changed, 14 insertions(+), 63 deletions(-) diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 9b70e8f3b05a..cba98fd3168c 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.55.7", + "version": "1.55.8", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx index 334f77883aef..9ae5cea648b0 100644 --- a/cvat-ui/src/components/header/header.tsx +++ b/cvat-ui/src/components/header/header.tsx @@ -38,31 +38,14 @@ import CVATTooltip from 'components/common/cvat-tooltip'; import { switchSettingsModalVisible as switchSettingsModalVisibleAction } from 'actions/settings-actions'; import { logoutAsync, authActions } from 'actions/auth-actions'; import { shortcutsActions } from 'actions/shortcuts-actions'; -import { CombinedState } from 'reducers'; +import { AboutState, CombinedState } from 'reducers'; import { usePlugins } from 'utils/hooks'; import GlobalHotKeys, { KeyMap } from 'utils/mousetrap-react'; import SettingsModal from './settings-modal/settings-modal'; -interface Tool { - name: string; - description: string; - server: { - version: string; - }; - core: { - version: string; - }; - canvas: { - version: string; - }; - ui: { - version: string; - }; -} - interface StateToProps { user: any; - tool: Tool; + about: AboutState; keyMap: KeyMap; switchSettingsShortcut: string; settingsModalVisible: boolean; @@ -96,7 +79,7 @@ function mapStateToProps(state: CombinedState): StateToProps { allowChangePassword: renderChangePasswordItem, }, plugins: { list }, - about: { server, packageVersion }, + about, shortcuts: { normalizedKeyMap, keyMap, visibleShortcutsHelp: shortcutsModalVisible }, settings: { showDialog: settingsModalVisible }, organizations: { fetching: organizationsFetching, current: currentOrganization, list: organizationsList }, @@ -104,22 +87,7 @@ function mapStateToProps(state: CombinedState): StateToProps { return { user, - tool: { - name: server.name as string, - description: server.description as string, - server: { - version: server.version as string, - }, - canvas: { - version: packageVersion.canvas, - }, - core: { - version: packageVersion.core, - }, - ui: { - version: packageVersion.ui, - }, - }, + about, switchSettingsShortcut: normalizedKeyMap.SWITCH_SETTINGS, keyMap, settingsModalVisible, @@ -157,7 +125,7 @@ type Props = StateToProps & DispatchToProps; function HeaderComponent(props: Props): JSX.Element { const { user, - tool, + about, keyMap, logoutFetching, changePasswordFetching, @@ -204,25 +172,25 @@ function HeaderComponent(props: Props): JSX.Element { const showAboutModal = useCallback((): void => { Modal.info({ - title: `${tool.name}`, + title: `${about.server.name}`, content: (
-

{`${tool.description}`}

+

{`${about.server.description}`}

Server version: - {` ${tool.server.version}`} + {` ${about.server.version}`}

Core version: - {` ${tool.core.version}`} + {` ${about.packageVersion.core}`}

Canvas version: - {` ${tool.canvas.version}`} + {` ${about.packageVersion.canvas}`}

UI version: - {` ${tool.ui.version}`} + {` ${about.packageVersion.ui}`}

@@ -255,7 +223,7 @@ function HeaderComponent(props: Props): JSX.Element { }, }, }); - }, [tool]); + }, [about]); const closeSettings = useCallback(() => { switchSettingsModalVisible(false); @@ -579,17 +547,4 @@ function HeaderComponent(props: Props): JSX.Element { ); } -function propsAreTheSame(prevProps: Props, nextProps: Props): boolean { - let equal = true; - for (const prop in nextProps) { - if (prop in prevProps && (prevProps as any)[prop] !== (nextProps as any)[prop]) { - if (prop !== 'tool') { - equal = false; - } - } - } - - return equal; -} - -export default connect(mapStateToProps, mapDispatchToProps)(React.memo(HeaderComponent, propsAreTheSame)); +export default connect(mapStateToProps, mapDispatchToProps)(React.memo(HeaderComponent)); diff --git a/cvat-ui/src/index.tsx b/cvat-ui/src/index.tsx index 00087e3830c2..067a647b379f 100644 --- a/cvat-ui/src/index.tsx +++ b/cvat-ui/src/index.tsx @@ -19,7 +19,6 @@ import PluginsEntrypoint from 'components/plugins-entrypoint'; import LayoutGrid from 'components/layout-grid/layout-grid'; import logger, { LogType } from 'cvat-logger'; import createCVATStore, { getCVATStore } from 'cvat-store'; -import { KeyMap } from 'utils/mousetrap-react'; import createRootReducer from 'reducers/root-reducer'; import { getOrganizationsAsync } from 'actions/organization-actions'; import { resetErrors, resetMessages } from 'actions/notification-actions'; @@ -50,7 +49,6 @@ interface StateToProps { allowResetPassword: boolean; notifications: NotificationsState; user: any; - keyMap: KeyMap; isModelPluginActive: boolean; pluginComponents: PluginsState['components']; } @@ -73,7 +71,6 @@ function mapStateToProps(state: CombinedState): StateToProps { const { auth } = state; const { formats } = state; const { about } = state; - const { shortcuts } = state; const { userAgreements } = state; const { models } = state; const { organizations } = state; @@ -99,7 +96,6 @@ function mapStateToProps(state: CombinedState): StateToProps { allowResetPassword: auth.allowResetPassword, notifications: state.notifications, user: auth.user, - keyMap: shortcuts.keyMap, pluginComponents: plugins.components, isModelPluginActive: plugins.list.MODELS, }; From 8d8e493e56733de4d2e13b238858cb70f27e61aa Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 10:08:45 +0300 Subject: [PATCH 12/18] Renamed couple of ids --- cvat-ui/src/actions/auth-actions.ts | 4 ++-- cvat-ui/src/components/header/header.tsx | 14 ++++++++------ cvat-ui/src/reducers/auth-reducer.ts | 5 +---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cvat-ui/src/actions/auth-actions.ts b/cvat-ui/src/actions/auth-actions.ts index aaf8d9929789..94d01aade7f7 100644 --- a/cvat-ui/src/actions/auth-actions.ts +++ b/cvat-ui/src/actions/auth-actions.ts @@ -54,8 +54,8 @@ export const authActions = { changePassword: () => createAction(AuthActionTypes.CHANGE_PASSWORD), changePasswordSuccess: () => createAction(AuthActionTypes.CHANGE_PASSWORD_SUCCESS), changePasswordFailed: (error: any) => createAction(AuthActionTypes.CHANGE_PASSWORD_FAILED, { error }), - switchChangePasswordDialog: (showChangePasswordDialog: boolean) => ( - createAction(AuthActionTypes.SWITCH_CHANGE_PASSWORD_DIALOG, { showChangePasswordDialog }) + switchChangePasswordModalVisible: (visible: boolean) => ( + createAction(AuthActionTypes.SWITCH_CHANGE_PASSWORD_DIALOG, { visible }) ), requestPasswordReset: () => createAction(AuthActionTypes.REQUEST_PASSWORD_RESET), requestPasswordResetSuccess: () => createAction(AuthActionTypes.REQUEST_PASSWORD_RESET_SUCCESS), diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx index 9ae5cea648b0..0fd5be0b7c26 100644 --- a/cvat-ui/src/components/header/header.tsx +++ b/cvat-ui/src/components/header/header.tsx @@ -66,7 +66,7 @@ interface DispatchToProps { onLogout: () => void; switchSettingsModalVisible: (visible: boolean) => void; switchShortcutsModalVisible: (visible: boolean) => void; - switchChangePasswordDialog: (visible: boolean) => void; + switchChangePasswordModalVisible: (visible: boolean) => void; } function mapStateToProps(state: CombinedState): StateToProps { @@ -114,8 +114,8 @@ function mapDispatchToProps(dispatch: any): DispatchToProps { switchSettingsModalVisible: (visible: boolean): void => dispatch( switchSettingsModalVisibleAction(visible), ), - switchChangePasswordDialog: (visible: boolean): void => dispatch( - authActions.switchChangePasswordDialog(visible), + switchChangePasswordModalVisible: (visible: boolean): void => dispatch( + authActions.switchChangePasswordModalVisible(visible), ), }; } @@ -140,7 +140,7 @@ function HeaderComponent(props: Props): JSX.Element { organizationsList, switchSettingsModalVisible, switchShortcutsModalVisible, - switchChangePasswordDialog, + switchChangePasswordModalVisible, } = props; const { @@ -370,7 +370,7 @@ function HeaderComponent(props: Props): JSX.Element { key='change_password' icon={changePasswordFetching ? : } className='cvat-header-menu-change-password' - onClick={(): void => switchChangePasswordDialog(true)} + onClick={(): void => switchChangePasswordModalVisible(true)} disabled={changePasswordFetching} > Change password @@ -542,7 +542,9 @@ function HeaderComponent(props: Props): JSX.Element {
- {renderChangePasswordItem && switchChangePasswordDialog(false)} />} + {renderChangePasswordItem && ( + switchChangePasswordModalVisible(false)} /> + )} ); } diff --git a/cvat-ui/src/reducers/auth-reducer.ts b/cvat-ui/src/reducers/auth-reducer.ts index 7d9527f3d62c..a2f3c47ff260 100644 --- a/cvat-ui/src/reducers/auth-reducer.ts +++ b/cvat-ui/src/reducers/auth-reducer.ts @@ -99,10 +99,7 @@ export default function (state = defaultState, action: AuthActions | BoundariesA case AuthActionTypes.SWITCH_CHANGE_PASSWORD_DIALOG: return { ...state, - showChangePasswordDialog: - typeof action.payload.showChangePasswordDialog === 'undefined' ? - !state.showChangePasswordDialog : - action.payload.showChangePasswordDialog, + showChangePasswordDialog: action.payload.visible, }; case AuthActionTypes.REQUEST_PASSWORD_RESET: return { From e2331f13b057537f9482430c30c2d9f31f02c81b Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 12:08:52 +0300 Subject: [PATCH 13/18] Added scrooling --- cvat-ui/src/components/header/styles.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cvat-ui/src/components/header/styles.scss b/cvat-ui/src/components/header/styles.scss index e67fbd498e9a..c62fc35a207f 100644 --- a/cvat-ui/src/components/header/styles.scss +++ b/cvat-ui/src/components/header/styles.scss @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -@import '../../base.scss'; +@import '../../base'; .cvat-header.ant-layout-header { display: flex; @@ -94,3 +94,10 @@ .cvat-modal-organization-selector { width: 100%; } + +.cvat-shortcuts-modal-window-table { + .ant-table { + height: $grid-unit-size * 70; + overflow-y: auto; + } +} \ No newline at end of file From 7114538fc789329e498086bdc5c5b1dc7ea9c38b Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 12:10:50 +0300 Subject: [PATCH 14/18] height -> max height --- cvat-ui/src/components/header/styles.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat-ui/src/components/header/styles.scss b/cvat-ui/src/components/header/styles.scss index c62fc35a207f..8ccae584707f 100644 --- a/cvat-ui/src/components/header/styles.scss +++ b/cvat-ui/src/components/header/styles.scss @@ -97,7 +97,7 @@ .cvat-shortcuts-modal-window-table { .ant-table { - height: $grid-unit-size * 70; + max-height: $grid-unit-size * 70; overflow-y: auto; } } \ No newline at end of file From cd3db8e50e02251a41d043dd74d2bea820d0737d Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 12:56:13 +0300 Subject: [PATCH 15/18] Better focus handling when remove locked object/issue or changing workspace --- .../annotation-page/review/issue-dialog.tsx | 2 +- .../standard-workspace/remove-confirm.tsx | 3 +++ .../containers/annotation-page/top-bar/top-bar.tsx | 11 +++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx index edfb5b01a8bb..3b4d1954ab79 100644 --- a/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx +++ b/cvat-ui/src/components/annotation-page/review/issue-dialog.tsx @@ -93,8 +93,8 @@ export default function IssueDialog(props: Props): JSX.Element { }, okButtonProps: { type: 'primary', - danger: true, }, + autoFocusButton: 'cancel', okText: 'Delete', }); }, []); diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx index 9e76b0ce1697..c86d11c0266b 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/remove-confirm.tsx @@ -68,6 +68,9 @@ export default function RemoveConfirmComponent(): JSX.Element | null { cancelText='Cancel' title={title} visible={visible} + cancelButtonProps={{ + autoFocus: true, + }} onOk={onOk} onCancel={onCancel} destroyOnClose diff --git a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx index 067d85fe1ad0..a034f9799665 100644 --- a/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx +++ b/cvat-ui/src/containers/annotation-page/top-bar/top-bar.tsx @@ -528,6 +528,14 @@ class AnnotationTopBarContainer extends React.PureComponent { restoreFrame(frameNumber); }; + private changeWorkspace = (workspace: Workspace): void => { + const { changeWorkspace } = this.props; + changeWorkspace(workspace); + if (window.document.activeElement) { + (window.document.activeElement as HTMLElement).blur(); + } + }; + private beforeUnloadCallback = (event: BeforeUnloadEvent): string | undefined => { const { jobInstance, forceExit, setForceExitAnnotationFlag } = this.props; if (jobInstance.annotations.hasUnsavedChanges() && !forceExit) { @@ -645,7 +653,6 @@ class AnnotationTopBarContainer extends React.PureComponent { normalizedKeyMap, activeControl, searchAnnotations, - changeWorkspace, switchNavigationBlocked, toolsBlockerState, } = this.props; @@ -765,7 +772,7 @@ class AnnotationTopBarContainer extends React.PureComponent { onURLIconClick={this.onURLIconClick} onDeleteFrame={this.onDeleteFrame} onRestoreFrame={this.onRestoreFrame} - changeWorkspace={changeWorkspace} + changeWorkspace={this.changeWorkspace} switchNavigationBlocked={switchNavigationBlocked} workspace={workspace} playing={playing} From d9bf3fdec80521aa0956428c1030fd1b27f38d24 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 14:45:03 +0300 Subject: [PATCH 16/18] Update cvat-ui/src/components/header/styles.scss Co-authored-by: Kirill Lakhov --- cvat-ui/src/components/header/styles.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat-ui/src/components/header/styles.scss b/cvat-ui/src/components/header/styles.scss index 8ccae584707f..42f54ccc54cd 100644 --- a/cvat-ui/src/components/header/styles.scss +++ b/cvat-ui/src/components/header/styles.scss @@ -100,4 +100,4 @@ max-height: $grid-unit-size * 70; overflow-y: auto; } -} \ No newline at end of file +} From 8d3d5f6d900384956a3186f6ff0ee1cd12d43943 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 14:38:45 +0300 Subject: [PATCH 17/18] Auto focus comment field when create an issue --- .../components/annotation-page/review/create-issue-dialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx b/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx index b90f610c2016..48d90fd25ef6 100644 --- a/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx +++ b/cvat-ui/src/components/annotation-page/review/create-issue-dialog.tsx @@ -43,7 +43,7 @@ function MessageForm(props: FormProps): JSX.Element { name='issue_description' rules={[{ required: true, message: 'Please, fill out the field' }]} > - + From 2d25e5b757d10eb974cf8635f0904fcaa06fd17b Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 6 Sep 2023 15:54:59 +0300 Subject: [PATCH 18/18] Adjusted readme md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b0bca53e9b2..b5a2660f8fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Paddings on tasks/projects/models pages () - Hotkeys handlers triggered instead of default behaviour with focus when modal windows opened () -- Need to move a mouse to use brush/eraser, just click not enough () +- Need to move a mouse to get brush/eraser effect, just click not enough () - Memory leak in the logging system () - A race condition during initial `secret_key.py` creation ()