Skip to content

Commit

Permalink
Update VSCode commands to maximize real-estate by (#14579)
Browse files Browse the repository at this point in the history
* Update VSCode commands to maximize real-estate by
closing sidebar

* Maximize editor and hide sidebar in widget tests.

* Update merge conflict
  • Loading branch information
DonJayamanne authored Oct 27, 2023
1 parent f8a0ff9 commit 85f57fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import { initializeWidgetComms, Utils } from './commUtils';
import { WidgetRenderingTimeoutForTests } from './constants';
import { getTextOutputValue } from '../../../kernels/execution/helpers';
import { isWeb } from '../../../platform/common/utils/misc';
import { noop } from '../../core';

const templateRootPath: Uri =
workspace.workspaceFolders && workspace.workspaceFolders.length > 0
Expand Down Expand Up @@ -134,8 +133,8 @@ suite('Standard IPyWidget Tests @widgets', function () {
// and the output is not visible, then it will not get rendered & the tests will fail. The tests inspect the rendered HTML.
// Solution - maximize available real-estate by hiding the output panels & hiding the input cells.
await commands.executeCommand('workbench.action.closePanel');
await commands.executeCommand('workbench.action.maximizeEditorGroup').then(noop, noop);
await commands.executeCommand('notebook.cell.collapseAllCellInputs').then(noop, noop);
await commands.executeCommand('workbench.action.maximizeEditorHideSidebar');
await commands.executeCommand('notebook.cell.collapseAllCellInputs');
comms = await initializeWidgetComms(disposables);

vscodeNotebook = api.serviceContainer.get<IVSCodeNotebook>(IVSCodeNotebook);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { GlobalStateKeyToTrackIfUserConfiguredCDNAtLeastOnce } from '../../../no
import { initializeWidgetComms, Utils } from './commUtils';
import { isWeb } from '../../../platform/common/utils/misc';
import { getTextOutputValue } from '../../../kernels/execution/helpers';
import { noop } from '../../core';

[true, false].forEach((useCDN) => {
/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */
Expand Down Expand Up @@ -81,7 +80,7 @@ import { noop } from '../../core';
// and the output is not visible, then it will not get rendered & the tests will fail. The tests inspect the rendered HTML.
// Solution - maximize available real-estate by hiding the output panels & hiding the input cells.
await commands.executeCommand('workbench.action.closePanel');
await commands.executeCommand('workbench.action.maximizeEditorGroup').then(noop, noop);
await commands.executeCommand('workbench.action.maximizeEditorHideSidebar');
comms = await initializeWidgetComms(disposables);

vscodeNotebook = api.serviceContainer.get<IVSCodeNotebook>(IVSCodeNotebook);
Expand Down

0 comments on commit 85f57fe

Please sign in to comment.