Skip to content

Commit 3648e8f

Browse files
authored
remove experimental setting (microsoft#209126)
1 parent e553c6b commit 3648e8f

File tree

5 files changed

+5
-24
lines changed

5 files changed

+5
-24
lines changed

src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,17 +1079,6 @@ configurationRegistry.registerConfiguration({
10791079
],
10801080
default: 'fullCell'
10811081
},
1082-
[NotebookSetting.anchorToFocusedCell]: {
1083-
markdownDescription: nls.localize('notebook.scrolling.anchorToFocusedCell.description', "Experimental. Keep the focused cell steady while surrounding cells change size."),
1084-
type: 'string',
1085-
enum: ['auto', 'on', 'off'],
1086-
markdownEnumDescriptions: [
1087-
nls.localize('notebook.scrolling.anchorToFocusedCell.auto.description', "Anchor the viewport to the focused cell depending on context unless {0} is set to {1}.", 'notebook.scrolling.revealCellBehavior', 'none'),
1088-
nls.localize('notebook.scrolling.anchorToFocusedCell.on.description', "Always anchor the viewport to the focused cell."),
1089-
nls.localize('notebook.scrolling.anchorToFocusedCell.off.description', "The focused cell may shift around as cells resize.")
1090-
],
1091-
default: 'auto'
1092-
},
10931082
[NotebookSetting.cellChat]: {
10941083
markdownDescription: nls.localize('notebook.cellChat', "Enable experimental floating chat widget in notebooks."),
10951084
type: 'boolean',

src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ export class NotebookCellAnchor implements IDisposable {
3838
const newFocusBottom = cellListView.elementTop(focusedIndex) + cellListView.elementHeight(focusedIndex) + heightDelta;
3939
const viewBottom = cellListView.renderHeight + cellListView.getScrollTop();
4040
const focusStillVisible = viewBottom > newFocusBottom;
41-
const anchorFocusedSetting = this.configurationService.getValue(NotebookSetting.anchorToFocusedCell);
4241
const allowScrolling = this.configurationService.getValue(NotebookSetting.scrollToRevealCell) !== 'none';
4342
const growing = heightDelta > 0;
44-
const autoAnchor = allowScrolling && growing && !focusStillVisible && anchorFocusedSetting !== 'off';
43+
const autoAnchor = allowScrolling && growing && !focusStillVisible;
4544

46-
if (autoAnchor || anchorFocusedSetting === 'on') {
45+
if (autoAnchor) {
4746
this.watchAchorDuringExecution(executingCellUri);
4847
return true;
4948
}

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,6 @@ export const NotebookSetting = {
952952
outlineShowCodeCellSymbols: 'notebook.outline.showCodeCellSymbols',
953953
breadcrumbsShowCodeCells: 'notebook.breadcrumbs.showCodeCells',
954954
scrollToRevealCell: 'notebook.scrolling.revealNextCellOnExecute',
955-
anchorToFocusedCell: 'notebook.scrolling.experimental.anchorToFocusedCell',
956955
cellChat: 'notebook.experimental.cellChat',
957956
notebookVariablesView: 'notebook.experimental.variablesView',
958957
InteractiveWindowPromptToSave: 'interactiveWindow.promptToSaveOnClose',

src/vs/workbench/contrib/notebook/test/browser/notebookCellList.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ suite('NotebookCellList', () => {
2626
setup(() => {
2727
testDisposables = new DisposableStore();
2828
instantiationService = setupInstantiationService(testDisposables);
29-
config = new TestConfigurationService({
30-
[NotebookSetting.anchorToFocusedCell]: 'auto'
31-
});
32-
29+
config = new TestConfigurationService();
3330
instantiationService.stub(IConfigurationService, config);
3431
});
3532

src/vs/workbench/contrib/notebook/test/browser/notebookViewZones.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/
1212
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
1313
import { NotebookCellsLayout } from 'vs/workbench/contrib/notebook/browser/view/notebookCellListView';
1414
import { FoldingModel } from 'vs/workbench/contrib/notebook/browser/viewModel/foldingModel';
15-
import { CellEditType, CellKind, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';
15+
import { CellEditType, CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon';
1616
import { createNotebookCellList, setupInstantiationService, withTestNotebook } from 'vs/workbench/contrib/notebook/test/browser/testNotebookEditor';
1717

1818
suite('NotebookRangeMap', () => {
@@ -339,10 +339,7 @@ suite('NotebookRangeMap with whitesspaces', () => {
339339
setup(() => {
340340
testDisposables = new DisposableStore();
341341
instantiationService = setupInstantiationService(testDisposables);
342-
config = new TestConfigurationService({
343-
[NotebookSetting.anchorToFocusedCell]: 'auto'
344-
});
345-
342+
config = new TestConfigurationService();
346343
instantiationService.stub(IConfigurationService, config);
347344
});
348345

0 commit comments

Comments
 (0)