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

Use Lumino #7582

Merged
merged 20 commits into from Dec 5, 2019
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -123,8 +123,6 @@ JupyterLab is part of [Project Jupyter](http://jupyter.org/) and is developed by

JupyterLab's current maintainers are listed in alphabetical order, with affiliation, and main areas of contribution:

- Chris Colbert, Project Jupyter (co-creator, application/low-level architecture,
technical leadership, vision, PhosphorJS)
- Afshin Darian, Two Sigma (co-creator, application/high-level architecture,
prolific contributions throughout the code base).
- Jessica Forde, Project Jupyter (demo, documentation)
Expand All @@ -141,6 +139,8 @@ JupyterLab's current maintainers are listed in alphabetical order, with affiliat

Maintainer emeritus:

- Chris Colbert, Project Jupyter (co-creator, application/low-level architecture,
technical leadership, vision, PhosphorJS)
- Cameron Oelsen, Cal Poly (UI/UX design).

This list is provided to give the reader context on who we are and how our team functions.
Expand Down
4 changes: 2 additions & 2 deletions buildutils/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion buildutils/package.json
Expand Up @@ -39,7 +39,7 @@
"watch": "tsc -w --listEmittedFiles"
},
"dependencies": {
"@phosphor/coreutils": "^1.3.1",
"@lumino/coreutils": "^1.3.1",
"@yarnpkg/lockfile": "^1.1.0",
"child_process": "~1.0.2",
"commander": "~2.20.0",
Expand Down
14 changes: 7 additions & 7 deletions buildutils/src/dependency-graph.ts
Expand Up @@ -151,7 +151,7 @@ interface IMainOptions {
lernaExclude: string;
lernaInclude: string;
path: string;
phosphor: boolean;
lumino: boolean;
topLevel: boolean;
}

Expand All @@ -163,7 +163,7 @@ function main({
lernaExclude,
lernaInclude,
path,
phosphor,
lumino,
topLevel
}: IMainOptions) {
let yarnData = readYarn(path);
Expand Down Expand Up @@ -231,13 +231,13 @@ function main({
});
}

// Filter out *all* phosphor nodes
if (!phosphor) {
// Filter out *all* lumino nodes
if (!lumino) {
Object.keys(sub).forEach(v => {
sub[v] = sub[v].filter(w => !w.startsWith('@phosphor/'));
sub[v] = sub[v].filter(w => !w.startsWith('@lumino/'));
});
Object.keys(sub).forEach(v => {
if (v.startsWith('@phosphor/')) {
if (v.startsWith('@lumino/')) {
delete sub[v];
}
});
Expand Down Expand Up @@ -277,7 +277,7 @@ commander
'--no-jupyterlab',
'Do not include dependency connections TO @jupyterlab org packages nor isolated @jupyterlab org packages'
)
.option('--no-phosphor', 'Do not include @phosphor org packages')
.option('--no-lumino', 'Do not include @lumino org packages')
.option('--no-devDependencies', 'Do not include dev dependencies')
.option('--no-dependencies', 'Do not include normal dependencies')
.option('--no-top-level', 'Do not include the top-level packages')
Expand Down
2 changes: 1 addition & 1 deletion buildutils/src/utils.ts
Expand Up @@ -4,7 +4,7 @@ import fs = require('fs-extra');
import childProcess = require('child_process');
import { DepGraph } from 'dependency-graph';
import sortPackageJson = require('sort-package-json');
import coreutils = require('@phosphor/coreutils');
import coreutils = require('@lumino/coreutils');

type Dict<T> = { [key: string]: T };

Expand Down
82 changes: 41 additions & 41 deletions dev_mode/package.json
Expand Up @@ -16,47 +16,47 @@
"watch": "webpack --watch"
},
"dependencies": {
"@jupyterlab/application": "~2.0.0-alpha.1",
"@jupyterlab/application-extension": "~2.0.0-alpha.1",
"@jupyterlab/apputils-extension": "~2.0.0-alpha.1",
"@jupyterlab/codemirror-extension": "~2.0.0-alpha.1",
"@jupyterlab/completer-extension": "~2.0.0-alpha.1",
"@jupyterlab/console-extension": "~2.0.0-alpha.1",
"@jupyterlab/coreutils": "~4.0.0-alpha.1",
"@jupyterlab/csvviewer-extension": "~2.0.0-alpha.1",
"@jupyterlab/docmanager-extension": "~2.0.0-alpha.1",
"@jupyterlab/documentsearch-extension": "~2.0.0-alpha.1",
"@jupyterlab/extensionmanager-extension": "~2.0.0-alpha.1",
"@jupyterlab/filebrowser-extension": "~2.0.0-alpha.1",
"@jupyterlab/fileeditor-extension": "~2.0.0-alpha.1",
"@jupyterlab/help-extension": "~2.0.0-alpha.1",
"@jupyterlab/htmlviewer-extension": "~2.0.0-alpha.1",
"@jupyterlab/hub-extension": "~2.0.0-alpha.1",
"@jupyterlab/imageviewer-extension": "~2.0.0-alpha.1",
"@jupyterlab/inspector-extension": "~2.0.0-alpha.1",
"@jupyterlab/javascript-extension": "~2.0.0-alpha.1",
"@jupyterlab/json-extension": "~2.0.0-alpha.1",
"@jupyterlab/launcher-extension": "~2.0.0-alpha.1",
"@jupyterlab/logconsole-extension": "~1.0.0-alpha.1",
"@jupyterlab/mainmenu-extension": "~2.0.0-alpha.1",
"@jupyterlab/markdownviewer-extension": "~2.0.0-alpha.1",
"@jupyterlab/mathjax2-extension": "~2.0.0-alpha.1",
"@jupyterlab/notebook-extension": "~2.0.0-alpha.1",
"@jupyterlab/pdf-extension": "~2.0.0-alpha.1",
"@jupyterlab/rendermime-extension": "~2.0.0-alpha.1",
"@jupyterlab/running-extension": "~2.0.0-alpha.1",
"@jupyterlab/settingeditor-extension": "~2.0.0-alpha.1",
"@jupyterlab/shortcuts-extension": "~2.0.0-alpha.1",
"@jupyterlab/statusbar-extension": "~2.0.0-alpha.1",
"@jupyterlab/tabmanager-extension": "~2.0.0-alpha.1",
"@jupyterlab/terminal-extension": "~2.0.0-alpha.1",
"@jupyterlab/theme-dark-extension": "~2.0.0-alpha.1",
"@jupyterlab/theme-light-extension": "~2.0.0-alpha.1",
"@jupyterlab/tooltip-extension": "~2.0.0-alpha.1",
"@jupyterlab/ui-components-extension": "~2.0.0-alpha.1",
"@jupyterlab/vdom-extension": "~2.0.0-alpha.1",
"@jupyterlab/vega4-extension": "~2.0.0-alpha.1",
"@jupyterlab/vega5-extension": "~2.0.0-alpha.1"
"@jupyterlab/application": "^2.0.0-alpha.1",
"@jupyterlab/application-extension": "^2.0.0-alpha.1",
"@jupyterlab/apputils-extension": "^2.0.0-alpha.1",
"@jupyterlab/codemirror-extension": "^2.0.0-alpha.1",
"@jupyterlab/completer-extension": "^2.0.0-alpha.1",
"@jupyterlab/console-extension": "^2.0.0-alpha.1",
"@jupyterlab/coreutils": "^4.0.0-alpha.1",
"@jupyterlab/csvviewer-extension": "^2.0.0-alpha.1",
"@jupyterlab/docmanager-extension": "^2.0.0-alpha.1",
"@jupyterlab/documentsearch-extension": "^2.0.0-alpha.1",
"@jupyterlab/extensionmanager-extension": "^2.0.0-alpha.1",
"@jupyterlab/filebrowser-extension": "^2.0.0-alpha.1",
"@jupyterlab/fileeditor-extension": "^2.0.0-alpha.1",
"@jupyterlab/help-extension": "^2.0.0-alpha.1",
"@jupyterlab/htmlviewer-extension": "^2.0.0-alpha.1",
"@jupyterlab/hub-extension": "^2.0.0-alpha.1",
"@jupyterlab/imageviewer-extension": "^2.0.0-alpha.1",
"@jupyterlab/inspector-extension": "^2.0.0-alpha.1",
"@jupyterlab/javascript-extension": "^2.0.0-alpha.1",
"@jupyterlab/json-extension": "^2.0.0-alpha.1",
"@jupyterlab/launcher-extension": "^2.0.0-alpha.1",
"@jupyterlab/logconsole-extension": "^1.0.0-alpha.1",
"@jupyterlab/mainmenu-extension": "^2.0.0-alpha.1",
"@jupyterlab/markdownviewer-extension": "^2.0.0-alpha.1",
"@jupyterlab/mathjax2-extension": "^2.0.0-alpha.1",
"@jupyterlab/notebook-extension": "^2.0.0-alpha.1",
"@jupyterlab/pdf-extension": "^2.0.0-alpha.1",
"@jupyterlab/rendermime-extension": "^2.0.0-alpha.1",
"@jupyterlab/running-extension": "^2.0.0-alpha.1",
"@jupyterlab/settingeditor-extension": "^2.0.0-alpha.1",
"@jupyterlab/shortcuts-extension": "^2.0.0-alpha.1",
"@jupyterlab/statusbar-extension": "^2.0.0-alpha.1",
"@jupyterlab/tabmanager-extension": "^2.0.0-alpha.1",
"@jupyterlab/terminal-extension": "^2.0.0-alpha.1",
"@jupyterlab/theme-dark-extension": "^2.0.0-alpha.1",
"@jupyterlab/theme-light-extension": "^2.0.0-alpha.1",
"@jupyterlab/tooltip-extension": "^2.0.0-alpha.1",
"@jupyterlab/ui-components-extension": "^2.0.0-alpha.1",
"@jupyterlab/vdom-extension": "^2.0.0-alpha.1",
"@jupyterlab/vega4-extension": "^2.0.0-alpha.1",
"@jupyterlab/vega5-extension": "^2.0.0-alpha.1"
},
"devDependencies": {
"@jupyterlab/buildutils": "^2.0.0-alpha.1",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developer/css.rst
Expand Up @@ -112,7 +112,7 @@ CSS class naming conventions
We have a fairly formal method for naming our CSS classes.

First, CSS class names are associated with TypeScript classes that
extend ``phosphor.Widget``:
extend ``lumino.Widget``:

The ``.node`` of each such widget should have a CSS class that matches
the name of the TypeScript class:
Expand Down
22 changes: 11 additions & 11 deletions docs/source/developer/extension_dev.rst
Expand Up @@ -101,19 +101,19 @@ In JupyterLab, the application shell consists of:
- A ``bottom`` area for things like status bars.
- A ``header`` area for custom elements.

Phosphor
Lumino
~~~~~~~~

The Phosphor library is used as the underlying architecture of
The Lumino library is used as the underlying architecture of
JupyterLab and provides many of the low level primitives and widget
structure used in the application. Phosphor provides a rich set of
structure used in the application. Lumino provides a rich set of
widgets for developing desktop-like applications in the browser, as well
as patterns and objects for writing clean, well-abstracted code. The
widgets in the application are primarily **Phosphor widgets**, and
Phosphor concepts, like message passing and signals, are used
throughout. **Phosphor messages** are a *many-to-one* interaction that
widgets in the application are primarily **Lumino widgets**, and
Lumino concepts, like message passing and signals, are used
throughout. **Lumino messages** are a *many-to-one* interaction that
enables information like resize events to flow through the widget
hierarchy in the application. **Phosphor signals** are a *one-to-many*
hierarchy in the application. **Lumino signals** are a *one-to-many*
interaction that enable listeners to react to changes in an observed
object.

Expand Down Expand Up @@ -579,14 +579,14 @@ Context Menus
^^^^^^^^^^^^^

JupyterLab has an application-wide context menu available as
``app.contextMenu``. See the Phosphor
`docs <https://phosphorjs.github.io/phosphor/api/widgets/interfaces/contextmenu.iitemoptions.html>`__
``app.contextMenu``. See the Lumino
`docs <https://jupyterlab.github.io/lumino/widgets/interfaces/contextmenu.iitemoptions.html>`__
for the item creation options. If you wish to preempt the
application context menu, you can use a 'contextmenu' event listener and
call ``event.stopPropagation`` to prevent the application context menu
handler from being called (it is listening in the bubble phase on the
``document``). At this point you could show your own Phosphor
`contextMenu <https://phosphorjs.github.io/phosphor/api/widgets/classes/contextmenu.html>`__,
``document``). At this point you could show your own Lumino
`contextMenu <https://jupyterlab.github.io/lumino/widgets/classes/contextmenu.html>`__,
or simply stop propagation and let the system context menu be shown.
This would look something like the following in a ``Widget`` subclass:

Expand Down
18 changes: 9 additions & 9 deletions docs/source/developer/extension_points.rst
Expand Up @@ -11,7 +11,7 @@ This is intended to be a guide for some of JupyterLab's most commonly-used exten
However, it is not an exhaustive account of how to extend the application components,
and more detailed descriptions of their public APIs may be found in the
`JupyterLab <http://jupyterlab.github.io/jupyterlab/index.html>`__ and
`Phosphor <http://phosphorjs.github.io/docs.html>`__ API documentation.
`Lumino <http://jupyterlab.github.io/lumino/index.html>`__ API documentation.

.. contents:: Table of contents
:local:
Expand Down Expand Up @@ -57,12 +57,12 @@ Each of ``isEnabled``, ``isToggled``, and ``isVisible`` can be either
a boolean value or a function that returns a boolean value, in case you want
to do some logic in order to determine those conditions.

Likewise, each of ``label`` and ``iconClass`` can be either
Likewise, each of ``label`` and ``iconClass`` can be either
a string value or a function that returns a string value.

There are several more options which can be passed into the command registry when
adding new commands. These are documented
`here <http://phosphorjs.github.io/phosphor/api/commands/interfaces/commandregistry.icommandoptions.html>`__.
adding new commands. These are documented
`here <http://jupyterlab.github.io/lumino/commands/interfaces/commandregistry.icommandoptions.html>`__.

After a command has been added to the application command registry
you can add them to various places in the application user interface,
Expand Down Expand Up @@ -110,7 +110,7 @@ Adding a New Menu
^^^^^^^^^^^^^^^^^

To add a new menu to the menu bar, you need to create a new
`Phosphor menu <https://phosphorjs.github.io/phosphor/api/widgets/classes/menu.html>`__.
`Lumino menu <https://jupyterlab.github.io/lumino/widgets/classes/menu.html>`__.

You can then add commands to the menu in a similar way to the command palette,
and add that menu to the main menu bar:
Expand Down Expand Up @@ -238,7 +238,7 @@ If you don't want the shortcuts to be user-configurable,
you can add them directly to the application command registry:

.. code:: typescript

app.commands.addKeyBinding({
command: commandID,
args: {},
Expand All @@ -254,7 +254,7 @@ the shortcut handler propagates up the DOM tree from the focused element
and tests each element against the registered selectors. If a match is found,
then that command is executed with the provided ``args``.
Full documentation for the options for ``addKeyBinding`` can be found
`here <http://phosphorjs.github.io/phosphor/api/commands/interfaces/commandregistry.ikeybindingoptions.html>`__.
`here <http://jupyterlab.github.io/lumino/commands/interfaces/commandregistry.ikeybindingoptions.html>`__.

JupyterLab also provides integration with its settings system for keyboard shortcuts.
Your extension can provide a settings schema with a ``jupyter.lab.shortcuts`` key,
Expand Down Expand Up @@ -299,7 +299,7 @@ Left/Right Areas
The left and right areas of JupyterLab are intended to host more persistent user interface
elements than the main area. That being said, extension authors are free to add whatever
components they like to these areas. The outermost-level of the object that you add is expected
to be a Phosphor ``Widget``, but that can host any content you like (such as React components).
to be a Lumino ``Widget``, but that can host any content you like (such as React components).

As an example, the following code executes an application command to a terminal widget
and then adds the terminal to the right area:
Expand All @@ -317,7 +317,7 @@ Status Bar
~~~~~~~~~~

JupyterLab's status bar is intended to show small pieces of contextual information.
Like the left and right areas, it only expects a Phosphor ``Widget``,
Like the left and right areas, it only expects a Lumino ``Widget``,
which might contain any kind of content. Since the status bar has limited space,
you should endeavor to only add small widgets to it.

Expand Down
22 changes: 11 additions & 11 deletions docs/source/developer/extension_tutorial.rst
Expand Up @@ -216,15 +216,15 @@ you in JupyterLab. For your first addition, you're going to add a
tab panel when invoked.

Fire up your favorite text editor and open the ``src/index.ts`` file in
your extension project. Change the import at the top of the file to get
your extension project. Change the import at the top of the file to get
a reference to the command palette interface and the Jupyter front end.

.. code:: typescript

import {
JupyterFrontEnd, JupyterFrontEndPlugin
} from '@jupyterlab/application';

import {
ICommandPalette
} from '@jupyterlab/apputils';
Expand Down Expand Up @@ -300,13 +300,13 @@ Now return to your editor. Modify the imports at the top of the file to add a fe

import {
Widget
} from '@phosphor/widgets';
} from '@lumino/widgets';

Install this new dependency as well:

.. code:: bash

jlpm add @phosphor/widgets
jlpm add @lumino/widgets


Then modify the ``activate`` function again so that it has the following
Expand Down Expand Up @@ -346,7 +346,7 @@ The first new block of code creates a ``MainAreaWidget`` instance with an empty
content ``Widget`` as its child. It also assigns the main area widget a unique
ID, gives it a label that will appear as its tab title, and makes the tab
closable by the user.
The second block of code adds a new command with id ``apod:open`` and label *Random Astronomy Picture*
The second block of code adds a new command with id ``apod:open`` and label *Random Astronomy Picture*
to JupyterLab. When the command executes,
it attaches the widget to the main display area if it is not already
present and then makes it the active tab. The last new line of code uses the command id to add
Expand Down Expand Up @@ -591,13 +591,13 @@ Add the following additional import to the top of the file.

import {
Message
} from '@phosphor/messaging';
} from '@lumino/messaging';

Install this dependency:

.. code:: bash

jlpm add @phosphor/messaging
jlpm add @lumino/messaging


Then add the class just below the import statements in the ``index.ts``
Expand Down Expand Up @@ -777,17 +777,17 @@ entire list of import statements looks like the following:

import {
Message
} from '@phosphor/messaging';
} from '@lumino/messaging';

import {
Widget
} from '@phosphor/widgets';
} from '@lumino/widgets';

Install this dependency:

.. code:: bash

jlpm add @phosphor/coreutils
jlpm add @lumino/coreutils

Then add the ``ILayoutRestorer`` interface to the ``JupyterFrontEndPlugin``
definition. This addition passes the global ``LayoutRestorer`` as the
Expand Down