Skip to content

Commit 67cd703

Browse files
Revert "Fix/error message readability 291" (#316)
* Revert "Fix/error message readability 291 (#311)" This reverts commit b73a3aa. * revert #311 and keep only required changes Signed-off-by: Agnivesh Chaubey <agniveshvapi@gmail.com> --------- Signed-off-by: Agnivesh Chaubey <agniveshvapi@gmail.com>
1 parent 9d80d54 commit 67cd703

4 files changed

Lines changed: 20 additions & 74 deletions

File tree

.changeset/fix-dagre-singleton.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/fix-error-readability.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/components/MonacoEditor.tsx

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ const MonacoEditor = () => {
259259
};
260260

261261
const browser = createBrowser(schemaId, schemaDocument);
262-
// @ts-expect-error browser type not fully compatible with getSchema signature
262+
// @ts-expect-error
263263
const schema = await getSchema(schemaDocument.baseUri, browser);
264264

265265
setCompiledSchema(await compile(schema));
@@ -316,45 +316,26 @@ const MonacoEditor = () => {
316316
<option value="yaml">YAML</option>
317317
</select>
318318
</div>
319-
320-
<PanelGroup direction="vertical">
321-
<Panel defaultSize={90} minSize={50}>
322-
<Editor
323-
height="100%"
324-
width="100%"
325-
language={schemaFormat}
326-
value={schemaText}
327-
theme={theme === "light" ? "vs-light" : "vs-dark"}
328-
options={{
329-
minimap: { enabled: false },
330-
occurrencesHighlight: "off",
331-
}}
332-
onChange={(value) => setSchemaText(value ?? "")}
333-
onMount={handleEditorDidMount}
334-
/>
335-
</Panel>
336-
337-
<PanelResizeHandle className="h-[1px] bg-[var(--resize-handle-color)]" />
338-
339-
<Panel
340-
defaultSize={10}
341-
minSize={10}
342-
maxSize={50}
343-
className="bg-[var(--validation-bg-color)]"
344-
>
345-
<div className="flex-1 p-3 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-transparent hover:scrollbar-thumb-gray-400">
346-
<div
347-
className={`${
348-
VALIDATION_UI[schemaValidation.status].className
349-
} leading-relaxed whitespace-pre-wrap text-xs`}
350-
>
351-
{schemaValidation.message}
352-
</div>
353-
</div>
354-
</Panel>
355-
</PanelGroup>
319+
<Editor
320+
height="87%"
321+
width="100%"
322+
language={schemaFormat}
323+
value={schemaText}
324+
theme={theme === "light" ? "vs-light" : "vs-dark"}
325+
options={{
326+
minimap: { enabled: false },
327+
occurrencesHighlight: "off",
328+
}}
329+
onChange={(value) => setSchemaText(value ?? "")}
330+
onMount={handleEditorDidMount}
331+
/>
332+
<div className="flex-1 p-2 bg-[var(--validation-bg-color)] text-sm overflow-y-auto">
333+
<div className={VALIDATION_UI[schemaValidation.status].className}>
334+
{schemaValidation.message}
335+
</div>
336+
</div>
356337
</Panel>
357-
<PanelResizeHandle className="w-[1px] bg-[var(--resize-handle-color)] relative">
338+
<PanelResizeHandle className="w-[1px] bg-gray-400 relative">
358339
<div>
359340
<EditorToggleButton
360341
className={"absolute top-2 left-2 z-1"}

src/style/theme.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
--popup-header-text-color: #374151;
3737
--popup-close-btn-hover-color: #717479;
3838
--popup-backdrop-color: rgba(255, 255, 255, 0.1);
39-
40-
/* Resize Handle */
41-
--resize-handle-color: #9ca3af80;
4239
}
4340

4441
[data-theme="dark"] {
@@ -80,9 +77,6 @@
8077
--popup-header-text-color: #e0e0e0;
8178
--popup-close-btn-hover-color: #777575;
8279
--popup-backdrop-color: rgba(0, 0, 0, 0.5);
83-
84-
/* Resize Handle */
85-
--resize-handle-color: #9ca3af80;
8680
}
8781

8882
.monaco-highlight-line {

0 commit comments

Comments
 (0)