mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
Enable loading spinner for notebook editor. (#18810)
This commit is contained in:
@@ -78,7 +78,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
@Input() _views: NotebookViewsExtension;
|
||||
|
||||
protected _actionBar: Taskbar;
|
||||
protected isLoading: boolean;
|
||||
private _modelReadyDeferred = new Deferred<NotebookModel>();
|
||||
private _trustedAction: TrustedAction;
|
||||
private _runAllCellsAction: RunAllCellsAction;
|
||||
@@ -112,7 +111,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
@Inject(IConfigurationService) private _configurationService: IConfigurationService
|
||||
) {
|
||||
super();
|
||||
this.isLoading = true;
|
||||
this.doubleClickEditEnabled = this._configurationService.getValue('notebook.enableDoubleClickEdit');
|
||||
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
||||
this.previewFeaturesEnabled = this._configurationService.getValue('workbench.enablePreviewFeatures');
|
||||
@@ -436,7 +434,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
}
|
||||
} else {
|
||||
this.setViewInErrorState(localize('displayFailed', "Could not display contents: {0}", getErrorMessage(error)));
|
||||
this.setLoading(false);
|
||||
this._modelReadyDeferred.reject(error);
|
||||
this.notebookService.addNotebookEditor(this);
|
||||
}
|
||||
@@ -444,11 +441,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
private setLoading(isLoading: boolean): void {
|
||||
this.isLoading = isLoading;
|
||||
this.detectChanges();
|
||||
}
|
||||
|
||||
private async registerModel(): Promise<void> {
|
||||
this._register(this._model.onError((errInfo: INotification) => this.handleModelError(errInfo)));
|
||||
this._register(this._model.contentChanged((change) => this.handleContentChanged(change)));
|
||||
@@ -458,7 +450,6 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
||||
this._register(this._model.layoutChanged(() => this.detectChanges()));
|
||||
this._register(this.model.onScroll.event(() => this._onScroll.fire()));
|
||||
|
||||
this.setLoading(false);
|
||||
// Check if URI fragment is present; if it is, navigate to section by default
|
||||
this.navigateToSectionIfURIFragmentExists();
|
||||
this.updateToolbarComponents();
|
||||
|
||||
Reference in New Issue
Block a user