= () => {
- {!newEditor && }
+
{position !== null && (
diff --git a/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx b/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx
index 698204d89c..be02fdbe3c 100644
--- a/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx
+++ b/services/web/frontend/js/features/source-editor/components/full-project-search-button.tsx
@@ -12,6 +12,8 @@ import Close from '@/shared/components/close'
import useTutorial from '@/shared/hooks/promotions/use-tutorial'
import { useEditorContext } from '@/shared/context/editor-context'
import getMeta from '@/utils/meta'
+import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
+import { useRailContext } from '@/features/ide-redesign/contexts/rail-context'
const PROMOTION_SIGNUP_CUT_OFF_DATE = new Date('2025-04-22T00:00:00Z')
@@ -19,6 +21,8 @@ export const FullProjectSearchButton = ({ query }: { query: SearchQuery }) => {
const view = useCodeMirrorViewContext()
const { t } = useTranslation()
const { setProjectSearchIsOpen } = useLayoutContext()
+ const newEditor = useIsNewEditorEnabled()
+ const { openTab } = useRailContext()
const ref = useRef(null)
const { inactiveTutorials } = useEditorContext()
@@ -44,14 +48,18 @@ export const FullProjectSearchButton = ({ query }: { query: SearchQuery }) => {
}
const openFullProjectSearch = useCallback(() => {
- setProjectSearchIsOpen(true)
+ if (newEditor) {
+ openTab('full-project-search')
+ } else {
+ setProjectSearchIsOpen(true)
+ }
closeSearchPanel(view)
window.setTimeout(() => {
window.dispatchEvent(
new CustomEvent('editor:full-project-search', { detail: query })
)
}, 200)
- }, [setProjectSearchIsOpen, query, view])
+ }, [setProjectSearchIsOpen, query, view, newEditor, openTab])
const onClick = useCallback(() => {
sendSearchEvent('search-open', {
diff --git a/services/web/locales/en.json b/services/web/locales/en.json
index 445fb62c8b..2efd23fd9f 100644
--- a/services/web/locales/en.json
+++ b/services/web/locales/en.json
@@ -1708,6 +1708,7 @@
"project_ownership_transfer_confirmation_2": "This action cannot be undone. The new owner will be notified and will be able to change project access settings (including removing your own access).",
"project_renamed_or_deleted": "Project Renamed or Deleted",
"project_renamed_or_deleted_detail": "This project has either been renamed or deleted by an external data source such as Dropbox. We don’t want to delete your data on Overleaf, so this project still contains your history and collaborators. If the project has been renamed please look in your project list for a new project under the new name.",
+ "project_search": "Project search",
"project_search_file_count": "in __count__ file",
"project_search_file_count_plural": "in __count__ files",
"project_search_result_count": "__count__ result",