Skip to content

Commit 49ab813

Browse files
authored
rename cell toolbar's stickyScroll (microsoft#187611)
1 parent 00105d2 commit 49ab813

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/vs/workbench/contrib/notebook/browser/view/cellParts/stickyScroll.ts renamed to src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
77
import { clamp } from 'vs/base/common/numbers';
88
import { ICellViewModel, INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
99

10-
export function registerStickyScroll(notebookEditor: INotebookEditor, cell: ICellViewModel, element: HTMLElement, opts?: { extraOffset?: number; min?: number }): IDisposable {
10+
export function registerCellToolbarStickyScroll(notebookEditor: INotebookEditor, cell: ICellViewModel, element: HTMLElement, opts?: { extraOffset?: number; min?: number }): IDisposable {
1111
const extraOffset = opts?.extraOffset ?? 0;
1212
const min = opts?.min ?? 0;
1313

src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { INotebookCellActionContext } from 'vs/workbench/contrib/notebook/browse
2020
import { ICellViewModel, INotebookEditorDelegate } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
2121
import { CodiconActionViewItem } from 'vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
2222
import { CellOverlayPart } from 'vs/workbench/contrib/notebook/browser/view/cellPart';
23-
import { registerStickyScroll } from 'vs/workbench/contrib/notebook/browser/view/cellParts/stickyScroll';
23+
import { registerCellToolbarStickyScroll } from 'vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll';
2424
import { WorkbenchToolBar } from 'vs/platform/actions/browser/toolbar';
2525

2626
export class BetweenCellToolbar extends CellOverlayPart {
@@ -196,7 +196,7 @@ export class CellTitleToolbarPart extends CellOverlayPart {
196196
override didRenderCell(element: ICellViewModel): void {
197197
const model = this._initializeModel();
198198
const view = this._initialize(model, element);
199-
this.cellDisposables.add(registerStickyScroll(this._notebookEditor, element, this.toolbarContainer, { extraOffset: 4, min: -14 }));
199+
this.cellDisposables.add(registerCellToolbarStickyScroll(this._notebookEditor, element, this.toolbarContainer, { extraOffset: 4, min: -14 }));
200200

201201
this.updateContext(view, <INotebookCellActionContext>{
202202
ui: true,

src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
2020
import { INotebookCellActionContext } from 'vs/workbench/contrib/notebook/browser/controller/coreActions';
2121
import { ICellViewModel, INotebookEditorDelegate } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
2222
import { CellContentPart } from 'vs/workbench/contrib/notebook/browser/view/cellPart';
23-
import { registerStickyScroll } from 'vs/workbench/contrib/notebook/browser/view/cellParts/stickyScroll';
23+
import { registerCellToolbarStickyScroll } from 'vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll';
2424
import { NOTEBOOK_CELL_EXECUTION_STATE, NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_EDITOR_FOCUSED } from 'vs/workbench/contrib/notebook/common/notebookContextKeys';
2525

2626
export class RunToolbar extends CellContentPart {
@@ -56,7 +56,7 @@ export class RunToolbar extends CellContentPart {
5656
}
5757

5858
override didRenderCell(element: ICellViewModel): void {
59-
this.cellDisposables.add(registerStickyScroll(this.notebookEditor, element, this.runButtonContainer));
59+
this.cellDisposables.add(registerCellToolbarStickyScroll(this.notebookEditor, element, this.runButtonContainer));
6060

6161
this.toolbar.context = <INotebookCellActionContext>{
6262
ui: true,

0 commit comments

Comments
 (0)