From b7f534485992877c4566af3d4b45e0ec3af041d3 Mon Sep 17 00:00:00 2001 From: Davinder Singh Date: Tue, 24 Feb 2026 11:09:22 +0000 Subject: [PATCH] Tearing down of old Editor (Integrations panel) and other files (#31701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * moving files from ide-redesign/components/editor-tour to features/editor-tour moving files from ide-redesign/components/integrations-panel to features/integrations-panel fixing imports Revert "moving files from ide-redesign/components/editor-tour to features/editor-tour" This reverts commit 9e4dcd4e001ffa4bfdb1053fb8824c1e8521ab10. * moving files from ide-redesign/components/help -> ide-react/components/rail * ide-redesign/components/breadcrumbs → features/source-editor/extensions * ide-redesign/components/editor.tsx → ide-react/components/layout * ide-redesign/components/full-project-search-panel.tsx → ide-react/components/rail/full-project-search-panel.tsx * removing old-editor-warning-tooltip * ide-redesign/components/tooltip-promo.tsx → shared/components/tooltip-promo.tsx make cleanup_unused_locales * extract-translations GitOrigin-RevId: b9f44c4820bb4e0a7eef4f6f9a58ff96fd007bf9 --- .../Features/Tutorial/TutorialController.mjs | 2 - .../web/frontend/extracted-translations.json | 3 - .../components/editor/editor-panel.tsx | 2 +- .../components/layout}/editor.tsx | 0 .../components/rail}/contact-us.tsx | 2 +- .../rail}/full-project-search-panel.tsx | 2 +- .../components/rail}/keyboard-shortcuts.tsx | 0 .../ide-react/components/rail/rail-modals.tsx | 4 +- .../ide-react/components/rail/rail.tsx | 4 +- .../components/old-editor-warning-tooltip.tsx | 81 ------------------- .../integrations-panel/integration-card.tsx | 0 .../integrations-panel/integrations-panel.tsx | 2 +- .../components/codemirror-toolbar.tsx | 2 +- .../extensions}/breadcrumbs.tsx | 0 .../components/tooltip-promo.tsx | 0 .../web/frontend/stylesheets/pages/all.scss | 1 - .../editor/old-editor-warning-tooltip.scss | 15 ---- services/web/knip.ts | 2 +- services/web/locales/en.json | 3 - 19 files changed, 10 insertions(+), 115 deletions(-) rename services/web/frontend/js/features/{ide-redesign/components => ide-react/components/layout}/editor.tsx (100%) rename services/web/frontend/js/features/{ide-redesign/components/help => ide-react/components/rail}/contact-us.tsx (92%) rename services/web/frontend/js/features/{ide-redesign/components => ide-react/components/rail}/full-project-search-panel.tsx (83%) rename services/web/frontend/js/features/{ide-redesign/components/help => ide-react/components/rail}/keyboard-shortcuts.tsx (100%) delete mode 100644 services/web/frontend/js/features/ide-redesign/components/old-editor-warning-tooltip.tsx rename services/web/frontend/js/features/{ide-redesign/components => }/integrations-panel/integration-card.tsx (100%) rename services/web/frontend/js/features/{ide-redesign/components => }/integrations-panel/integrations-panel.tsx (88%) rename services/web/frontend/js/features/{ide-redesign/components => source-editor/extensions}/breadcrumbs.tsx (100%) rename services/web/frontend/js/{features/ide-redesign => shared}/components/tooltip-promo.tsx (100%) delete mode 100644 services/web/frontend/stylesheets/pages/editor/old-editor-warning-tooltip.scss diff --git a/services/web/app/src/Features/Tutorial/TutorialController.mjs b/services/web/app/src/Features/Tutorial/TutorialController.mjs index 3a0ac46b16..e7e762ec80 100644 --- a/services/web/app/src/Features/Tutorial/TutorialController.mjs +++ b/services/web/app/src/Features/Tutorial/TutorialController.mjs @@ -28,8 +28,6 @@ const VALID_KEYS = [ 'new-editor-opt-in', 'new-editor-intro', 'new-editor-intro-2', - 'old-editor-warning-tooltip', - 'old-editor-warning-tooltip-2', 'workbench-rail-popover', 'themed-dashboard-intro', ] diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 5a2f054a65..acc0d8e13f 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -1817,7 +1817,6 @@ "suggested_fix_for_error_in_path": "", "suggestion_applied": "", "suggests_code_completions_while_typing": "", - "support_for_the_old_editor_is_ending_soon": "", "support_for_your_browser_is_ending_soon": "", "supporting_your_research_respecting_your_privacy": "", "supports_up_to_x_licenses": "", @@ -1829,7 +1828,6 @@ "switch_compile_mode_for_faster_draft_compilation": "", "switch_easily_between_your_files_comments_track_changes_and_more": "", "switch_to_editor": "", - "switch_to_new_editor_design": "", "switch_to_pdf": "", "switch_to_standard_plan": "", "symbol": "", @@ -2200,7 +2198,6 @@ "we_do_not_share_personal_information": "", "we_got_your_request": "", "we_logged_you_in": "", - "we_recommend_switching_to_the_new_editor_design_now_so_you_have_time_to_get_to_know_it": "", "we_sent_code": "", "we_sent_new_code": "", "we_will_charge_you_now_for_the_cost_of_your_additional_licenses_based_on_remaining_months": "", diff --git a/services/web/frontend/js/features/ide-react/components/editor/editor-panel.tsx b/services/web/frontend/js/features/ide-react/components/editor/editor-panel.tsx index d5d8fca318..55037d070c 100644 --- a/services/web/frontend/js/features/ide-react/components/editor/editor-panel.tsx +++ b/services/web/frontend/js/features/ide-react/components/editor/editor-panel.tsx @@ -1,5 +1,5 @@ import NoSelectionPane from '@/features/ide-react/components/editor/no-selection-pane' -import { Editor } from '@/features/ide-redesign/components/editor' +import { Editor } from '@/features/ide-react/components/layout/editor' import { useFileTreeOpenContext } from '@/features/ide-react/context/file-tree-open-context' import FileView from '@/features/file-view/components/file-view' import { fileViewFile } from '@/features/ide-react/util/file-view' diff --git a/services/web/frontend/js/features/ide-redesign/components/editor.tsx b/services/web/frontend/js/features/ide-react/components/layout/editor.tsx similarity index 100% rename from services/web/frontend/js/features/ide-redesign/components/editor.tsx rename to services/web/frontend/js/features/ide-react/components/layout/editor.tsx diff --git a/services/web/frontend/js/features/ide-redesign/components/help/contact-us.tsx b/services/web/frontend/js/features/ide-react/components/rail/contact-us.tsx similarity index 92% rename from services/web/frontend/js/features/ide-redesign/components/help/contact-us.tsx rename to services/web/frontend/js/features/ide-react/components/rail/contact-us.tsx index ca7b7d1d0e..c90524f670 100644 --- a/services/web/frontend/js/features/ide-redesign/components/help/contact-us.tsx +++ b/services/web/frontend/js/features/ide-react/components/rail/contact-us.tsx @@ -1,6 +1,6 @@ import { FC, JSXElementConstructor, useCallback } from 'react' import importOverleafModules from '../../../../../macros/import-overleaf-module.macro' -import { useRailContext } from '../../../ide-react/context/rail-context' +import { useRailContext } from '../../context/rail-context' import getMeta from '@/utils/meta' const [contactUsModalModules] = importOverleafModules('contactUsModal') diff --git a/services/web/frontend/js/features/ide-redesign/components/full-project-search-panel.tsx b/services/web/frontend/js/features/ide-react/components/rail/full-project-search-panel.tsx similarity index 83% rename from services/web/frontend/js/features/ide-redesign/components/full-project-search-panel.tsx rename to services/web/frontend/js/features/ide-react/components/rail/full-project-search-panel.tsx index 926341ce89..9a5daa17a2 100644 --- a/services/web/frontend/js/features/ide-redesign/components/full-project-search-panel.tsx +++ b/services/web/frontend/js/features/ide-react/components/rail/full-project-search-panel.tsx @@ -1,5 +1,5 @@ import { ElementType } from 'react' -import importOverleafModules from '../../../../macros/import-overleaf-module.macro' +import importOverleafModules from '../../../../../macros/import-overleaf-module.macro' const componentModule = importOverleafModules('fullProjectSearchPanel')[0] as | { diff --git a/services/web/frontend/js/features/ide-redesign/components/help/keyboard-shortcuts.tsx b/services/web/frontend/js/features/ide-react/components/rail/keyboard-shortcuts.tsx similarity index 100% rename from services/web/frontend/js/features/ide-redesign/components/help/keyboard-shortcuts.tsx rename to services/web/frontend/js/features/ide-react/components/rail/keyboard-shortcuts.tsx diff --git a/services/web/frontend/js/features/ide-react/components/rail/rail-modals.tsx b/services/web/frontend/js/features/ide-react/components/rail/rail-modals.tsx index 0c870bc0c1..9fc5539b35 100644 --- a/services/web/frontend/js/features/ide-react/components/rail/rail-modals.tsx +++ b/services/web/frontend/js/features/ide-react/components/rail/rail-modals.tsx @@ -3,8 +3,8 @@ import { RailModalKey, useRailContext, } from '@/features/ide-react/context/rail-context' -import { RailHelpContactUsModal } from '@/features/ide-redesign/components/help/contact-us' -import { RailHelpShowHotkeysModal } from '@/features/ide-redesign/components/help/keyboard-shortcuts' +import { RailHelpContactUsModal } from './contact-us' +import { RailHelpShowHotkeysModal } from './keyboard-shortcuts' import DictionarySettingsModal from '@/features/settings/components/editor-settings/dictionary-settings-modal' const RAIL_MODALS: { diff --git a/services/web/frontend/js/features/ide-react/components/rail/rail.tsx b/services/web/frontend/js/features/ide-react/components/rail/rail.tsx index 64598c75e2..36d6adf69d 100644 --- a/services/web/frontend/js/features/ide-react/components/rail/rail.tsx +++ b/services/web/frontend/js/features/ide-react/components/rail/rail.tsx @@ -11,13 +11,13 @@ import ChatPane from '@/features/chat/components/chat-pane' import ChatIndicator from '@/features/chat/components/chat-indicator' import getMeta from '@/utils/meta' import classNames from 'classnames' -import IntegrationsPanel from '@/features/ide-redesign/components/integrations-panel/integrations-panel' +import IntegrationsPanel from '@/features/integrations-panel/integrations-panel' import { useChatContext } from '@/features/chat/context/chat-context' import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics' import { FullProjectSearchPanel, hasFullProjectSearch, -} from '@/features/ide-redesign/components/full-project-search-panel' +} from '@/features/ide-react/components/rail/full-project-search-panel' import { sendSearchEvent } from '@/features/event-tracking/search-events' import { useProjectContext } from '@/shared/context/project-context' import { useCommandProvider } from '@/features/ide-react/hooks/use-command-provider' diff --git a/services/web/frontend/js/features/ide-redesign/components/old-editor-warning-tooltip.tsx b/services/web/frontend/js/features/ide-redesign/components/old-editor-warning-tooltip.tsx deleted file mode 100644 index a317d60207..0000000000 --- a/services/web/frontend/js/features/ide-redesign/components/old-editor-warning-tooltip.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { Overlay, Popover } from 'react-bootstrap' -import Close from '@/shared/components/close' -import OLButton from '@/shared/components/ol/ol-button' -import { useTranslation } from 'react-i18next' -import useTutorial from '@/shared/hooks/promotions/use-tutorial' -import { useCallback, useEffect, useState } from 'react' -import { useSwitchEnableNewEditorState } from '../hooks/use-switch-enable-new-editor-state' -import { canUseNewEditor } from '../utils/new-editor-utils' - -const TUTORIAL_KEY = 'old-editor-warning-tooltip-2' - -export default function OldEditorWarningTooltip({ - target, -}: { - target: HTMLElement | null -}) { - const { t } = useTranslation() - const { loading, setEditorRedesignStatus } = useSwitchEnableNewEditorState() - - const { - tryShowingPopup, - showPopup, - dismissTutorial, - completeTutorial, - clearPopup, - checkCompletion, - } = useTutorial(TUTORIAL_KEY, { - name: TUTORIAL_KEY, - }) - const [hasShown, setHasShown] = useState(false) - const canShow = canUseNewEditor() - - useEffect(() => { - if (canShow && !hasShown && !checkCompletion()) { - tryShowingPopup('notification-prompt') - setHasShown(true) - } - }, [tryShowingPopup, checkCompletion, hasShown, canShow]) - - const onSwitch = useCallback(() => { - completeTutorial({ event: 'notification-click', action: 'complete' }) - setEditorRedesignStatus(true) - }, [setEditorRedesignStatus, completeTutorial]) - - const closePopup = useCallback(() => { - dismissTutorial('notification-dismiss') - clearPopup() - }, [dismissTutorial, clearPopup]) - - if (!showPopup) { - return null - } - - return ( - - - - {t('support_for_the_old_editor_is_ending_soon')} - - - -
- {t( - 'we_recommend_switching_to_the_new_editor_design_now_so_you_have_time_to_get_to_know_it' - )} -
- - {t('switch_to_new_editor_design')} - -
-
-
- ) -} diff --git a/services/web/frontend/js/features/ide-redesign/components/integrations-panel/integration-card.tsx b/services/web/frontend/js/features/integrations-panel/integration-card.tsx similarity index 100% rename from services/web/frontend/js/features/ide-redesign/components/integrations-panel/integration-card.tsx rename to services/web/frontend/js/features/integrations-panel/integration-card.tsx diff --git a/services/web/frontend/js/features/ide-redesign/components/integrations-panel/integrations-panel.tsx b/services/web/frontend/js/features/integrations-panel/integrations-panel.tsx similarity index 88% rename from services/web/frontend/js/features/ide-redesign/components/integrations-panel/integrations-panel.tsx rename to services/web/frontend/js/features/integrations-panel/integrations-panel.tsx index f0af44dd7c..e4d8dc153e 100644 --- a/services/web/frontend/js/features/ide-redesign/components/integrations-panel/integrations-panel.tsx +++ b/services/web/frontend/js/features/integrations-panel/integrations-panel.tsx @@ -1,5 +1,5 @@ import { ElementType } from 'react' -import importOverleafModules from '../../../../../macros/import-overleaf-module.macro' +import importOverleafModules from '../../../macros/import-overleaf-module.macro' import { useTranslation } from 'react-i18next' import RailPanelHeader from '@/features/ide-react/components/rail/rail-panel-header' diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx index 0b8b8caa31..f1b9b98329 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx @@ -30,7 +30,7 @@ import { ToggleSearchButton } from '@/features/source-editor/components/toolbar/ import ReviewPanelHeader from '@/features/review-panel/components/review-panel-header' import useReviewPanelLayout from '@/features/review-panel/hooks/use-review-panel-layout' import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils' -import Breadcrumbs from '@/features/ide-redesign/components/breadcrumbs' +import Breadcrumbs from '@/features/source-editor/extensions/breadcrumbs' import classNames from 'classnames' import { useUserSettingsContext } from '@/shared/context/user-settings-context' import { useFeatureFlag } from '@/shared/context/split-test-context' diff --git a/services/web/frontend/js/features/ide-redesign/components/breadcrumbs.tsx b/services/web/frontend/js/features/source-editor/extensions/breadcrumbs.tsx similarity index 100% rename from services/web/frontend/js/features/ide-redesign/components/breadcrumbs.tsx rename to services/web/frontend/js/features/source-editor/extensions/breadcrumbs.tsx diff --git a/services/web/frontend/js/features/ide-redesign/components/tooltip-promo.tsx b/services/web/frontend/js/shared/components/tooltip-promo.tsx similarity index 100% rename from services/web/frontend/js/features/ide-redesign/components/tooltip-promo.tsx rename to services/web/frontend/js/shared/components/tooltip-promo.tsx diff --git a/services/web/frontend/stylesheets/pages/all.scss b/services/web/frontend/stylesheets/pages/all.scss index cda46b222c..4c90da2618 100644 --- a/services/web/frontend/stylesheets/pages/all.scss +++ b/services/web/frontend/stylesheets/pages/all.scss @@ -37,7 +37,6 @@ @import 'editor/editor-survey'; @import 'editor/editor-tour-tooltip'; @import 'editor/new-editor-promo-modal'; -@import 'editor/old-editor-warning-tooltip'; @import 'error-pages'; @import 'website-redesign'; @import 'group-settings'; diff --git a/services/web/frontend/stylesheets/pages/editor/old-editor-warning-tooltip.scss b/services/web/frontend/stylesheets/pages/editor/old-editor-warning-tooltip.scss deleted file mode 100644 index 5bf00f4a64..0000000000 --- a/services/web/frontend/stylesheets/pages/editor/old-editor-warning-tooltip.scss +++ /dev/null @@ -1,15 +0,0 @@ -.old-editor-warning-tooltip { - .popover-header { - display: flex; - } - - .popover-body { - display: flex; - flex-direction: column; - gap: var(--spacing-06); - } -} - -.old-editor-warning-tooltip-switch-button { - align-self: flex-end; -} diff --git a/services/web/knip.ts b/services/web/knip.ts index 00dfe3443f..67ea064a2f 100644 --- a/services/web/knip.ts +++ b/services/web/knip.ts @@ -55,7 +55,7 @@ const knipConfig: KnipConfig = { // to work out a way to do that (@knipignore only works for // individual exports rather than whole files) 'frontend/js/shared/components/labs/labs-experiments-widget.tsx', - 'frontend/js/features/ide-redesign/components/tooltip-promo.tsx', + 'frontend/js/shared/components/tooltip-promo.tsx', ], ignoreExportsUsedInFile: true, ignoreBinaries: ['.*'], diff --git a/services/web/locales/en.json b/services/web/locales/en.json index da4c9a3c23..30569e8058 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -2318,7 +2318,6 @@ "suggestion_applied": "Suggestion applied", "suggests_code_completions_while_typing": "Suggests code completions while typing", "support": "Support", - "support_for_the_old_editor_is_ending_soon": "Support for the old editor is ending soon", "support_for_your_browser_is_ending_soon": "Support for your browser is ending soon", "supporting_your_research_respecting_your_privacy": "Supporting your research, respecting your privacy", "supports_up_to_x_licenses": "Supports up to <0>__count__ licenses", @@ -2331,7 +2330,6 @@ "switch_compile_mode_for_faster_draft_compilation": "Switch compile mode for faster draft compilation", "switch_easily_between_your_files_comments_track_changes_and_more": "Switch easily between your files, comments, track changes, and more in the new left-hand menu.", "switch_to_editor": "Switch to editor", - "switch_to_new_editor_design": "Switch to new editor design", "switch_to_pdf": "Switch to PDF", "switch_to_standard_plan": "Switch to Standard plan", "symbol": "Symbol", @@ -2756,7 +2754,6 @@ "we_got_your_request": "We’ve got your request", "we_logged_you_in": "We have logged you in.", "we_may_also_contact_you_from_time_to_time_by_email_with_a_survey": "<0>We may also contact you from time to time by email with a survey, or to see if you would like to participate in other user research initiatives", - "we_recommend_switching_to_the_new_editor_design_now_so_you_have_time_to_get_to_know_it": "We recommend switching to the new editor design now, so you have time to get to know it.", "we_sent_code": "We’ve sent you a confirmation code", "we_sent_new_code": "We’ve sent a new code. If it doesn’t arrive, make sure to check your spam and any promotions folders.", "we_will_charge_you_now_for_the_cost_of_your_additional_licenses_based_on_remaining_months": "We’ll charge you now for the cost of your additional licenses based on the remaining months of your current subscription.",