Activate Codefolding on Binder

First to follow-up on something you said in your original post.

Current JupyterLab, which was the first image you posted, has code folding ability built-in by default. To fold a cell:
Click on a code cell to highlight it as active and then click on the blue bar to the left. The code cell will ‘fold’ and be represented by three dots where the code cell was previously. You can ‘unfold’ it by clicking on the dots or on the blue bar again.
If you’d like to see the behavior in the current version, go to Try Jupyter, and click on Try JupyterLab in the center top row. A good notebook to open to try it is the ‘Lorenz.ipynb’ file you’ll see listed on the left after the sessions spins up. (At least that is presently what happens; I think it used to open an example notebook automatically after the session started and perhaps that will return.)

Yes, there is a way to open a Binder session launched via the MyBinder.org system with any interface you choose that is installed. The approach is to specify the correct URL and present that to the user.

By default, both the classic notebook interface and JupyterLab are installed and ready to use in MyBinder-launched sessions.
For opening with the classic notebook interface, you need to edit the URL that is now generated by using the form on the MyBinder.org page. It formerly defaulted to generating a link for the classic notebook interface; however, now the default is to open the more modern and full-featured JupyterLab from the links generated by that form. It remains possible though to edit the URL provided after filling out the form there to the pattern that will specify launching the classic notebook interface.
In summary, to do this you take what the form on the MyBinder.org page gives you for a link to a specific notebook and change the ?labpath= part to read ?filepath=.
NOTE that the basis of this approach had been discussed in-depth in as series of replies here, although now the default URL currently displays ?labpath=. And so you switch labpath to filepath at present. (There were some issues to work out when that original series of posts of the new way to specify the classic interface. Unfortunately, I can no longer edit my posts there.)
In fact, the README there has a number of examples of opening with various interfaces by editing the URL that the MyBinder.org site provides by default at the present time. (Note there are some ways that still work to preserve various ‘legacy’ paths so you may notice there’s some variations on that page, but some of the shortest ways possible now are featured in the approach described first in this reply.)

3 Likes