瀏覽代碼

Fix review comment issues.

Jason Grout 7 年之前
父節點
當前提交
21040a0dd6

+ 1 - 1
docs/source/developer/documents.rst

@@ -13,7 +13,7 @@ JupyterLab can be extended in several ways:
    application, and we cover them in this section.
 
 For this section, the term 'document' refers to any visual thing that
-is backed by a file stored on disk (e.g. uses Contents API).
+is backed by a file stored on disk (i.e. uses Contents API).
 
 Overview of document architecture
 ---------------------------------

+ 1 - 1
packages/docregistry/src/mimedocument.ts

@@ -44,7 +44,7 @@ class MimeContent extends Widget {
    */
   constructor(options: MimeContent.IOptions) {
     super();
-    this.addClass('jp-MimeDocument'); // maybe move to the MainAreaWidget in the factory?
+    this.addClass('jp-MimeDocument');
     this._mimeType = options.mimeType;
     this._dataType = options.dataType || 'string';
     this._context = options.context;

+ 15 - 0
packages/docregistry/src/registry.ts

@@ -1196,9 +1196,24 @@ namespace DocumentRegistry {
  */
 export
 interface IDocumentWidget<T extends Widget = Widget, U extends DocumentRegistry.IModel = DocumentRegistry.IModel> extends Widget {
+  /**
+   * The content widget.
+   */
   readonly content: T;
+
+  /**
+   * A promise resolving when the content widget is ready to be revealed.
+   */
   readonly ready: Promise<void>;
+
+  /**
+   * The context associated with the document.
+   */
   readonly context: DocumentRegistry.IContext<U>;
+
+  /**
+   * The toolbar for the widget.
+   */
   readonly toolbar: Toolbar<Widget>;
 }
 

+ 0 - 1
packages/notebook/src/panel.ts

@@ -74,7 +74,6 @@ class NotebookPanel extends DocumentWidget<Notebook, INotebookModel> {
 
     // Set up things related to the context
     this.content.model = this.context.model;
-    // TODO: what happens when the context model changes? Can the context model change?
     this.context.session.kernelChanged.connect(this._onKernelChanged, this);
 
     this.context.ready.then(() => {