Mahdi Naser Moghadasi commited on
Commit ·
323d95b
1
Parent(s): 3dcfed4
Fix desktop Monaco Editor sizing: use 100% height and proper container layout
Browse files- Changed Monaco Editor height from fixed pixels to 100% to fill container
- Added flex container styling for desktop to ensure proper layout
- Added CSS to ensure Monaco Editor and scrollable element fill container height
- Added layout() call in onMount to force proper sizing
- This should fix the issue where typing area is smaller than editor layout
162 unmodified lines163164165166167168169170171172173174175176177162 unmodified lines/></div>) : (<div className="h-full w-full [&_.monaco-editor_.scroll-decoration]:hidden"><MonacoEditorheight={editorHeight.toString()}defaultLanguage="python"value={code || ''}onChange={onChange}theme="vs-dark"onMount={(editor) => {editorRef.current = editor}}options={{fontSize: 14,162 unmodified lines163164165166167168169170171172173174175176177178179180181162 unmodified lines/></div>) : (<div className="h-full w-full [&_.monaco-editor_.scroll-decoration]:hidden [&_.monaco-editor]:h-full [&_.monaco-scrollable-element]:h-full"><MonacoEditorheight="100%"defaultLanguage="python"value={code || ''}onChange={onChange}theme="vs-dark"onMount={(editor) => {editorRef.current = editor// Force layout to ensure proper sizingsetTimeout(() => {editor.layout()}, 0)}}options={{fontSize: 14,
components/CodeEditor.tsx+6-2