diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index d0f53c3265..2d85ca40ce 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -647,21 +647,6 @@ const ProjectController = { } ) }, - editorDocumentationButton(cb) { - SplitTestHandler.getAssignment( - req, - res, - 'documentation-on-editor', - (error, assignment) => { - // do not fail editor load if assignment fails - if (error) { - cb(null, { variant: 'default' }) - } else { - cb(null, assignment) - } - } - ) - }, // this is only needed until the survey link is removed from the toolbar richTextAssignment(cb) { SplitTestHandler.getAssignment( diff --git a/services/web/frontend/js/features/outline/components/documentation-button.tsx b/services/web/frontend/js/features/outline/components/documentation-button.tsx deleted file mode 100644 index 7c753a506c..0000000000 --- a/services/web/frontend/js/features/outline/components/documentation-button.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { useState } from 'react' -import Icon from '../../../shared/components/icon' -import { useSplitTestContext } from '../../../shared/context/split-test-context' -import { sendMB } from '../../../infrastructure/event-tracking' -import PropTypes from 'prop-types' -import { Button } from 'react-bootstrap' - -function DocumentationButton() { - const { splitTestVariants } = useSplitTestContext({ - splitTestVariants: PropTypes.object, - }) - const documentationButtonVariant = - splitTestVariants['documentation-on-editor'] - - let documentationButtonText = '' - - if (documentationButtonVariant === 'latex-help') - documentationButtonText = 'LaTeX help' - else if (documentationButtonVariant === 'documentation') - documentationButtonText = 'Documentation' - else if (documentationButtonVariant === 'help-guides') - documentationButtonText = 'Help guides' - const [showDocumentationButton, setShowDocumentationButton] = useState( - !(documentationButtonVariant === 'default') - ) - - function handleCloseClick() { - sendMB('file-tree-documentation-click') - - setShowDocumentationButton(false) - } - - function handleDocumentationLinkClick() { - sendMB('file-tree-documentation-click') - } - - if (!showDocumentationButton) return null - - return ( -
- ) -} - -export default DocumentationButton diff --git a/services/web/frontend/js/features/outline/controllers/documentation-button-controller.js b/services/web/frontend/js/features/outline/controllers/documentation-button-controller.js deleted file mode 100644 index da391281bd..0000000000 --- a/services/web/frontend/js/features/outline/controllers/documentation-button-controller.js +++ /dev/null @@ -1,9 +0,0 @@ -import { react2angular } from 'react2angular' -import DocumentationButton from '../components/documentation-button' -import { rootContext } from '../../../../../frontend/js/shared/context/root-context' -import App from '../../../../../frontend/js/base' - -App.component( - 'documentationButton', - react2angular(rootContext.use(DocumentationButton), []) -) diff --git a/services/web/frontend/js/ide.js b/services/web/frontend/js/ide.js index 91c4b74cdb..19d114a7bd 100644 --- a/services/web/frontend/js/ide.js +++ b/services/web/frontend/js/ide.js @@ -66,7 +66,6 @@ import './features/share-project-modal/controllers/react-share-project-modal-con import './features/source-editor/controllers/editor-switch-controller' import './features/source-editor/controllers/cm6-switch-away-survey-controller' import './features/source-editor/controllers/legacy-editor-warning-controller' -import './features/outline/controllers/documentation-button-controller' import './features/history/controllers/history-controller' import './features/history/controllers/history-file-tree-controller' import { cleanupServiceWorker } from './utils/service-worker-cleanup'