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

promote nb diff overview ruler setting #178599

Merged
merged 1 commit into from Mar 29, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -29,7 +29,7 @@ import { DiffSide, DIFF_CELL_MARGIN, IDiffCellInfo, INotebookTextDiffEditor } fr
import { Emitter, Event } from 'vs/base/common/event';
import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
import { CellUri, INotebookDiffEditorModel, INotebookDiffResult, NOTEBOOK_DIFF_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { CellUri, INotebookDiffEditorModel, INotebookDiffResult, NOTEBOOK_DIFF_EDITOR_ID, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { URI } from 'vs/base/common/uri';
import { IDiffChange, IDiffResult } from 'vs/base/common/diff/diff';
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
Expand Down Expand Up @@ -159,7 +159,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD
}

private isOverviewRulerEnabled(): boolean {
return this.configurationService.getValue('notebook.experimental.diffOverviewRuler.enabled') ?? false;
return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
}

getSelection(): IEditorPaneSelection | undefined {
Expand Down
Expand Up @@ -770,6 +770,12 @@ configurationRegistry.registerConfiguration({
default: true,
tags: ['notebookLayout']
},
[NotebookSetting.diffOverviewRuler]: {
description: nls.localize('notebook.diff.enableOverviewRuler.description', "Whether to render the overview ruler in the diff editor for notebook."),
type: 'boolean',
default: false,
tags: ['notebookLayout']
},
[NotebookSetting.cellToolbarVisibility]: {
markdownDescription: nls.localize('notebook.cellToolbarVisibility.description', "Whether the cell toolbar should appear on hover or click."),
type: 'string',
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/contrib/notebook/common/notebookCommon.ts
Expand Up @@ -911,6 +911,7 @@ export const NotebookSetting = {
cellToolbarVisibility: 'notebook.cellToolbarVisibility',
showCellStatusBar: 'notebook.showCellStatusBar',
textDiffEditorPreview: 'notebook.diff.enablePreview',
diffOverviewRuler: 'notebook.diff.overviewRuler',
experimentalInsertToolbarAlignment: 'notebook.experimental.insertToolbarAlignment',
compactView: 'notebook.compactView',
focusIndicator: 'notebook.cellFocusIndicator',
Expand Down