jupyterlab-contrib/rise

Best way to hide code cells?

Opened this issue · 2 comments

Description

Is there an easy way to hide code cells in the generated RISE slides?

In the notebook version there are plugins to hide all code cells with the 'hide-input' tag, which also makes them invisible in the RISE slides.

I tried doing the same in jupyter lab. Eg. the jupyterlab-hide-code does hide the code cells in jupyter lab, but they are still visible in the jupyterlab-rise slides.

Is there a known solution on how to do this?

Reproduce

Create any notebook with code cells and set the 'hide-input' tag.
The code cells are not hidden in Jupyter Lab but not in the RISE slides, see screenshot:

Screenshot 2023-03-14 at 22 50 23

I think it would be ideal if there were a hide_code boolean in the cell metadata which you could easily toggle with a dropdown in the Property Inspector similar to how you can already do with Slide Type - e.g.

{
    "trusted": true,
    "execution": {
        "iopub.status.busy": "2023-11-10T04:41:22.157874Z",
        "iopub.execute_input": "2023-11-10T04:41:22.158409Z",
        "iopub.status.idle": "2023-11-10T04:41:22.166432Z",
        "shell.execute_reply.started": "2023-11-10T04:41:22.158409Z",
        "shell.execute_reply": "2023-11-10T04:41:22.164817Z"
    },
    "editable": true,
    "slideshow": {
        "slide_type": "fragment",
        "hide_code": true
    },
    "tags": []
}

Hi! Any news on this?
I can't find any way to make this work, which is a pity because this tool is otherwise really neat.