Skip to content

Commit 198714f

Browse files
committed
fix
1 parent a8428a4 commit 198714f

File tree

9 files changed

+20
-27
lines changed

9 files changed

+20
-27
lines changed

src/components/Graphs/Graph.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import { useSplitter } from '../Splitter/SplitterContext.tsx';
1515
import { YamlSidePanel } from '../Yaml/YamlSidePanel.tsx';
1616
import { Resource } from '../../utils/removeManagedFieldsAndFilterData.ts';
1717

18-
19-
2018
const nodeTypes = {
2119
custom: (props: NodeProps<Node<NodeData, 'custom'>>) => (
2220
<CustomNode
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.wrapper {
2+
position: relative;
3+
height: 100%;
4+
}

src/components/Wizards/CreateManagedControlPlane/SummarizeStep.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import YamlPanel from '../../Yaml/YamlPanel.tsx';
1111
import { idpPrefix } from '../../../utils/idpPrefix.ts';
1212
import { UseFormWatch } from 'react-hook-form';
1313
import { CreateDialogProps } from '../../Dialogs/CreateWorkspaceDialogContainer.tsx';
14-
import { YamlDiff } from '../../Yaml/YamlDiff.tsx';
1514

15+
import styles from './SummarizeStep.module.css';
16+
import { YamlDiff } from './YamlDiff.tsx';
1617
interface SummarizeStepProps {
1718
watch: UseFormWatch<CreateDialogProps>;
1819
projectName: string;
@@ -46,7 +47,7 @@ export const SummarizeStep: React.FC<SummarizeStepProps> = ({
4647
),
4748
);
4849
return (
49-
<>
50+
<div className={styles.wrapper}>
5051
<Title>{t('common.summarize')}</Title>
5152
<Grid defaultSpan="XL6 L6 M6 S6">
5253
<div>
@@ -96,6 +97,6 @@ export const SummarizeStep: React.FC<SummarizeStepProps> = ({
9697
)}
9798
</div>
9899
</Grid>
99-
</>
100+
</div>
100101
);
101102
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.container {
2+
position: absolute;
3+
top: 0;
4+
bottom: 0;
5+
width: calc(50% - 2rem);
6+
right: 0;
7+
overflow: hidden;
8+
}

src/components/Yaml/YamlDiff.tsx renamed to src/components/Wizards/CreateManagedControlPlane/YamlDiff.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FC } from 'react';
22

3-
import { YamlDiffEditor } from '../YamlEditor/YamlDiffEditor.tsx';
43
import styles from './YamlDiff.module.css';
4+
import { YamlDiffEditor } from '../../YamlEditor/YamlDiffEditor.tsx';
55
type YamlDiffProps = {
66
originalYaml: string;
77
modifiedYaml: string;

src/components/Yaml/YamlDiff.module.css

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

src/components/Yaml/YamlPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const YamlPanel: FC<YamlPanelProps> = ({ yamlString, filename }) => {
3737
</Button>
3838
)}
3939
</FlexBox>
40-
<YamlViewer yamlString={yamlString} />
40+
<YamlViewer yamlString={yamlString} filename={'summarize'} />
4141
</div>
4242
);
4343
};

src/components/Yaml/YamlViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const YamlViewer: FC<YamlViewerProps> = ({ yamlString, filename }) => {
1717
<div className={styles.container}>
1818
{/* Use controlled value with a stable model path to update content without remounting */}
1919

20-
<YamlEditor value={yamlString} path={`${filename}.yaml`} options={{ readOnly: false }} />
20+
<YamlEditor value={yamlString} path={`${filename}.yaml`} options={{ readOnly: true }} />
2121
</div>
2222
);
2323
};

src/components/YamlEditor/YamlDiffEditor.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,5 @@ export const YamlDiffEditor = (props: YamlDiffEditorProps) => {
3737
readOnly: true,
3838
};
3939

40-
return (
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-
);
40+
return <DiffEditor {...rest} theme={computedTheme} options={simplifiedOptions} height="100%" language="yaml" />;
5041
};

0 commit comments

Comments
 (0)