Merge pull request #25119 from overleaf/mj-ide-hide-project-search

[web] Hide full project search button in new editor

GitOrigin-RevId: badbed06ab311f63e18a3687771d209e7c853d42
This commit is contained in:
Mathias Jakobsen
2025-04-28 13:27:54 +01:00
committed by Copybot
parent a46fef3ec0
commit ee65bb26cb

View File

@@ -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<HTMLInputElement | null>(null)
const replaceRef = useRef<HTMLInputElement | null>(null)
const newEditor = useIsNewEditorEnabled()
const handleInputRef = useCallback(node => {
inputRef.current = node
@@ -437,7 +440,7 @@ const CodeMirrorSearchForm: FC = () => {
</OLButton>
</OLButtonGroup>
{isSplitTestEnabled('full-project-search') ? (
{!newEditor && isSplitTestEnabled('full-project-search') ? (
<OLTooltip
id="open-full-project-search"
description={t('search_all_project_files')}