diff --git a/CHANGELOG.md b/CHANGELOG.md index d3c79bb34cba..b6e2c86867f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed - Outdated using of hostname when access git/opencv/analytics from UI () +- Feedback/share component () ### Fixed - Zooming canvas when scrooling comments list in an issue () diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 366cd8637fb3..9b70e8f3b05a 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.55.6", + "version": "1.55.7", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { @@ -32,7 +32,6 @@ "@types/react-redux": "^7.1.18", "@types/react-router": "^5.1.16", "@types/react-router-dom": "^5.1.9", - "@types/react-share": "^3.0.3", "@types/redux-logger": "^3.0.9", "@types/resize-observer-browser": "^0.1.6", "@uiw/react-md-editor": "^3.22.0", @@ -64,7 +63,6 @@ "react-redux": "^8.0.2", "react-router": "^5.1.0", "react-router-dom": "^5.1.0", - "react-share": "^4.4.0", "react-sortable-hoc": "^2.0.0", "redux": "^4.1.1", "redux-devtools-extension": "^2.13.9", diff --git a/cvat-ui/src/components/feedback/feedback.tsx b/cvat-ui/src/components/feedback/feedback.tsx deleted file mode 100644 index ae2fe70ca6c9..000000000000 --- a/cvat-ui/src/components/feedback/feedback.tsx +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2020-2022 Intel Corporation -// Copyright (C) 2022 CVAT.ai Corp -// -// SPDX-License-Identifier: MIT - -import './styles.scss'; -import React from 'react'; -import Button from 'antd/lib/button'; -import Popover from 'antd/lib/popover'; -import Text from 'antd/lib/typography/Text'; -import { - StarOutlined, LikeOutlined, CloseCircleOutlined, MessageOutlined, -} from '@ant-design/icons'; -import { - FacebookShareButton, - LinkedinShareButton, - TwitterShareButton, - TelegramShareButton, - WhatsappShareButton, - VKShareButton, - RedditShareButton, - ViberShareButton, - FacebookIcon, - TwitterIcon, - TelegramIcon, - WhatsappIcon, - VKIcon, - RedditIcon, - ViberIcon, - LinkedinIcon, -} from 'react-share'; - -import config from 'config'; - -function renderContent(): JSX.Element { - const { GITHUB_URL, GITHUB_IMAGE_URL, DISCORD_URL } = config; - - return ( - <> - - - Star us on - - {' '} - GitHub - - -
- - - Leave a - - {' '} - feedback - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
-
- - Do you need help? Contact us on - - {' '} - Discord - - - - ); -} - -export default function Feedback(): JSX.Element { - const [visible, setVisible] = React.useState(false); - - return ( - <> - Help to make CVAT better} - content={renderContent()} - visible={visible} - overlayClassName='cvat-feedback-popover' - > - - - - ); -} diff --git a/cvat-ui/src/components/feedback/styles.scss b/cvat-ui/src/components/feedback/styles.scss deleted file mode 100644 index 4547c086b0df..000000000000 --- a/cvat-ui/src/components/feedback/styles.scss +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (C) 2020-2022 Intel Corporation -// -// SPDX-License-Identifier: MIT - -.cvat-feedback-button { - position: fixed; - bottom: 20px; - right: 20px; - padding: 0; - height: auto; - - > span[role='img'] { - font-size: 40px; - } -} diff --git a/cvat-ui/src/components/jobs-page/jobs-page.tsx b/cvat-ui/src/components/jobs-page/jobs-page.tsx index 833a2be059e3..0a6dea86241e 100644 --- a/cvat-ui/src/components/jobs-page/jobs-page.tsx +++ b/cvat-ui/src/components/jobs-page/jobs-page.tsx @@ -12,7 +12,6 @@ import Pagination from 'antd/lib/pagination'; import Empty from 'antd/lib/empty'; import Text from 'antd/lib/typography/Text'; -import FeedbackComponent from 'components/feedback/feedback'; import { updateHistoryFromQuery } from 'components/resource-sorting-filtering'; import { CombinedState, Indexable } from 'reducers'; import { getJobsAsync } from 'actions/jobs-actions'; @@ -109,7 +108,6 @@ function JobsPageComponent(): JSX.Element { { fetching ? ( ) : content } - ); } diff --git a/cvat-ui/src/components/models-page/models-page.tsx b/cvat-ui/src/components/models-page/models-page.tsx index 8f9d0d9bbcaa..40159a8b5c4d 100644 --- a/cvat-ui/src/components/models-page/models-page.tsx +++ b/cvat-ui/src/components/models-page/models-page.tsx @@ -15,7 +15,6 @@ import notification from 'antd/lib/notification'; import { CombinedState, Indexable } from 'reducers'; import DeployedModelsList, { PAGE_SIZE } from './deployed-models-list'; import EmptyListComponent from './empty-list'; -import FeedbackComponent from '../feedback/feedback'; import TopBar from './top-bar'; function ModelsPageComponent(): JSX.Element { @@ -98,7 +97,6 @@ function ModelsPageComponent(): JSX.Element { ) : content } - ); } diff --git a/cvat-ui/src/components/projects-page/projects-page.tsx b/cvat-ui/src/components/projects-page/projects-page.tsx index cbb0cc291fd9..2390b646dbf3 100644 --- a/cvat-ui/src/components/projects-page/projects-page.tsx +++ b/cvat-ui/src/components/projects-page/projects-page.tsx @@ -10,7 +10,6 @@ import { useDispatch, useSelector } from 'react-redux'; import Spin from 'antd/lib/spin'; import { CombinedState, Indexable } from 'reducers'; import { getProjectsAsync } from 'actions/projects-actions'; -import FeedbackComponent from 'components/feedback/feedback'; import { updateHistoryFromQuery } from 'components/resource-sorting-filtering'; import EmptyListComponent from './empty-list'; import TopBarComponent from './top-bar'; @@ -89,7 +88,6 @@ export default function ProjectsPageComponent(): JSX.Element { ) : content } - ); } diff --git a/cvat-ui/src/components/tasks-page/tasks-page.tsx b/cvat-ui/src/components/tasks-page/tasks-page.tsx index 8796789350f9..d4c24336bf0c 100644 --- a/cvat-ui/src/components/tasks-page/tasks-page.tsx +++ b/cvat-ui/src/components/tasks-page/tasks-page.tsx @@ -12,7 +12,6 @@ import { Col, Row } from 'antd/lib/grid'; import Pagination from 'antd/lib/pagination'; import { TasksQuery, Indexable } from 'reducers'; -import FeedbackComponent from 'components/feedback/feedback'; import { updateHistoryFromQuery } from 'components/resource-sorting-filtering'; import TaskListContainer from 'containers/tasks-page/tasks-list'; import { getTasksAsync } from 'actions/tasks-actions'; @@ -122,7 +121,6 @@ function TasksPageComponent(props: Props): JSX.Element { ) : content } - ); } diff --git a/tests/cypress/e2e/actions_users/case_38_feedback_button.js b/tests/cypress/e2e/actions_users/case_38_feedback_button.js deleted file mode 100644 index 9005dd9b54b3..000000000000 --- a/tests/cypress/e2e/actions_users/case_38_feedback_button.js +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2020-2022 Intel Corporation -// Copyright (C) 2022 CVAT.ai Corporation -// -// SPDX-License-Identifier: MIT - -/// - -context('Check feedback button.', () => { - const caseId = '38'; - - before(() => { - cy.visit('auth/login'); - cy.login(); - }); - - describe(`Testing case "${caseId}"`, () => { - it('Feedback button is available.', () => { - cy.get('.cvat-feedback-button').should('be.visible').click(); - }); - - it('Feedback popover is available. Check content.', () => { - cy.get('.cvat-feedback-popover') - .should('be.visible') - .within(() => { - cy.get('a').then(($a) => { - expect($a.length).be.equal(3); - expect($a[0].href).be.eq('https://github.com/opencv/cvat'); - expect($a[1].href).be.eq('https://discord.gg/fNR3eXfk6C'); - expect($a[2].href).be.eq($a[1].href); - }); - const socialNetworkList = [ - 'facebook', - 'vk', - 'twitter', - 'reddit', - 'linkedin', - 'telegram', - 'whatsapp', - 'viber', - ]; - socialNetworkList.forEach(($el) => { - cy.get(`[aria-label=${$el}]`).should('be.visible'); - }); - }); - }); - }); -}); diff --git a/yarn.lock b/yarn.lock index bb7e7fb56638..4a7b8fd90b95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2163,13 +2163,6 @@ "@types/history" "^4.7.11" "@types/react" "*" -"@types/react-share@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/react-share/-/react-share-3.0.3.tgz#d75514902b0a3a77800b3bea0395f7add463b228" - integrity sha512-GpKAVNbwMBgad0995uVLkOdKWp3CjCrvIeUt4qZcsrgLtf7SMR7gIfMgC9X2rsfLgN6saT/nr2T4QLJE9cCZiA== - dependencies: - "@types/react" "*" - "@types/react@*", "@types/react@^16.14.15", "@types/react@^17.0.30": version "17.0.64" resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.64.tgz#468162c66c33ddb4548eb1a0e36682028d9e9a62" @@ -3508,7 +3501,7 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== -classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1, classnames@^2.3.2: +classnames@2.x, classnames@^2.2.1, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== @@ -4010,7 +4003,7 @@ custom-error-instance@2.1.1: three "^0.126.1" "cvat-canvas@link:./cvat-canvas": - version "2.17.3" + version "2.17.5" dependencies: "@types/fabric" "^4.5.7" "@types/polylabel" "^1.0.5" @@ -4023,7 +4016,7 @@ custom-error-instance@2.1.1: svg.select.js "3.0.1" "cvat-core@link:./cvat-core": - version "11.0.2" + version "11.0.3" dependencies: "@types/lodash" "^4.14.191" axios "^0.27.2" @@ -4069,7 +4062,7 @@ dayjs@1.x: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== -debug@2.6.9, debug@^2.1.3: +debug@2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -7028,13 +7021,6 @@ json5@^2.0.0, json5@^2.1.2, json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonp@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/jsonp/-/jsonp-0.2.1.tgz#a65b4fa0f10bda719a05441ea7b94c55f3e15bae" - integrity sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw== - dependencies: - debug "^2.1.3" - "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" @@ -10100,14 +10086,6 @@ react-router@5.3.4, react-router@^5.1.0: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-share@^4.4.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/react-share/-/react-share-4.4.1.tgz#4bfb0b512e26afedfea2fb66eb13c95c28fb216a" - integrity sha512-AJ9m9RiJssqvYg7MoJUc9J0D7b/liWrsfQ99ndKc5vJ4oVHHd4Fy87jBlKEQPibT40oYA3AQ/a9/oQY6/yaigw== - dependencies: - classnames "^2.3.2" - jsonp "^0.2.1" - react-sortable-hoc@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-2.0.0.tgz#f6780d8aa4b922a21f3e754af542f032677078b7"