jupyterlab-contrib / rise

RISE: "Live" Reveal.js JupyterLab Slideshow Extension
BSD 3-Clause "New" or "Revised" License
196 stars 18 forks source link

No Cell Toolbar View; All slides end up on Same Page #45

Open drscotthawley opened 1 year ago

drscotthawley commented 1 year ago

Description

This is a pair of issues together.

  1. There is no View > Cell Toolbar option as is expected in RISE
  2. Opening a saved RISE notebook file and selecting View > Render as Reveal Slideshow results in all cells that had been designated as slides opening on the same screen together, i.e. no slide divisions.

(3.) Re. point 1, There are no usage instructions to describe how to use this, differently from the original RISE.

Reproduce

I would have tried to use your examples/README.ipynb as an example but it refuses to load.

  1. Go to View.
  2. Try to click on Cell Toolbar
  3. Search README for any usage instructions or links to additional documentation
  4. Try to load examples/README.ipynb
  5. See error File Load Error for README.ipynb Unreadable Notebook: README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">

Alternatively,

  1. Try to load an existing .ipynb slideshow
  2. Go to View > Render as Reveal Slideshow
  3. See that separate slides are all appearing run together on one page.

Expected behavior

Context

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-08-28 10:52:22.122 ServerApp] nbclassic | extension was successfully loaded. [I 2023-08-28 10:52:22.123 ServerApp] notebook | extension was successfully loaded. [I 2023-08-28 10:52:22.124 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded. [I 2023-08-28 10:52:22.124 ServerApp] The port 8888 is already in use, trying another port. [I 2023-08-28 10:52:22.125 ServerApp] Serving notebooks from local directory: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides [I 2023-08-28 10:52:22.125 ServerApp] Jupyter Server 2.7.0 is running at: [I 2023-08-28 10:52:22.125 ServerApp] http://localhost:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198 [I 2023-08-28 10:52:22.125 ServerApp] http://127.0.0.1:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198 [I 2023-08-28 10:52:22.125 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2023-08-28 10:52:22.129 ServerApp]

To access the server, open this file in a browser:
    file:///Users/myusername/Library/Jupyter/runtime/jpserver-95878-open.html
Or copy and paste one of these URLs:
    http://localhost:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198
    http://127.0.0.1:8889/tree?token=14396e73445b3f3520a7ce61fb97a560224b301e701a2198

[I 2023-08-28 10:52:22.345 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server [W 2023-08-28 10:52:32.994 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237952904 (::1): Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells"> [W 2023-08-28 10:52:32.994 ServerApp] wrote error: 'Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it\'s missing a key: cells">' Traceback (most recent call last): File "/Users/myusername/envs/blog/lib/python3.11/site-packages/tornado/web.py", line 1786, in _execute result = await result ^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/handlers.py", line 121, in get model = await ensure_async( ^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_core/utils/init.py", line 182, in ensure_async result = await obj ^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 889, in get model = await self._notebook_model(path, content=content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 842, in _notebook_model nb = await self._read_notebook( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/fileio.py", line 385, in _read_notebook raise HTTPError( tornado.web.HTTPError: HTTP 400: Bad Request (Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">) [W 2023-08-28 10:52:32.996 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237952904 (e6894431b71d4e1881a74396ce7c5df3@::1) 10.37ms referer=http://localhost:8889/tree [W 2023-08-28 10:52:34.422 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237954411 (::1): Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells"> [W 2023-08-28 10:52:34.422 ServerApp] wrote error: 'Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it\'s missing a key: cells">' Traceback (most recent call last): File "/Users/myusername/envs/blog/lib/python3.11/site-packages/tornado/web.py", line 1786, in _execute result = await result ^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/handlers.py", line 121, in get model = await ensure_async( ^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_core/utils/init.py", line 182, in ensure_async result = await obj ^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 889, in get model = await self._notebook_model(path, content=content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/filemanager.py", line 842, in _notebook_model nb = await self._read_notebook( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myusername/envs/blog/lib/python3.11/site-packages/jupyter_server/services/contents/fileio.py", line 385, in _read_notebook raise HTTPError( tornado.web.HTTPError: HTTP 400: Bad Request (Unreadable Notebook: /Users/myusername/Dropbox/Teaching/DL_AIE_3895/slides/README.ipynb <ValidationError: "Notebook could not be converted from version 1 to version 2 because it's missing a key: cells">) [W 2023-08-28 10:52:34.423 ServerApp] 400 GET /api/contents/README.ipynb?type=notebook&content=1&1693237954411 (e6894431b71d4e1881a74396ce7c5df3@::1) 3.29ms referer=http://localhost:8889/notebooks/README.ipynb

Web Browser Output
Paste the output from your browser web console here.
nthiery commented 1 year ago

Hi @drscotthawley,

  1. To edit the rise cell metadata, you can use the property inspector in the right jupyterlab toolbar. This is indeed deviates from the original rise in Jupyter notebook, but is consistent with how jupyterlab gives access to cell metadata for other purposes. Once you have discovered it, it's fairly natural.

  2. I did not manage to reproduce. My slides appear properly separated. Could you provide an example notebook, or a screencast?

As a heavy rise user, I am already grateful that something is starting to exist. But there is indeed still a long way to go, including for documentation.

surfaceowl commented 1 year ago

@drscotthawley -- same thing happened to me after creating a new notebook with versions below. The current version of RISE installs with the "slide type" attribute of each cell defaulted to null (actually it's "-"). As a result, all the cells appear on the same page when you run RISE. The trick is to 1) click on the icon of small gears for each notebook cell (see red arrow in image below), 2) look under "common tools" immediately to the left of the small gears, then 3) find the "slide type" drop down box and change it to "slide" (or whatever other choice is right for that cell.
The versions I used are: jupyterlab==4.0.6 jupyterlab-rise==0.41.0

screenshot image

@nthiery -- would be great to document maybe just on the Readme for now, since the interface is so different from older RISE versions running in notebook.

Here is result image

ibgp2 commented 8 months ago

@surfaceowl Thanks, your message helps a lot, because finding this menu isn't very natural!

Please also note some RISE shortcuts also works:

Note that if this cell is a "slide", Shift-i does not revert a cell to "-" (rise 5.7.1, jupyterlab_rise 0.42.0, jupyterlab 4.1.4). I don't know whether there is a shortcut to set a cell to "-", so currently, I use the "gear" icon in the right panel.