Skip to content

Commit 7c6e59b

Browse files
Code editor rename
1 parent 7378fef commit 7c6e59b

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

ui.frontend/src/App.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ body {
66
input[type='search'] {
77
box-sizing: border-box !important;
88
}
9+
10+
.coral3-Shell-header {
11+
z-index: 1;
12+
}

ui.frontend/src/components/ImmersiveEditor.tsx renamed to ui.frontend/src/components/CodeEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { debounce } from '../utils/debounce';
99
import { modelStorage } from '../utils/modelStorage';
1010
import { registerGroovyLanguage } from '../utils/monaco/groovy';
1111

12-
type ImmersiveEditorProps<C extends ColorVersion> = editor.IStandaloneEditorConstructionOptions & {
12+
type CodeEditorProps<C extends ColorVersion> = editor.IStandaloneEditorConstructionOptions & {
1313
id: string;
1414
scrollToBottomOnUpdate?: boolean;
1515
initialValue?: string;
@@ -21,7 +21,7 @@ type ImmersiveEditorProps<C extends ColorVersion> = editor.IStandaloneEditorCons
2121
const SaveViewStateDebounce = 1000;
2222
const SuggestWidgetHeight = 480;
2323

24-
const ImmersiveEditor = <C extends ColorVersion>({ containerProps, syntaxError, onChange, id, language, value, initialValue, readOnly, scrollToBottomOnUpdate, ...props }: ImmersiveEditorProps<C>) => {
24+
const CodeEditor = <C extends ColorVersion>({ containerProps, syntaxError, onChange, id, language, value, initialValue, readOnly, scrollToBottomOnUpdate, ...props }: CodeEditorProps<C>) => {
2525
const [isOpen, setIsOpen] = useState(false);
2626
const monacoRef = useMonaco();
2727
const containerRef = useRef<HTMLDivElement>(null);
@@ -169,4 +169,4 @@ const ImmersiveEditor = <C extends ColorVersion>({ containerProps, syntaxError,
169169
);
170170
};
171171

172-
export default ImmersiveEditor;
172+
export default CodeEditor;

ui.frontend/src/pages/ConsolePage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ConsoleHelpButton from '../components/ConsoleHelpButton';
99
import ExecutionAbortButton from '../components/ExecutionAbortButton';
1010
import ExecutionCopyOutputButton from '../components/ExecutionCopyOutputButton';
1111
import ExecutionProgressBar from '../components/ExecutionProgressBar';
12-
import ImmersiveEditor from '../components/ImmersiveEditor';
12+
import CodeEditor from '../components/CodeEditor.tsx';
1313
import KeyboardShortcutsButton from '../components/KeyboardShortcutsButton';
1414
import { appState } from '../hooks/app';
1515
import { useCompilation } from '../hooks/code';
@@ -98,7 +98,7 @@ const ConsolePage = () => {
9898
<KeyboardShortcutsButton />
9999
</Flex>
100100
</Flex>
101-
<ImmersiveEditor id="code-editor" initialValue={code} readOnly={executing} onChange={setCode} syntaxError={syntaxError} language="groovy" />
101+
<CodeEditor id="code-editor" initialValue={code} readOnly={executing} onChange={setCode} syntaxError={syntaxError} language="groovy" />
102102
</Flex>
103103
</Item>
104104
<Item key="output">
@@ -120,7 +120,7 @@ const ConsolePage = () => {
120120
<ConsoleHelpButton />
121121
</Flex>
122122
</Flex>
123-
<ImmersiveEditor id="output-preview" value={executionOutput} readOnly scrollToBottomOnUpdate={autoscroll} />
123+
<CodeEditor id="output-preview" value={executionOutput} readOnly scrollToBottomOnUpdate={autoscroll} />
124124
</Flex>
125125
</Item>
126126
</TabPanels>

ui.frontend/src/pages/ExecutionView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import ExecutionAbortButton from '../components/ExecutionAbortButton';
1515
import ExecutionCopyOutputButton from '../components/ExecutionCopyOutputButton';
1616
import ExecutionProgressBar from '../components/ExecutionProgressBar';
1717
import ExecutionStatusBadge from '../components/ExecutionStatusBadge';
18-
import ImmersiveEditor from '../components/ImmersiveEditor';
18+
import CodeEditor from '../components/CodeEditor.tsx';
1919
import { appState } from '../hooks/app.ts';
2020
import { useExecutionPolling } from '../hooks/execution';
2121
import { useFormatter } from '../hooks/formatter';
@@ -140,7 +140,7 @@ const ExecutionView = () => {
140140
</ButtonGroup>
141141
</Flex>
142142
</View>
143-
<ImmersiveEditor id="execution-view" value={execution.executable.content} language="groovy" readOnly />
143+
<CodeEditor id="execution-view" value={execution.executable.content} language="groovy" readOnly />
144144
</Flex>
145145
</Item>
146146
<Item key="output">
@@ -162,7 +162,7 @@ const ExecutionView = () => {
162162
&nbsp;
163163
</Flex>
164164
</Flex>
165-
<ImmersiveEditor id="execution-output" value={executionOutput} readOnly scrollToBottomOnUpdate={autoscrollOutput} />
165+
<CodeEditor id="execution-output" value={executionOutput} readOnly scrollToBottomOnUpdate={autoscrollOutput} />
166166
</Flex>
167167
</Item>
168168
</TabPanels>

ui.frontend/src/pages/ScriptView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import FileCode from '@spectrum-icons/workflow/FileCode';
77
import History from '@spectrum-icons/workflow/History';
88
import { useEffect, useState } from 'react';
99
import { useNavigate, useParams } from 'react-router-dom';
10-
import CodeExecuteButton from '../components/CodeExecuteButton.tsx';
11-
import ImmersiveEditor from '../components/ImmersiveEditor.tsx';
12-
import { NavigationSearchParams, useNavigationTab } from '../hooks/navigation.ts';
10+
import CodeExecuteButton from '../components/CodeExecuteButton';
11+
import CodeEditor from '../components/CodeEditor';
12+
import { NavigationSearchParams, useNavigationTab } from '../hooks/navigation';
1313
import { toastRequest } from '../utils/api';
1414
import { ArgumentValues, Description, ExecutionQueryParams, QueueOutput, Script, ScriptOutput, ScriptType } from '../utils/api.types';
1515
import { Urls } from '../utils/url.ts';
@@ -177,7 +177,7 @@ const ScriptView = () => {
177177
</ButtonGroup>
178178
</Flex>
179179
</View>
180-
<ImmersiveEditor id="script-view" value={script.content} language="groovy" readOnly />
180+
<CodeEditor id="script-view" value={script.content} language="groovy" readOnly />
181181
</Flex>
182182
</Item>
183183
</TabPanels>

0 commit comments

Comments
 (0)