From ee65bb26cb9a65f6023996e98c862bcb43a6918c Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Mon, 28 Apr 2025 13:27:54 +0100 Subject: [PATCH] Merge pull request #25119 from overleaf/mj-ide-hide-project-search [web] Hide full project search button in new editor GitOrigin-RevId: badbed06ab311f63e18a3687771d209e7c853d42 --- .../source-editor/components/codemirror-search-form.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx index 21825ee25d..938972c6b8 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-search-form.tsx @@ -30,6 +30,7 @@ import { getStoredSelection, setStoredSelection } from '../extensions/search' import { debounce } from 'lodash' import { EditorSelection, EditorState } from '@codemirror/state' import { sendSearchEvent } from '@/features/event-tracking/search-events' +import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils' const MATCH_COUNT_DEBOUNCE_WAIT = 100 // the amount of ms to wait before counting matches const MAX_MATCH_COUNT = 999 // the maximum number of matches to count @@ -75,6 +76,8 @@ const CodeMirrorSearchForm: FC = () => { const inputRef = useRef(null) const replaceRef = useRef(null) + const newEditor = useIsNewEditorEnabled() + const handleInputRef = useCallback(node => { inputRef.current = node @@ -437,7 +440,7 @@ const CodeMirrorSearchForm: FC = () => { - {isSplitTestEnabled('full-project-search') ? ( + {!newEditor && isSplitTestEnabled('full-project-search') ? (