Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove experimental setting #209126

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/contrib/notebook/common/notebookCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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);
});

Expand Down
Loading