Closed nthiery closed 9 months ago
I've been looking into this issue and am hoping to get pointed in the right direction.
As a disclaimer, I'm new to JupyterLab extensions so my terminology could be very off.
Environment:
jupyter_client 7.4.9
jupyter_core 5.3.1
jupyter-events 0.7.0
jupyter-lsp 2.2.0
jupyter_server 2.10.0
jupyter_server_fileid 0.9.0
jupyter-server-mathjax 0.2.6
jupyter_server_terminals 0.4.4
jupyter_server_ydoc 0.8.0
jupyter-telemetry 0.1.0
jupyter-ydoc 0.2.5
jupyterhub 4.0.2
jupyterlab 4.0.8
jupyterlab_git 0.42.0
jupyterlab-pygments 0.2.2
jupyterlab_rise 0.41.0
jupyterlab_server 2.25.0
jupyterlab-widgets 3.0.9
Here is what I found so far:
For example if I create a notebook with a single empty cell, open it in RISE, change the cell's contents to print("test")
, and then save with Cmd+s
, the JupyterLab API PUT request shows the cell source as empty (shown below). Running the cell outputs nothing and the cell edit is not shown in the original notebook.
Contents of PUT request to http://127.0.0.1:8888/api/contents/examples/issue-43.ipynb?1699395590087:
{"name": "issue-43.ipynb", "path": "examples/issue-43.ipynb", "last_modified": "2023-11-07T22:19:50.127128Z", "created": "2023-11-07T22:19:50.127128Z", "content": {"cells": [{"cell_type": "code", "execution_count": null, "id": "86e79d67-836a-4d98-8ac5-441c84ef1a3d", "metadata": {"trusted": true}, "outputs": [], "source": ""}], "metadata": {"kernelspec": {"display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5"}}, "nbformat": 4, "nbformat_minor": 5}, "format": "json", "mimetype": null, "size": 617, "writable": true, "type": "notebook"}
Which seems to indicate the notebook the slides are generated from is not listening to changes in cell content or the cells themselves do not recognize when their content changes, which may be the case as the jp-mod-dirty
CSS class is also not added by a cell when edited.
However if I add a new cell, delete, or split a cell, and then save, the original notebook will show that change.
I tried commenting out all of the code that turns a NotebookPanel into a Reveal slideshow in packages/application/src/plugins/rise.ts
so that RISE essentially just opens a regular notebook (i.e. just docmanager.open
and then app.shell.add
), but the same issue occurs so likely none of the Reveal related code is the cause.
I thought maybe the RISE server extension, but it seems there weren't any major differences between the 0.3.x branch (which appears to not have this issue with JupyterLab 3.6.6) and the main branch in terms of the server extension.
I did notice this error in the console which may or may not be relevant:
index.js:225 Error: Shared module codemirror doesn't exist in shared scope default
at l (remoteEntry.265228b546125022c5c6.js:1:6646)
at remoteEntry.265228b546125022c5c6.js:1:7688
at remoteEntry.265228b546125022c5c6.js:1:7596
at 8681 (remoteEntry.265228b546125022c5c6.js:1:10005)
at remoteEntry.265228b546125022c5c6.js:1:10786
at Array.forEach (<anonymous>)
at x.f.consumes (remoteEntry.265228b546125022c5c6.js:1:10616)
at remoteEntry.265228b546125022c5c6.js:1:1174
at Array.reduce (<anonymous>)
at x.e (remoteEntry.265228b546125022c5c6.js:1:1152)
Thanks!
Description
When editing a cell in slides mode, the edits appear in edit mode but are ignored upon rendering (for a markdown cell) or execution (for a code cell)
Reproduce
41+1
(or any other value that wasn't already there)Expected: 42 appears as output Obtained: the previous output is displayed
Foo
in a markdown cell (or any other text that wasn't already there)Expected: Foo appears in the rendered cell
Obtained: the previous content of the cell is rendered
Context
Extension version:
(jupyterhub-paris-saclay-test) ➜ image git:(master) ✗ jupyter server extension list Config dir: /home/nthiery/.jupyter
Config dir: /opt/mambaforge/envs/jupyterhub-paris-saclay-test/etc/jupyter jupyter_lsp enabled
_jupyter_server_extension_points
function was not found in jupyter_lsp. Instead, a_jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. jupyter_lsp 2.2.0 OK jupyter_server_terminals enabled_jupyter_server_extension_points
function was not found in notebook_shim. Instead, a_jupyter_server_extension_paths
function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. notebook_shim OKConfig dir: /usr/local/etc/jupyter
Command Line Output
No specific message in the web console.