remove experimental setting (#209126)

This commit is contained in:
Aaron Munger 2024-03-29 10:59:49 -07:00 committed by GitHub
parent e553c6bbbf
commit 3648e8f381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 5 additions and 24 deletions

View File

@ -1079,17 +1079,6 @@ configurationRegistry.registerConfiguration({
],
default: 'fullCell'
},
[NotebookSetting.anchorToFocusedCell]: {
markdownDescription: nls.localize('notebook.scrolling.anchorToFocusedCell.description', "Experimental. Keep the focused cell steady while surrounding cells change size."),
type: 'string',
enum: ['auto', 'on', 'off'],
markdownEnumDescriptions: [
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'),
nls.localize('notebook.scrolling.anchorToFocusedCell.on.description', "Always anchor the viewport to the focused cell."),
nls.localize('notebook.scrolling.anchorToFocusedCell.off.description', "The focused cell may shift around as cells resize.")
],
default: 'auto'
},
[NotebookSetting.cellChat]: {
markdownDescription: nls.localize('notebook.cellChat', "Enable experimental floating chat widget in notebooks."),
type: 'boolean',

View File

@ -38,12 +38,11 @@ export class NotebookCellAnchor implements IDisposable {
const newFocusBottom = cellListView.elementTop(focusedIndex) + cellListView.elementHeight(focusedIndex) + heightDelta;
const viewBottom = cellListView.renderHeight + cellListView.getScrollTop();
const focusStillVisible = viewBottom > newFocusBottom;
const anchorFocusedSetting = this.configurationService.getValue(NotebookSetting.anchorToFocusedCell);
const allowScrolling = this.configurationService.getValue(NotebookSetting.scrollToRevealCell) !== 'none';
const growing = heightDelta > 0;
const autoAnchor = allowScrolling && growing && !focusStillVisible && anchorFocusedSetting !== 'off';
const autoAnchor = allowScrolling && growing && !focusStillVisible;
if (autoAnchor || anchorFocusedSetting === 'on') {
if (autoAnchor) {
this.watchAchorDuringExecution(executingCellUri);
return true;
}

View File

@ -952,7 +952,6 @@ export const NotebookSetting = {
outlineShowCodeCellSymbols: 'notebook.outline.showCodeCellSymbols',
breadcrumbsShowCodeCells: 'notebook.breadcrumbs.showCodeCells',
scrollToRevealCell: 'notebook.scrolling.revealNextCellOnExecute',
anchorToFocusedCell: 'notebook.scrolling.experimental.anchorToFocusedCell',
cellChat: 'notebook.experimental.cellChat',
notebookVariablesView: 'notebook.experimental.variablesView',
InteractiveWindowPromptToSave: 'interactiveWindow.promptToSaveOnClose',

View File

@ -26,10 +26,7 @@ suite('NotebookCellList', () => {
setup(() => {
testDisposables = new DisposableStore();
instantiationService = setupInstantiationService(testDisposables);
config = new TestConfigurationService({
[NotebookSetting.anchorToFocusedCell]: 'auto'
});
config = new TestConfigurationService();
instantiationService.stub(IConfigurationService, config);
});

View File

@ -12,7 +12,7 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
import { NotebookCellsLayout } from 'vs/workbench/contrib/notebook/browser/view/notebookCellListView';
import { FoldingModel } from 'vs/workbench/contrib/notebook/browser/viewModel/foldingModel';
import { CellEditType, CellKind, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { CellEditType, CellKind } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { createNotebookCellList, setupInstantiationService, withTestNotebook } from 'vs/workbench/contrib/notebook/test/browser/testNotebookEditor';
suite('NotebookRangeMap', () => {
@ -339,10 +339,7 @@ suite('NotebookRangeMap with whitesspaces', () => {
setup(() => {
testDisposables = new DisposableStore();
instantiationService = setupInstantiationService(testDisposables);
config = new TestConfigurationService({
[NotebookSetting.anchorToFocusedCell]: 'auto'
});
config = new TestConfigurationService();
instantiationService.stub(IConfigurationService, config);
});