Code folding broken in 4.0.0a28+?

Hi, is that only me or is code folding broken in the recent jupyter lab pre-releases? I didn’t find an issue, though.

If I activate code folding in the new settings editor (Notebook->Code Cell Configuration->Code Folding), the extra bar left of the code cell (where the triangles are supposed to appear) is there, but no triangles to let me collapse functions.
Peek 2022-10-15 15-42

Hi there,
is there any advance on this topic. It does not seem to work on v4.0.8 still?

This issue was reported on GitHub in Code folding is broken · Issue #13362 · jupyterlab/jupyterlab · GitHub and fixed by Use tokens to extend CodeMirror editors by fcollonval · Pull Request #13639 · jupyterlab/jupyterlab · GitHub. It works for me in v4.0.8.

@juhuebner can you please double check that you tick the Code Folding in Notebook rather than in Text Editor section? If so, can you post a screecast/gif?

1 Like

The Code Folding is ticked in the Notebook section:

I use Notebook v7.0.6 the same happens in jupyterlab 4.0.6

The banner appears but no triangle or anything else clickable
image

1 Like

Does it still happen in jupyterlab 4.0.8?If so, can you open a new issue with as many details as possible (see the issue template in jupyterlab github repository).

Your screenshot does not show a function or class to be folded. Is there a triangle when you try:

def test():
     pass
1 Like

Yes, indeed there is now. I was looking for a button or similar which could collapse the whole cell - like it works for Markdown cells.

Did you try pressing the blue strip to the left of the cell?

1 Like

Yes, indeed this works.
Is there actually a way in (nearly) completely supressing the display of any code input, i.e., for getting a nice presentation direct from within jupylab (e.g., via deathbeds/jupyterlab-deck: Lightweight presentations for JupyterLab (github.com))?

Yes, the Voila renderig of a Jupyter notebook doesn’t display the underlying code. Be sure to check out the Voila Gallery and the underlying .ipynb file for each.

For the older Jupyter Notebook, now NbClassic, there was Appmode before Voila came along.