diff --git a/src/test/datascience/mockQuickPick.ts b/src/test/datascience/mockQuickPick.ts index 6129de31de..a5dbf495cf 100644 --- a/src/test/datascience/mockQuickPick.ts +++ b/src/test/datascience/mockQuickPick.ts @@ -6,6 +6,7 @@ import { Event, EventEmitter, QuickInputButton, QuickPick, QuickPickItem, QuickP export class MockQuickPick implements QuickPick { public value: string = ''; public placeholder: string | undefined; + public prompt: string | undefined; public title: string | undefined = 'foo'; public step: number | undefined; public totalSteps: number | undefined; diff --git a/src/test/datascience/notebook/helper.ts b/src/test/datascience/notebook/helper.ts index 0cfa13f278..fcfbaa48e8 100644 --- a/src/test/datascience/notebook/helper.ts +++ b/src/test/datascience/notebook/helper.ts @@ -1421,6 +1421,7 @@ export async function hijackSavePrompt( export class MockQuickPick implements QuickPick { value: string; placeholder: string | undefined; + prompt: string | undefined; get onDidChangeValue(): Event { return this._onDidChangeValueEmitter.event; } diff --git a/src/webviews/extension-side/dataframe/dataframeController.ts b/src/webviews/extension-side/dataframe/dataframeController.ts index b6ba2c6401..69c7170f49 100644 --- a/src/webviews/extension-side/dataframe/dataframeController.ts +++ b/src/webviews/extension-side/dataframe/dataframeController.ts @@ -4,6 +4,8 @@ import { env, l10n, NotebookEdit, + NotebookEditorRevealType, + NotebookRange, type NotebookCellOutput, type NotebookEditor, type NotebookRendererMessaging, @@ -293,6 +295,11 @@ export class DataframeController implements IExtensionSyncActivationService { ranges: [{ start: cellIndex, end: cellIndex + 1 }], document: editor.notebook.uri }); + + // Reveal the cell to keep it visible after output size changes + const notebookRange = new NotebookRange(cellIndex, cellIndex + 1); + + editor.revealRange(notebookRange, NotebookEditorRevealType.InCenterIfOutsideViewport); } private async handleSelectPageSize(editor: NotebookEditor, message: SelectPageSizeCommand) { @@ -342,6 +349,11 @@ export class DataframeController implements IExtensionSyncActivationService { ranges: [{ start: cellIndex, end: cellIndex + 1 }], document: editor.notebook.uri }); + + // Reveal the cell to keep it visible after output size changes + const notebookRange = new NotebookRange(cellIndex, cellIndex + 1); + + editor.revealRange(notebookRange, NotebookEditorRevealType.InCenterIfOutsideViewport); } private async onDidReceiveMessage(