From 297ed66899c8a8559aea146b853036d2d5bf1a49 Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Mon, 18 Aug 2025 09:54:21 +0100 Subject: [PATCH] Merge pull request #27684 from overleaf/dp-teardown-labs Cleanup editor-redesign labs experiment GitOrigin-RevId: 7697736f3bada8d205bab98c03ba96a99734311a --- .../web/frontend/extracted-translations.json | 18 -- .../try-new-editor-button.tsx | 6 - .../components/layout/main-layout.tsx | 2 - .../ide-react/components/modals/modals.tsx | 16 +- .../components/labs-user-beta-promo.tsx | 76 ------- .../ide-redesign/components/labs-widget.tsx | 32 --- .../components/switcher-modal/modal.tsx | 201 ------------------ .../components/toolbar/labs-actions.tsx | 40 ---- .../components/toolbar/toolbar.tsx | 5 +- .../ide-redesign/hooks/use-survey-url.tsx | 23 +- .../ide-redesign/utils/new-editor-utils.ts | 13 +- services/web/frontend/js/utils/labs-utils.ts | 2 +- .../stylesheets/abstracts/mixins.scss | 2 +- .../editor/ide-redesign-switcher-modal.scss | 8 - .../pages/editor/toolbar-redesign.scss | 6 +- .../stylesheets/pages/editor/toolbar.scss | 2 +- services/web/locales/en.json | 17 -- 17 files changed, 14 insertions(+), 455 deletions(-) delete mode 100644 services/web/frontend/js/features/ide-redesign/components/labs-user-beta-promo.tsx delete mode 100644 services/web/frontend/js/features/ide-redesign/components/labs-widget.tsx delete mode 100644 services/web/frontend/js/features/ide-redesign/components/switcher-modal/modal.tsx delete mode 100644 services/web/frontend/js/features/ide-redesign/components/toolbar/labs-actions.tsx diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index d9c23b7326..ee29392495 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -48,7 +48,6 @@ "access_denied": "", "access_edit_your_projects": "", "access_levels_changed": "", - "access_your_favourite_features_faster_with_our_new_streamlined_editor": "", "account_billed_manually": "", "account_has_been_link_to_institution_account": "", "account_has_past_due_invoice_change_plan_warning": "", @@ -448,7 +447,6 @@ "done": "", "dont_forget_you_currently_have": "", "dont_reload_or_close_this_tab": "", - "double_clicking_on_the_pdf_shows": "", "download": "", "download_all": "", "download_as_pdf": "", @@ -738,7 +736,6 @@ "help_editor_settings": "", "help_improve_overleaf_fill_out_this_survey": "", "help_improve_screen_reader_fill_out_this_survey": "", - "help_shape_the_future_of_overleaf": "", "hide": "", "hide_configuration": "", "hide_deleted_user": "", @@ -892,7 +889,6 @@ "it_looks_like_your_payment_details_are_missing_please_update_your_billing_information": "", "italics": "", "join": "", - "join_beta": "", "join_beta_program": "", "join_now": "", "join_overleaf_labs": "", @@ -911,7 +907,6 @@ "knowledge_base": "", "labels_help_you_to_easily_reference_your_figures": "", "labels_help_you_to_reference_your_tables": "", - "labs": "", "language": "", "language_suggestions": "", "large_or_high-resolution_images_taking_too_long": "", @@ -927,7 +922,6 @@ "last_used": "", "latam_discount_modal_info": "", "latam_discount_modal_title": "", - "latest_updates": "", "latex_in_thirty_minutes": "", "latex_places_figures_according_to_a_special_algorithm": "", "latex_places_tables_according_to_a_special_algorithm": "", @@ -1094,14 +1088,12 @@ "neither_agree_nor_disagree": "", "new_compile_domain_notice": "", "new_create_tables_and_equations": "", - "new_error_logs_panel": "", "new_file": "", "new_folder": "", "new_look_and_feel": "", "new_look_and_placement_of_the_settings": "", "new_name": "", "new_navigation_introducing_left_hand_side_rail_and_top_menus": "", - "new_overleaf_editor": "", "new_password": "", "new_project": "", "new_project_name": "", @@ -1533,7 +1525,6 @@ "search_whole_word": "", "search_within_selection": "", "searched_path_for_lines_containing": "", - "searching_all_project_files_is_now_available": "", "security": "", "see_suggestions_from_collaborators": "", "see_your_current_location_in_the_project": "", @@ -1782,14 +1773,12 @@ "thank_you": "", "thank_you_exclamation": "", "thank_you_for_your_feedback": "", - "thanks_for_being_part_of_this_labs_experiment_your_feedback_will_help_us_make_the_new_editor_the_best_yet": "", "thanks_for_confirming_your_email_address": "", "thanks_for_getting_in_touch": "", "thanks_for_subscribing": "", "thanks_for_subscribing_to_plan_with_add_on": "", "thanks_for_subscribing_to_the_add_on": "", "thanks_for_subscribing_you_help_sl": "", - "thanks_for_trying_the_new_editor": "", "thanks_settings_updated": "", "the_add_on_will_remain_active_until": "", "the_code_editor_color_scheme": "", @@ -1798,9 +1787,7 @@ "the_following_files_and_folders_already_exist_in_this_project": "", "the_following_folder_already_exists_in_this_project": "", "the_following_folder_already_exists_in_this_project_plural": "", - "the_labs_experiment_has_now_finished": "", "the_latex_engine_used_for_compiling": "", - "the_new_overleaf_editor": "", "the_new_overleaf_editor_try_now_in_beta": "", "the_next_payment_will_be_collected_on": "", "the_original_text_has_changed": "", @@ -1831,7 +1818,6 @@ "this_field_is_required": "", "this_grants_access_to_features_2": "", "this_is_a_beta_release_for_the_new_overleaf_editor": "", - "this_is_a_labs_experiment_for_the_new_overleaf_editor_some_features_are_still_in_progress": "", "this_is_a_new_feature": "", "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "", "this_project_already_has_maximum_collaborators": "", @@ -2114,7 +2100,6 @@ "well_be_here_when_youre_ready": "", "were_making_some_changes_to_project_sharing_this_means_you_will_be_visible": "", "were_performing_maintenance": "", - "were_redesigning_our_editor_to_make_it_easier_to_use": "", "were_reducing_compile_timeout": "", "weve_redesigned_our_editor_to_make_it_easier_to_use_and_future_ready": "", "what_did_you_find_most_helpful": "", @@ -2123,7 +2108,6 @@ "what_happens_when_sso_is_enabled": "", "what_should_we_call_you": "", "whats_different": "", - "whats_different_in_the_new_editor": "", "when_you_tick_the_include_caption_box": "", "why_might_this_happen": "", "why_not_pause_instead": "", @@ -2166,7 +2150,6 @@ "you_are_using_your_organization_email_x_would_like_you_to_take_action": "", "you_can_also_choose_to_view_anonymously_or_leave_the_project": "", "you_can_buy_this_plan_but_not_as_a_trial": "", - "you_can_leave_the_experiment_from_your_account_settings_at_any_time": "", "you_can_manage_your_reference_manager_integrations_from_your_account_settings_page": "", "you_can_now_enable_sso": "", "you_can_now_log_in_sso": "", @@ -2240,7 +2223,6 @@ "youre_about_to_enable_single_sign_on_sso_only": "", "youre_adding_x_licenses_to_your_plan_giving_you_a_total_of_y_licenses": "", "youre_already_setup_for_sso": "", - "youre_helping_us_shape_the_future_of_overleaf": "", "youre_joining": "", "youre_on_free_trial_which_ends_on": "", "youre_signed_in_as_logout": "", diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/try-new-editor-button.tsx b/services/web/frontend/js/features/editor-navigation-toolbar/try-new-editor-button.tsx index bb5b7c9187..5c27d16b58 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/try-new-editor-button.tsx +++ b/services/web/frontend/js/features/editor-navigation-toolbar/try-new-editor-button.tsx @@ -1,14 +1,11 @@ import { useCallback } from 'react' import OLButton from '../../shared/components/ol/ol-button' import { useIdeRedesignSwitcherContext } from '../ide-react/context/ide-redesign-switcher-context' -import MaterialIcon from '@/shared/components/material-icon' import { useTranslation } from 'react-i18next' -import { isNewEditorInBeta } from '../ide-redesign/utils/new-editor-utils' const TryNewEditorButton = () => { const { t } = useTranslation() const { setShowSwitcherModal } = useIdeRedesignSwitcherContext() - const newEditorBeta = isNewEditorInBeta() const onClick = useCallback(() => { setShowSwitcherModal(true) @@ -19,9 +16,6 @@ const TryNewEditorButton = () => { className="toolbar-experiment-button" onClick={onClick} size="sm" - leadingIcon={ - !newEditorBeta && - } variant="secondary" > {t('try_the_new_editor')} diff --git a/services/web/frontend/js/features/ide-react/components/layout/main-layout.tsx b/services/web/frontend/js/features/ide-react/components/layout/main-layout.tsx index ab92623ab0..93382d613a 100644 --- a/services/web/frontend/js/features/ide-react/components/layout/main-layout.tsx +++ b/services/web/frontend/js/features/ide-react/components/layout/main-layout.tsx @@ -16,7 +16,6 @@ import HistoryContainer from '@/features/ide-react/components/history-container' import getMeta from '@/utils/meta' import { useEditorContext } from '@/shared/context/editor-context' import importOverleafModules from '../../../../../macros/import-overleaf-module.macro' -import LabsUserBetaPromo from '@/features/ide-redesign/components/labs-user-beta-promo' const mainEditorLayoutModalsModules: Array<{ import: { default: ElementType } @@ -100,7 +99,6 @@ export const MainLayout: FC = () => { - diff --git a/services/web/frontend/js/features/ide-react/components/modals/modals.tsx b/services/web/frontend/js/features/ide-react/components/modals/modals.tsx index fe73e4eafb..0272331458 100644 --- a/services/web/frontend/js/features/ide-react/components/modals/modals.tsx +++ b/services/web/frontend/js/features/ide-react/components/modals/modals.tsx @@ -2,29 +2,19 @@ import { memo } from 'react' import ForceDisconnected from '@/features/ide-react/components/modals/force-disconnected' import { UnsavedDocs } from '@/features/ide-react/components/unsaved-docs/unsaved-docs' import SystemMessages from '@/shared/components/system-messages' -import { IdeRedesignSwitcherModal as IdeRedesignSwitcherModalLabs } from '@/features/ide-redesign/components/switcher-modal/modal' import { - IdeRedesignSwitcherModal as IdeRedesignSwitcherModalBeta, + IdeRedesignSwitcherModal, IdeRedesignIntroModal, } from '@/features/ide-redesign/components/switcher-modal/beta-modal' -import { isNewEditorInBeta } from '@/features/ide-redesign/utils/new-editor-utils' export const Modals = memo(() => { - const newEditorBeta = isNewEditorInBeta() - return ( <> - {newEditorBeta ? ( - <> - - - - ) : ( - - )} + + ) }) diff --git a/services/web/frontend/js/features/ide-redesign/components/labs-user-beta-promo.tsx b/services/web/frontend/js/features/ide-redesign/components/labs-user-beta-promo.tsx deleted file mode 100644 index 0e1de3c81c..0000000000 --- a/services/web/frontend/js/features/ide-redesign/components/labs-user-beta-promo.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import OLButton from '@/shared/components/ol/ol-button' -import MaterialIcon from '@/shared/components/material-icon' -import Notification from '@/shared/components/notification' -import { useEditorContext } from '@/shared/context/editor-context' -import useTutorial from '@/shared/hooks/promotions/use-tutorial' -import { useEffect } from 'react' -import { isNewEditorInBeta } from '../utils/new-editor-utils' -import { isInExperiment } from '@/utils/labs-utils' -import { useUserContext } from '@/shared/context/user-context' -import { useTranslation } from 'react-i18next' - -const TUTORIAL_KEY = 'ide-redesign-labs-user-beta-promo' - -export default function LabsUserBetaPromoWrapper() { - const user = useUserContext() - - // Show beta promo to labs users who are not in beta - // when the redesign switches to beta - if ( - isNewEditorInBeta() && - isInExperiment('editor-redesign') && - !user.betaProgram - ) { - return - } -} - -const LabsUserBetaPromo = () => { - const { inactiveTutorials } = useEditorContext() - const { showPopup, tryShowingPopup, dismissTutorial } = useTutorial( - TUTORIAL_KEY, - { name: TUTORIAL_KEY } - ) - - useEffect(() => { - if (!inactiveTutorials.includes(TUTORIAL_KEY)) { - tryShowingPopup() - } - }, [tryShowingPopup, inactiveTutorials]) - - if (!showPopup) { - return null - } - - return ( - } - type="success" - isDismissible - content={} - onDismiss={dismissTutorial} - /> - ) -} - -const NotificationContent = () => { - const { t } = useTranslation() - return ( - <> -
- {t('thanks_for_trying_the_new_editor')} -
-
{t('the_labs_experiment_has_now_finished')}
- - {t('join_beta')} - - - ) -} diff --git a/services/web/frontend/js/features/ide-redesign/components/labs-widget.tsx b/services/web/frontend/js/features/ide-redesign/components/labs-widget.tsx deleted file mode 100644 index 6b9cc657b5..0000000000 --- a/services/web/frontend/js/features/ide-redesign/components/labs-widget.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useState } from 'react' -import LabsExperimentWidget from '../../../shared/components/labs/labs-experiments-widget' -import { isInExperiment } from '@/utils/labs-utils' -import { useTranslation } from 'react-i18next' -import labsIcon from '../images/labs-icon.svg' - -const EditorRedesignLabsWidget = ({ - labsProgram, - setErrorMessage, -}: { - labsProgram: boolean - setErrorMessage: (err: string) => void -}) => { - const { t } = useTranslation() - const [optedIn, setOptedIn] = useState(isInExperiment('editor-redesign')) - return ( -