feat: implement Overleaf Code experiment with Python execution support

GitOrigin-RevId: 54ca98525b2ae056fb34b3713320e868b8c19613
This commit is contained in:
Domagoj Kriskovic
2026-03-09 09:05:39 +00:00
committed by Copybot
parent 138f7f8023
commit 3b17b0a46a
3 changed files with 60 additions and 2 deletions
@@ -10,6 +10,7 @@ import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
import SymbolPalettePane from '@/features/ide-react/components/editor/symbol-palette-pane'
import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-properties-context'
import { PythonEditorSplit } from '@/features/ide-react/components/layout/python-editor-split'
import { isInExperiment } from '@/utils/labs-utils'
export const Editor = () => {
const { opening, errorState, showSymbolPalette } =
@@ -19,6 +20,7 @@ export const Editor = () => {
const isPythonDocument =
openEntity?.type === 'doc' &&
openEntity.entity.name.toLowerCase().endsWith('.py')
const pythonExecutionEnabled = isInExperiment('overleaf-code')
if (!currentDocumentId) {
return null
@@ -43,7 +45,11 @@ export const Editor = () => {
order={1}
className="ide-redesign-editor-panel"
>
{isPythonDocument ? <PythonEditorSplit /> : <SourceEditor />}
{isPythonDocument && pythonExecutionEnabled ? (
<PythonEditorSplit />
) : (
<SourceEditor />
)}
{isLoading && <EditorLoadingPane />}
</Panel>
{showSymbolPalette && (