From c15bd6ada14f1691e5a1f270c97ede1eaa5577f3 Mon Sep 17 00:00:00 2001 From: Mengting Yan Date: Mon, 1 Feb 2021 17:15:41 -0500 Subject: [PATCH] fix(plugins/plugin-client-common): Sidecar sticks to a short height when switching from Yaml -> Summary -> Yaml tab Fixed by removing sizeToFit in Editor and setting monaco-editor min-height to 20rem Fixes #6913 --- packages/test/src/api/util.ts | 7 +++++-- .../src/components/Content/KuiContent.tsx | 2 -- .../web/scss/components/Editor/Editor.scss | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/test/src/api/util.ts b/packages/test/src/api/util.ts index 00b223f043e..204e89566bf 100644 --- a/packages/test/src/api/util.ts +++ b/packages/test/src/api/util.ts @@ -278,10 +278,13 @@ export function uniqueFileForSnapshot() { /** Click the close button on a block, and expect it to be gone */ export async function removeBlock(res: AppAndCount) { const N = res.count - await res.app.client.$(Selectors.PROMPT_N(N)).then(_ => _.moveTo()) + const prompt = await res.app.client.$(Selectors.PROMPT_N(N)) + await prompt.scrollIntoView() + await prompt.moveTo() const removeButton = await res.app.client.$(Selectors.BLOCK_REMOVE_BUTTON(N)) - await removeButton.waitForDisplayed() + await removeButton.scrollIntoView() + await removeButton.waitForDisplayed({ timeout: CLI.waitTimeout }) await removeButton.click() } diff --git a/plugins/plugin-client-common/src/components/Content/KuiContent.tsx b/plugins/plugin-client-common/src/components/Content/KuiContent.tsx index 12797d0f4c5..5543624a310 100644 --- a/plugins/plugin-client-common/src/components/Content/KuiContent.tsx +++ b/plugins/plugin-client-common/src/components/Content/KuiContent.tsx @@ -117,7 +117,6 @@ export default class KuiContent extends React.Component { { contentType={mode.contentType} originalContent={mode.content.a} modifiedContent={mode.content.b} - sizeToFit response={response} renderSideBySide tabUUID={tab.uuid} diff --git a/plugins/plugin-client-common/web/scss/components/Editor/Editor.scss b/plugins/plugin-client-common/web/scss/components/Editor/Editor.scss index af806cba9c8..eac52d4073f 100644 --- a/plugins/plugin-client-common/web/scss/components/Editor/Editor.scss +++ b/plugins/plugin-client-common/web/scss/components/Editor/Editor.scss @@ -34,6 +34,7 @@ .monaco-editor { display: block; + min-height: 23rem; } .monaco-editor { background: transparent;