1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(helm): show manifest previews/changes when installing and upgrading a helm chart [r8s-405] (#898)

This commit is contained in:
Ali 2025-07-23 10:52:58 +12:00 committed by GitHub
parent a4cff13531
commit 60bc04bc33
41 changed files with 763 additions and 157 deletions

View file

@ -122,7 +122,7 @@ test('should apply custom height', async () => {
<CodeEditor {...defaultProps} height={customHeight} />
);
const editor = (await findByRole('textbox')).parentElement?.parentElement;
const editor = await findByRole('textbox');
expect(editor).toHaveStyle({ height: customHeight });
});

View file

@ -48,7 +48,7 @@ function yamlLanguage(schema?: JSONSchema7) {
syntaxHighlighting(oneDarkHighlightStyle),
// explicitly setting lineNumbers() as an extension ensures that the gutter order is the same between the diff viewer and the code editor
lineNumbers(),
lintGutter(),
!!schema && lintGutter(),
keymap.of([...defaultKeymap, ...completionKeymap, ...lintKeymap]),
// only show completions when a schema is provided
!!schema &&

View file

@ -12,6 +12,7 @@ interface Props {
titleClassName?: string;
className?: string;
htmlFor?: string;
setIsDefaultFolded?: (isDefaultFolded: boolean) => void;
}
export function FormSection({
@ -23,6 +24,7 @@ export function FormSection({
titleClassName,
className,
htmlFor = '',
setIsDefaultFolded,
}: PropsWithChildren<Props>) {
const [isExpanded, setIsExpanded] = useState(!defaultFolded);
const id = `foldingButton${title}`;
@ -39,7 +41,10 @@ export function FormSection({
isExpanded={isExpanded}
data-cy={id}
id={id}
onClick={() => setIsExpanded((isExpanded) => !isExpanded)}
onClick={() => {
setIsExpanded((isExpanded) => !isExpanded);
setIsDefaultFolded?.(isExpanded);
}}
/>
)}