mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Updates to package.json to show books on stable (#7836)
* Updates to package.json to show books on stable * remove notebookQuality context key * renamed untitiled to unsaved
This commit is contained in:
@@ -41,7 +41,7 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
this.collapsibleState = book.treeItemCollapsibleState;
|
||||
this._sections = book.page;
|
||||
if (book.isUntitled) {
|
||||
this.contextValue = 'untitledBook';
|
||||
this.contextValue = 'unsavedBook';
|
||||
} else {
|
||||
this.contextValue = 'savedBook';
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
}
|
||||
|
||||
private async initialize(bookPaths: string[]): Promise<void> {
|
||||
await vscode.commands.executeCommand('setContext', 'untitledBooks', this._openAsUntitled);
|
||||
await vscode.commands.executeCommand('setContext', 'unsavedBooks', this._openAsUntitled);
|
||||
await Promise.all(bookPaths.map(async (bookPath) => {
|
||||
let book: BookModel = new BookModel(bookPath, this._openAsUntitled, this._extensionContext);
|
||||
await book.initializeContents();
|
||||
|
||||
@@ -23,7 +23,7 @@ const JUPYTER_NOTEBOOK_PROVIDER = 'jupyter';
|
||||
const msgSampleCodeDataFrame = localize('msgSampleCodeDataFrame', "This sample code loads the file into a data frame and shows the first 10 results.");
|
||||
const noNotebookVisible = localize('noNotebookVisible', "No notebook editor is active");
|
||||
const BOOKS_VIEWID = 'bookTreeView';
|
||||
const READONLY_BOOKS_VIEWID = 'untitledBookTreeView';
|
||||
const READONLY_BOOKS_VIEWID = 'unsavedBookTreeView';
|
||||
let controller: JupyterController;
|
||||
type ChooseCellType = { label: string, id: CellType };
|
||||
|
||||
@@ -35,6 +35,7 @@ export async function activate(extensionContext: vscode.ExtensionContext): Promi
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('bookTreeView.openExternalLink', (resource) => bookTreeViewProvider.openExternalLink(resource)));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.saveBook', () => untitledBookTreeViewProvider.saveJupyterBooks()));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.searchBook', () => bookTreeViewProvider.searchJupyterBooks()));
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('notebook.command.searchUntitledBook', () => untitledBookTreeViewProvider.searchJupyterBooks()));
|
||||
|
||||
extensionContext.subscriptions.push(vscode.commands.registerCommand('_notebook.command.new', (context?: azdata.ConnectedContext) => {
|
||||
let connectionProfile: azdata.IConnectionProfile = undefined;
|
||||
|
||||
Reference in New Issue
Block a user