mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 17:23:53 -05:00
Notebooks: Support for In-Proc Markdown Renderer (#6164)
* NB improve startup using built-in markdown render This is a sample branch showing perf improvements if we load content using built-in markdown rendering - Has issues where images aren't correctly rendered due to sanitization, need to copy renderer code and update settings - Moves content load up before anythign to do with providers since we can render without knowing about these things # Conflicts: # src/sql/workbench/parts/notebook/cellViews/textCell.component.ts * Re-enable logging of each cell's rendering time * Fix test issue * Kernel loading working with new markdown renderer # Conflicts: # src/sql/workbench/parts/notebook/cellViews/textCell.component.ts * Fixed tests, cleaned up code * markdownOutput component integration * PR Comments * PR feedback 2 * PR feedback again
This commit is contained in:
@@ -13,6 +13,9 @@ import { NotebookEditor } from 'sql/workbench/parts/notebook/notebookEditor';
|
||||
import { NewNotebookAction } from 'sql/workbench/parts/notebook/notebookActions';
|
||||
import { KeyMod } from 'vs/editor/common/standalone/standaloneBase';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { IConfigurationRegistry, Extensions as ConfigExtensions } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { localize } from 'vs/nls';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import { registerComponentType } from 'sql/workbench/parts/notebook/outputs/mimeRegistry';
|
||||
import { MimeRendererComponent as MimeRendererComponent } from 'sql/workbench/parts/notebook/outputs/mimeRenderer.component';
|
||||
import { MarkdownOutputComponent } from 'sql/workbench/parts/notebook/outputs/markdownOutput.component';
|
||||
@@ -40,6 +43,19 @@ actionRegistry.registerWorkbenchAction(
|
||||
),
|
||||
NewNotebookAction.LABEL
|
||||
);
|
||||
const configurationRegistry = <IConfigurationRegistry>Registry.as(ConfigExtensions.Configuration);
|
||||
configurationRegistry.registerConfiguration({
|
||||
'id': 'notebook',
|
||||
'title': 'Notebook',
|
||||
'type': 'object',
|
||||
'properties': {
|
||||
'notebook.useInProcMarkdown': {
|
||||
'type': 'boolean',
|
||||
'default': product.quality === 'stable' ? false : true,
|
||||
'description': localize('notebook.inProcMarkdown', 'Use in-process markdown viewer to render text cells more quickly (Experimental).')
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* *************** Output components *************** */
|
||||
// Note: most existing types use the same component to render. In order to
|
||||
|
||||
Reference in New Issue
Block a user