mirror of
https://github.com/Microsoft/vscode
synced 2024-10-04 02:14:06 +00:00
remove experimental setting (#209126)
This commit is contained in:
parent
e553c6bbbf
commit
3648e8f381
|
@ -1079,17 +1079,6 @@ configurationRegistry.registerConfiguration({
|
||||||
],
|
],
|
||||||
default: 'fullCell'
|
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]: {
|
[NotebookSetting.cellChat]: {
|
||||||
markdownDescription: nls.localize('notebook.cellChat', "Enable experimental floating chat widget in notebooks."),
|
markdownDescription: nls.localize('notebook.cellChat', "Enable experimental floating chat widget in notebooks."),
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|
|
@ -38,12 +38,11 @@ export class NotebookCellAnchor implements IDisposable {
|
||||||
const newFocusBottom = cellListView.elementTop(focusedIndex) + cellListView.elementHeight(focusedIndex) + heightDelta;
|
const newFocusBottom = cellListView.elementTop(focusedIndex) + cellListView.elementHeight(focusedIndex) + heightDelta;
|
||||||
const viewBottom = cellListView.renderHeight + cellListView.getScrollTop();
|
const viewBottom = cellListView.renderHeight + cellListView.getScrollTop();
|
||||||
const focusStillVisible = viewBottom > newFocusBottom;
|
const focusStillVisible = viewBottom > newFocusBottom;
|
||||||
const anchorFocusedSetting = this.configurationService.getValue(NotebookSetting.anchorToFocusedCell);
|
|
||||||
const allowScrolling = this.configurationService.getValue(NotebookSetting.scrollToRevealCell) !== 'none';
|
const allowScrolling = this.configurationService.getValue(NotebookSetting.scrollToRevealCell) !== 'none';
|
||||||
const growing = heightDelta > 0;
|
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);
|
this.watchAchorDuringExecution(executingCellUri);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -952,7 +952,6 @@ export const NotebookSetting = {
|
||||||
outlineShowCodeCellSymbols: 'notebook.outline.showCodeCellSymbols',
|
outlineShowCodeCellSymbols: 'notebook.outline.showCodeCellSymbols',
|
||||||
breadcrumbsShowCodeCells: 'notebook.breadcrumbs.showCodeCells',
|
breadcrumbsShowCodeCells: 'notebook.breadcrumbs.showCodeCells',
|
||||||
scrollToRevealCell: 'notebook.scrolling.revealNextCellOnExecute',
|
scrollToRevealCell: 'notebook.scrolling.revealNextCellOnExecute',
|
||||||
anchorToFocusedCell: 'notebook.scrolling.experimental.anchorToFocusedCell',
|
|
||||||
cellChat: 'notebook.experimental.cellChat',
|
cellChat: 'notebook.experimental.cellChat',
|
||||||
notebookVariablesView: 'notebook.experimental.variablesView',
|
notebookVariablesView: 'notebook.experimental.variablesView',
|
||||||
InteractiveWindowPromptToSave: 'interactiveWindow.promptToSaveOnClose',
|
InteractiveWindowPromptToSave: 'interactiveWindow.promptToSaveOnClose',
|
||||||
|
|
|
@ -26,10 +26,7 @@ suite('NotebookCellList', () => {
|
||||||
setup(() => {
|
setup(() => {
|
||||||
testDisposables = new DisposableStore();
|
testDisposables = new DisposableStore();
|
||||||
instantiationService = setupInstantiationService(testDisposables);
|
instantiationService = setupInstantiationService(testDisposables);
|
||||||
config = new TestConfigurationService({
|
config = new TestConfigurationService();
|
||||||
[NotebookSetting.anchorToFocusedCell]: 'auto'
|
|
||||||
});
|
|
||||||
|
|
||||||
instantiationService.stub(IConfigurationService, config);
|
instantiationService.stub(IConfigurationService, config);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { TestConfigurationService } from 'vs/platform/configuration/test/common/
|
||||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||||
import { NotebookCellsLayout } from 'vs/workbench/contrib/notebook/browser/view/notebookCellListView';
|
import { NotebookCellsLayout } from 'vs/workbench/contrib/notebook/browser/view/notebookCellListView';
|
||||||
import { FoldingModel } from 'vs/workbench/contrib/notebook/browser/viewModel/foldingModel';
|
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';
|
import { createNotebookCellList, setupInstantiationService, withTestNotebook } from 'vs/workbench/contrib/notebook/test/browser/testNotebookEditor';
|
||||||
|
|
||||||
suite('NotebookRangeMap', () => {
|
suite('NotebookRangeMap', () => {
|
||||||
|
@ -339,10 +339,7 @@ suite('NotebookRangeMap with whitesspaces', () => {
|
||||||
setup(() => {
|
setup(() => {
|
||||||
testDisposables = new DisposableStore();
|
testDisposables = new DisposableStore();
|
||||||
instantiationService = setupInstantiationService(testDisposables);
|
instantiationService = setupInstantiationService(testDisposables);
|
||||||
config = new TestConfigurationService({
|
config = new TestConfigurationService();
|
||||||
[NotebookSetting.anchorToFocusedCell]: 'auto'
|
|
||||||
});
|
|
||||||
|
|
||||||
instantiationService.stub(IConfigurationService, config);
|
instantiationService.stub(IConfigurationService, config);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue