Skip to content

Commit 33d4d0d

Browse files
committed
fixes
1 parent 442bd02 commit 33d4d0d

File tree

6 files changed

+14
-22
lines changed

6 files changed

+14
-22
lines changed

src/components/Yaml/YamlDiff.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.container {
22
position: relative;
3-
3+
border: 1px solid red;
44
width: 100%;
5-
height: 100%;
5+
height: 50vh;
66
max-height: 100%;
77
max-width: 100%;
88
overflow: hidden;

src/components/Yaml/YamlViewDialog.module.css

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

src/components/Yaml/YamlViewDialog.tsx

Whitespace-only changes.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.container {
22
width: 100%;
3-
min-height: 100%;
4-
max-height: 100%;
3+
height: calc(100vh - 8rem);
54
max-width: 100%;
65
}

src/components/Yaml/YamlViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const YamlViewer: FC<YamlViewerProps> = ({ yamlString, filename }) => {
1616
return (
1717
<div className={styles.container}>
1818
{/* Use controlled value with a stable model path to update content without remounting */}
19-
<div>.</div>
20-
<YamlEditor value={yamlString} path={`${filename}.yaml`} options={{ readOnly: true }} />
19+
20+
<YamlEditor value={yamlString} path={`${filename}.yaml`} options={{ readOnly: false }} />
2121
</div>
2222
);
2323
};

src/components/YamlEditor/YamlDiffEditor.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,17 @@ export const YamlDiffEditor = (props: YamlDiffEditorProps) => {
3434
scrollBeyondLastLine: false,
3535
renderMarginRevertIcon: false,
3636
automaticLayout: true,
37+
readOnly: true,
3738
};
3839

3940
return (
40-
<div style={{ width: '100%', height: '100%', minHeight: '50vh' }}>
41-
<DiffEditor
42-
{...rest}
43-
theme={computedTheme}
44-
options={simplifiedOptions}
45-
height="100%"
46-
// Force YAML language for both panes
47-
language="yaml"
48-
/>
49-
</div>
41+
<DiffEditor
42+
{...rest}
43+
theme={computedTheme}
44+
options={simplifiedOptions}
45+
height="100%"
46+
// Force YAML language for both panes
47+
language="yaml"
48+
/>
5049
);
5150
};

0 commit comments

Comments
 (0)