Enable useMarkdownRenderer by default again and document this experimental setting

This commit is contained in:
Matt Bierner 2021-03-29 14:28:11 -07:00
parent dcb7f7c853
commit 34354cd5a5
4 changed files with 13 additions and 6 deletions

View file

@ -85,6 +85,6 @@
"editor.formatOnSave": true,
},
"typescript.tsc.autoDetect": "off",
// "notebook.experimental.useMarkdownRenderer": true,
"testing.autoRun.mode": "onlyPreviouslyRun",
"notebook.experimental.useMarkdownRenderer": true,
"testing.autoRun.mode": "onlyPreviouslyRun",
}

View file

@ -30,7 +30,7 @@ import { NotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookEd
import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookEditorInput';
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
import { NotebookService } from 'vs/workbench/contrib/notebook/browser/notebookServiceImpl';
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, NotebookTextDiffEditorPreview, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, ExperimentalUseMarkdownRenderer, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, NotebookTextDiffEditorPreview, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IEditorService, IOpenEditorOverride } from 'vs/workbench/services/editor/common/editorService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@ -765,6 +765,11 @@ configurationRegistry.registerConfiguration({
description: nls.localize('notebook.diff.enablePreview.description', "Whether to use the enhanced text diff editor for notebook."),
type: 'boolean',
default: true
}
},
[ExperimentalUseMarkdownRenderer]: {
description: nls.localize('notebook.experimental.useMarkdownRenderer.description', "Enable/disable using the new extensible markdown renderer."),
type: 'boolean',
default: true
},
}
});

View file

@ -61,7 +61,7 @@ import { NotebookEventDispatcher, NotebookLayoutChangedEvent } from 'vs/workbenc
import { MarkdownCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markdownCellViewModel';
import { CellViewModel, IModelDecorationsChangeAccessor, INotebookEditorViewState, NotebookViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/notebookViewModel';
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
import { CellKind, CellToolbarLocKey, ICellRange, INotebookKernel, SelectionStateType, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { CellKind, CellToolbarLocKey, ExperimentalUseMarkdownRenderer, ICellRange, INotebookKernel, SelectionStateType, ShowCellStatusBarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider';
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
import { editorGutterModifiedBackground } from 'vs/workbench/contrib/scm/browser/dirtydiffDecorator';
@ -73,6 +73,7 @@ import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { ITASExperimentService } from 'vs/workbench/services/experiment/common/experimentService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { isWeb } from 'vs/base/common/platform';
const $ = DOM.$;
@ -342,7 +343,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
super();
this.isEmbedded = creationOptions.isEmbedded || false;
this.useRenderer = (this.configurationService.getValue<boolean>('notebook.experimental.useMarkdownRenderer') ?? false /*!isWeb*/) && !accessibilityService.isScreenReaderOptimized();
this.useRenderer = (this.configurationService.getValue<boolean>(ExperimentalUseMarkdownRenderer) ?? !isWeb) && !accessibilityService.isScreenReaderOptimized();
this._overlayContainer = document.createElement('div');
this.scopedContextKeyService = contextKeyService.createScoped(this._overlayContainer);

View file

@ -813,6 +813,7 @@ export const DisplayOrderKey = 'notebook.displayOrder';
export const CellToolbarLocKey = 'notebook.cellToolbarLocation';
export const ShowCellStatusBarKey = 'notebook.showCellStatusBar';
export const NotebookTextDiffEditorPreview = 'notebook.diff.enablePreview';
export const ExperimentalUseMarkdownRenderer = 'notebook.experimental.useMarkdownRenderer';
export const enum CellStatusbarAlignment {
LEFT,