From 9672e5c3a88e1327531fea008d9052ab9049d2c8 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Mon, 23 Mar 2020 19:51:24 +0100 Subject: [PATCH] Docs: move Examples to Components section --- docs/source/developer/components.rst | 55 ++++++++++++++++++++++++++- docs/source/developer/examples.rst | 56 ---------------------------- docs/source/index.rst | 1 - 3 files changed, 54 insertions(+), 58 deletions(-) delete mode 100644 docs/source/developer/examples.rst diff --git a/docs/source/developer/components.rst b/docs/source/developer/components.rst index d2253b49cb3a..a95afee2c672 100644 --- a/docs/source/developer/components.rst +++ b/docs/source/developer/components.rst @@ -9,4 +9,57 @@ to life their own visions of what a computational environment should look like. The JupyterLab repository has `many examples `_ -to get you started. \ No newline at end of file +to get you started. + +The ``examples`` directory contains: + +- several stand-alone examples (``console``, ``filebrowser``, + ``notebook``, ``terminal``) +- a more complex example (``lab``). + +Installation instructions for the examples are found in the project's +README. + +After installing the jupyter notebook server 4.2+, follow the steps for +installing the development version of JupyterLab. To build the examples, +enter from the ``jupyterlab`` repo root directory: + +:: + + jlpm run build:examples + +To run a particular example, navigate to the example's subdirectory in +the ``examples`` directory and enter: + +:: + + python main.py + +Dissecting the 'filebrowser' example +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The filebrowser example provides a stand-alone implementation of a +filebrowser. Here's what the filebrowser's user interface looks like: + +|filebrowser user interface| + +Let's take a closer look at the source code in ``examples/filebrowser``. + +Directory structure of 'filebrowser' example +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The filebrowser in ``examples/filebrowser`` is comprised by a handful of +files and the ``src`` directory: + +|filebrowser source code| + +The filebrowser example has two key source files: + +- ``src/index.ts``: the TypeScript file that defines the functionality +- ``main.py``: the Python file that enables the example to be run + +Reviewing the source code of each file will help you see the role that +each file plays in the stand-alone filebrowser example. + +.. |filebrowser user interface| image:: filebrowser_example.png +.. |filebrowser source code| image:: filebrowser_source.png diff --git a/docs/source/developer/examples.rst b/docs/source/developer/examples.rst deleted file mode 100644 index b93c932a9acb..000000000000 --- a/docs/source/developer/examples.rst +++ /dev/null @@ -1,56 +0,0 @@ -Examples --------- - -The ``examples`` directory in the JupyterLab repo contains: - -- several stand-alone examples (``console``, ``filebrowser``, - ``notebook``, ``terminal``) -- a more complex example (``lab``). - -Installation instructions for the examples are found in the project's -README. - -After installing the jupyter notebook server 4.2+, follow the steps for -installing the development version of JupyterLab. To build the examples, -enter from the ``jupyterlab`` repo root directory: - -:: - - jlpm run build:examples - -To run a particular example, navigate to the example's subdirectory in -the ``examples`` directory and enter: - -:: - - python main.py - -Dissecting the 'filebrowser' example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The filebrowser example provides a stand-alone implementation of a -filebrowser. Here's what the filebrowser's user interface looks like: - -|filebrowser user interface| - -Let's take a closer look at the source code in ``examples/filebrowser``. - -Directory structure of 'filebrowser' example -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The filebrowser in ``examples/filebrowser`` is comprised by a handful of -files and the ``src`` directory: - -|filebrowser source code| - -The filebrowser example has two key source files: - -- ``src/index.ts``: the TypeScript file that defines the functionality -- ``main.py``: the Python file that enables the example to be run - -Reviewing the source code of each file will help you see the role that -each file plays in the stand-alone filebrowser example. - -.. |filebrowser user interface| image:: filebrowser_example.png -.. |filebrowser source code| image:: filebrowser_source.png - diff --git a/docs/source/index.rst b/docs/source/index.rst index cb068f4d272f..96b9a6c3b503 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -59,7 +59,6 @@ JupyterLab is the next-generation web-based user interface for Project Jupyter. developer/patterns developer/css developer/virtualdom - developer/examples developer/ui_helpers developer/terminology developer/extension_tutorial