diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 85bb60584f..1c775af550 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -739,21 +739,6 @@ const ProjectController = { cb() }) }, - onboardingVideoTourAssignment(cb) { - SplitTestHandler.getAssignment( - req, - res, - 'onboarding-video-tour', - (error, assignment) => { - // do not fail editor load if assignment fails - if (error) { - cb(null, { variant: 'default' }) - } else { - cb(null, assignment) - } - } - ) - }, historyViewAssignment(cb) { SplitTestHandler.getAssignment( req, @@ -869,7 +854,6 @@ const ProjectController = { pdfjsAssignment, editorLeftMenuAssignment, richTextAssignment, - onboardingVideoTourAssignment, historyViewAssignment, reviewPanelAssignment, } @@ -987,12 +971,6 @@ const ProjectController = { !userIsMemberOfGroupSubscription && !userHasInstitutionLicence - const showOnboardingVideoTour = - Features.hasFeature('saas') && - userId && - onboardingVideoTourAssignment.variant === 'active' && - req.session.justRegistered - const showPersonalAccessToken = !Features.hasFeature('saas') || req.query?.personal_access_token === 'true' @@ -1086,7 +1064,6 @@ const ProjectController = { useOpenTelemetry: Settings.useOpenTelemetryClient, showCM6SwitchAwaySurvey: Settings.showCM6SwitchAwaySurvey, richTextVariant, - showOnboardingVideoTour, historyViewReact: historyViewAssignment.variant === 'react', isReviewPanelReact: reviewPanelAssignment.variant === 'react', showPersonalAccessToken, diff --git a/services/web/app/views/project/editor/main.pug b/services/web/app/views/project/editor/main.pug index fcaec91944..5a8f79db02 100644 --- a/services/web/app/views/project/editor/main.pug +++ b/services/web/app/views/project/editor/main.pug @@ -52,13 +52,3 @@ else .ui-layout-east aside.chat chat() - - if showOnboardingVideoTour - div( - ng-if="!state.loading" - ng-controller="OnboardingVideoTourModalController" - ) - onboarding-video-tour-modal( - close-modal="closeModal" - show="show" - ) diff --git a/services/web/app/views/project/editor/meta.pug b/services/web/app/views/project/editor/meta.pug index bd6410ae18..70b085c7ba 100644 --- a/services/web/app/views/project/editor/meta.pug +++ b/services/web/app/views/project/editor/meta.pug @@ -39,7 +39,6 @@ meta(name="ol-showSupport", data-type="boolean" content=showSupport) meta(name="ol-showTemplatesServerPro", data-type="boolean" content=showTemplatesServerPro) meta(name="ol-showCM6SwitchAwaySurvey", data-type="boolean" content=showCM6SwitchAwaySurvey) meta(name="ol-richTextVariant" content=richTextVariant) -meta(name="ol-showOnboardingVideoTour", data-type="boolean" content=showOnboardingVideoTour) meta(name="ol-showPersonalAccessToken", data-type="boolean" content=showPersonalAccessToken) meta(name="ol-isReviewPanelReact", data-type="boolean" content=isReviewPanelReact) if (richTextVariant === 'cm6') diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index a136decd21..7ddf995c85 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -246,8 +246,6 @@ "edit_dictionary_empty": "", "edit_dictionary_remove": "", "edit_figure": "", - "edit_in_source_to_see_your_entire_latex_code": "", - "edit_in_the_left_pane_click_recompile": "", "edit_tag": "", "editing": "", "editing_captions": "", @@ -611,7 +609,6 @@ "new_tag_name": "", "new_to_latex_look_at": "", "newsletter": "", - "next": "", "next_payment_of_x_collectected_on_y": "", "no_existing_password": "", "no_folder": "", @@ -1074,7 +1071,6 @@ "we_logged_you_in": "", "wed_love_you_to_stay": "", "welcome_to_sl": "", - "welcome_to_your_first_project": "", "when_you_tick_the_include_caption_box": "", "wide": "", "with_premium_subscription_you_also_get": "", diff --git a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-body.tsx b/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-body.tsx deleted file mode 100644 index a6e04e28d0..0000000000 --- a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-body.tsx +++ /dev/null @@ -1,65 +0,0 @@ -/* eslint-disable jsx-a11y/media-has-caption */ -import { useCallback, useRef } from 'react' -import { Modal } from 'react-bootstrap' -import { Trans } from 'react-i18next' -import type { OnboardingVideoStep } from '../utils/onboarding-video-step' - -type OnboardingVideoTourModalBodyProps = { - step: OnboardingVideoStep -} - -export default function OnboardingVideoTourModalBody({ - step, -}: OnboardingVideoTourModalBodyProps) { - const firstVideoRef = useRef(null) - const secondVideoRef = useRef(null) - - const handleCanPlayFirstVideo = useCallback(() => { - if (firstVideoRef.current) { - firstVideoRef.current.playbackRate = 1.5 - } - }, [firstVideoRef]) - - const handleCanPlaySecondVideo = useCallback(() => { - if (secondVideoRef.current) { - secondVideoRef.current.playbackRate = 3.0 - } - }, [secondVideoRef]) - - return ( - -

- {step === 'first' ? ( - ]} // eslint-disable-line react/jsx-key - /> - ) : ( - ]} // eslint-disable-line react/jsx-key - /> - )} -

- {step === 'first' ? ( -
- ) -} diff --git a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-footer.tsx b/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-footer.tsx deleted file mode 100644 index 13a7f006fe..0000000000 --- a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal-footer.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { - type Dispatch, - type RefObject, - type SetStateAction, - useCallback, -} from 'react' -import { Button, Modal } from 'react-bootstrap' -import { useTranslation } from 'react-i18next' -import type { Nullable } from '../../../../../types/utils' -import { sendMB } from '../../../infrastructure/event-tracking' -import customLocalStorage from '../../../infrastructure/local-storage' -import type { OnboardingVideoStep } from '../utils/onboarding-video-step' -import { calculateWatchingTimeInSecond } from '../utils/watching-time' - -type OnboardingVideoTourModalFooterProps = { - step: OnboardingVideoStep - setStep: Dispatch> - closeModal: () => void - startTimeWatchedFirstVideo: RefObject - startTimeWatchedSecondVideo: RefObject> -} - -export default function OnboardingVideoTourModalFooter({ - step, - setStep, - closeModal, - startTimeWatchedFirstVideo, - startTimeWatchedSecondVideo, -}: OnboardingVideoTourModalFooterProps) { - const { t } = useTranslation() - - const handleClickDismiss = useCallback(() => { - customLocalStorage.setItem( - 'has_dismissed_onboarding_video_tour_modal', - true - ) - - const { firstVideoWatchingTimeInSecond, secondVideoWatchingTimeInSecond } = - calculateWatchingTimeInSecond( - startTimeWatchedFirstVideo.current ?? 0, - startTimeWatchedSecondVideo.current - ) - - sendMB('onboarding-video-tour-dismiss-button-click', { - firstVideoWatchingTimeInSecond, - secondVideoWatchingTimeInSecond, - }) - - closeModal() - }, [closeModal, startTimeWatchedFirstVideo, startTimeWatchedSecondVideo]) - - const handleClickNext = useCallback(() => { - const { firstVideoWatchingTimeInSecond, secondVideoWatchingTimeInSecond } = - calculateWatchingTimeInSecond( - startTimeWatchedFirstVideo.current ?? 0, - startTimeWatchedSecondVideo.current - ) - - sendMB('onboarding-video-tour-next-button-click', { - firstVideoWatchingTimeInSecond, - secondVideoWatchingTimeInSecond, - }) - - setStep('second') - }, [setStep, startTimeWatchedFirstVideo, startTimeWatchedSecondVideo]) - - const handleClickDone = useCallback(() => { - customLocalStorage.setItem( - 'has_dismissed_onboarding_video_tour_modal', - true - ) - - const { firstVideoWatchingTimeInSecond, secondVideoWatchingTimeInSecond } = - calculateWatchingTimeInSecond( - startTimeWatchedFirstVideo.current ?? 0, - startTimeWatchedSecondVideo.current - ) - - sendMB('onboarding-video-tour-done-button-click', { - firstVideoWatchingTimeInSecond, - secondVideoWatchingTimeInSecond, - }) - - closeModal() - }, [closeModal, startTimeWatchedFirstVideo, startTimeWatchedSecondVideo]) - - return ( - - {step === 'first' ? ( - <> - - - - ) : ( - - )} - - ) -} diff --git a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal.tsx b/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal.tsx deleted file mode 100644 index d398cfef70..0000000000 --- a/services/web/frontend/js/features/onboarding/components/onboarding-video-tour-modal.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { memo, useCallback, useEffect, useRef, useState } from 'react' -import { Modal } from 'react-bootstrap' -import { useTranslation } from 'react-i18next' -import AccessibleModal from '../../../shared/components/accessible-modal' -import customLocalStorage from '../../../infrastructure/local-storage' -import { sendMB } from '../../../infrastructure/event-tracking' -import OnboardingVideoTourModalBody from './onboarding-video-tour-modal-body' -import type { OnboardingVideoStep } from '../utils/onboarding-video-step' -import OnboardingVideoTourModalFooter from './onboarding-video-tour-modal-footer' -import { calculateWatchingTimeInSecond } from '../utils/watching-time' -import type { Nullable } from '../../../../../types/utils' - -type OnboardingVideoTourModalProps = { - show: boolean - closeModal: () => void -} - -function OnboardingVideoTourModal({ - show, - closeModal, -}: OnboardingVideoTourModalProps) { - const { t } = useTranslation() - const [step, setStep] = useState('first') - - const startTimeWatchedFirstVideo = useRef(Date.now()) - const startTimeWatchedSecondVideo = useRef>(null) - - const handleClickCloseButton = useCallback(() => { - customLocalStorage.setItem( - 'has_dismissed_onboarding_video_tour_modal', - true - ) - - const { firstVideoWatchingTimeInSecond, secondVideoWatchingTimeInSecond } = - calculateWatchingTimeInSecond( - startTimeWatchedFirstVideo.current, - startTimeWatchedSecondVideo.current - ) - - sendMB('onboarding-video-tour-close-button-click', { - video: step, - firstVideoWatchingTimeInSecond, - secondVideoWatchingTimeInSecond, - }) - closeModal() - }, [closeModal, step]) - - useEffect(() => { - if (step === 'second') { - startTimeWatchedSecondVideo.current = Date.now() - } - }, [step]) - - return ( - - - {t('welcome_to_your_first_project')} - - - - - ) -} - -export default memo(OnboardingVideoTourModal) diff --git a/services/web/frontend/js/features/onboarding/controllers/onboarding-video-tour-modal-controller.js b/services/web/frontend/js/features/onboarding/controllers/onboarding-video-tour-modal-controller.js deleted file mode 100644 index f642aa7e66..0000000000 --- a/services/web/frontend/js/features/onboarding/controllers/onboarding-video-tour-modal-controller.js +++ /dev/null @@ -1,32 +0,0 @@ -import { react2angular } from 'react2angular' -import { rootContext } from '../../../../../frontend/js/shared/context/root-context' -import App from '../../../../../frontend/js/base' -import getMeta from '../../../utils/meta' -import OnboardingVideoTourModal from '../components/onboarding-video-tour-modal' - -export default App.controller( - 'OnboardingVideoTourModalController', - function ($scope, localStorage) { - const hasDismissedOnboardingVideoTourModal = localStorage( - 'has_dismissed_onboarding_video_tour_modal' - ) - const showOnboardingVideoTour = getMeta('ol-showOnboardingVideoTour') - - $scope.show = - !hasDismissedOnboardingVideoTourModal && showOnboardingVideoTour - - $scope.closeModal = () => { - $scope.$applyAsync(() => { - $scope.show = false - }) - } - } -) - -App.component( - 'onboardingVideoTourModal', - react2angular(rootContext.use(OnboardingVideoTourModal), [ - 'show', - 'closeModal', - ]) -) diff --git a/services/web/frontend/js/features/onboarding/utils/onboarding-video-step.ts b/services/web/frontend/js/features/onboarding/utils/onboarding-video-step.ts deleted file mode 100644 index 3546d6957e..0000000000 --- a/services/web/frontend/js/features/onboarding/utils/onboarding-video-step.ts +++ /dev/null @@ -1 +0,0 @@ -export type OnboardingVideoStep = 'first' | 'second' diff --git a/services/web/frontend/js/features/onboarding/utils/watching-time.ts b/services/web/frontend/js/features/onboarding/utils/watching-time.ts deleted file mode 100644 index 435ab67d3d..0000000000 --- a/services/web/frontend/js/features/onboarding/utils/watching-time.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { Nullable } from '../../../../../types/utils' - -export function calculateWatchingTimeInSecond( - startTimeWatchedFirstVideo: number, - startTimeWatchedSecondVideo: Nullable -) { - let firstVideoWatchingTimeInSecond = 0 - let secondVideoWatchingTimeInSecond = 0 - if (startTimeWatchedSecondVideo === null) { - firstVideoWatchingTimeInSecond = Math.floor( - (Date.now() - startTimeWatchedFirstVideo) / 1000 - ) - } else { - firstVideoWatchingTimeInSecond = Math.floor( - (startTimeWatchedSecondVideo - startTimeWatchedFirstVideo) / 1000 - ) - secondVideoWatchingTimeInSecond = Math.floor( - (Date.now() - startTimeWatchedSecondVideo) / 1000 - ) - } - - return { firstVideoWatchingTimeInSecond, secondVideoWatchingTimeInSecond } -} diff --git a/services/web/frontend/js/ide.js b/services/web/frontend/js/ide.js index e7ae4f51dd..77badf44a9 100644 --- a/services/web/frontend/js/ide.js +++ b/services/web/frontend/js/ide.js @@ -68,7 +68,6 @@ import './features/source-editor/controllers/cm6-switch-away-survey-controller' import './features/source-editor/controllers/grammarly-warning-controller' import './features/source-editor/controllers/legacy-editor-warning-controller' import './features/outline/controllers/documentation-button-controller' -import './features/onboarding/controllers/onboarding-video-tour-modal-controller' import './features/history/controllers/history-controller' import './features/history/controllers/history-file-tree-controller' import { cleanupServiceWorker } from './utils/service-worker-cleanup' diff --git a/services/web/locales/en.json b/services/web/locales/en.json index db227f31a6..72935816a1 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -411,8 +411,6 @@ "edit_dictionary_empty": "Your custom dictionary is empty.", "edit_dictionary_remove": "Remove from dictionary", "edit_figure": "Edit figure", - "edit_in_source_to_see_your_entire_latex_code": "Edit in <0>Source to see your entire LaTeX code, or choose <0>Rich Text for something more visual.", - "edit_in_the_left_pane_click_recompile": "Edit in the left pane. Click <0>Recompile to see the PDF output on the right.", "edit_tag": "Edit Tag", "editing": "Editing", "editing_captions": "Editing captions", @@ -1015,7 +1013,6 @@ "newsletter_info_summary": "Every few months we send a newsletter out summarizing the new features available.", "newsletter_info_title": "Newsletter Preferences", "newsletter_info_unsubscribed": "You are currently <0>unsubscribed to the __appName__ newsletter.", - "next": "Next", "next_payment_of_x_collectected_on_y": "The next payment of <0>__paymentAmmount__ will be collected on <1>__collectionDate__.", "nl": "Dutch", "no": "Norwegian", @@ -1760,7 +1757,6 @@ "website_status": "Website status", "wed_love_you_to_stay": "We’d love you to stay", "welcome_to_sl": "Welcome to __appName__!", - "welcome_to_your_first_project": "Welcome to your first __appName__ project!", "when_you_tick_the_include_caption_box": "When you tick the box “Include caption” the image will be inserted into your document with a placeholder caption. To edit it, you simply select the placeholder text and type to replace it with your own.", "wide": "Wide", "will_need_to_log_out_from_and_in_with": "You will need to log out from your __email1__ account and then log in with __email2__.",