Skip to content

Commit

Permalink
fix(plugins/plugin-client-common): Sidecar sticks to a short height w…
Browse files Browse the repository at this point in the history
…hen switching from Yaml -> Summary -> Yaml tab

Fixed by removing sizeToFit in Editor and setting monaco-editor min-height to 20rem

Fixes #6913
  • Loading branch information
myan9 authored and starpit committed Feb 2, 2021
1 parent b73d0cb commit c15bd6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/test/src/api/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export default class KuiContent extends React.Component<KuiMMRProps, State> {
<Editor
content={mode}
readOnly={false}
sizeToFit
willUpdateToolbar={willUpdateToolbar}
response={response}
repl={tab.REPL}
Expand All @@ -131,7 +130,6 @@ export default class KuiContent extends React.Component<KuiMMRProps, State> {
contentType={mode.contentType}
originalContent={mode.content.a}
modifiedContent={mode.content.b}
sizeToFit
response={response}
renderSideBySide
tabUUID={tab.uuid}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

.monaco-editor {
display: block;
min-height: 23rem;
}
.monaco-editor {
background: transparent;
Expand Down

0 comments on commit c15bd6a

Please sign in to comment.