Improvement idea: edit cells with pop-up, overlay editor

Consider an alternative way of editing cells.

The way things jump around on the screen when you click on the right side to edit a cell is disorienting.

Consider e.g. a pop-up editor so that the content I’m editing doesn’t move on the screen.

The simplest option is how editing in this forum (Discourse) works i.e. the editor opens at the very bottom.

Another example is what Gmail does when you click ‘Compose’. The editor opens as overlay, existing content on the page

A more sophisticated would be to pop-up edit window sized and placed intelligently somewhat overlapping the rendered cell content.

The idea is that we want to show the correlation between the two but when we’re editing a cell, we don’t need to see most of rendered version of the cell.

The thing I would recommend adding is a new link to collapse a cell which appears exactly in the place where the link to expand the cell had been (and move the “pin” link below or next to that one). That is, instead of (or in addition to) having collapse next to the cell’s content, put the collapse link on the cell editor.

It would be nice if I could click multiple times in the same place on screen and have the cell repeatedly collapse and expand, without needing to move my mouse (and possibly scroll way down) between clicks. The link could possibly just be a little icon, in which case it wouldn’t be precisely the same hit target as the expand link when that one is a name, but would at least still be nearby and clicking at the right end of the word would leave the mouse in place to click the collapse link.

This would make expanding a cell have lower overhead/friction and make me more willing to try reading cells in the middle of a long notebook.

We are internally beta-testing a tweak to the user interface that moves the source code for a cell below the cell’s output rather than above. This change makes toggling the visibility of the source less disruptive because it doesn’t affect the output of the cell. The risk is that it will be more confusing for Jupyter (and REPL) users who are accustomed to seeing code-above-output.

We are also considering a floating editor, but having only a floating editor would be clumsy with many small cells. It’d be nice to pop-out an individual cell for more dedicated editing, though. You can achieve a similar effect today by opening your notebook in multiple tabs, since your edits are synchronized in real time; if you want the more traditional feel of separate columns of code and output, you can also use “safe mode” by adding “/safe” to the URL or choosing the menu option from your list of notebooks.

Even though we’re still in beta, we are also trying to minimize disruption by avoiding unnecessary changes. We’re continuing to experiment and we will release improvements to the user interface as soon as we’re confident in them.

Personally I would prefer keeping code above the output; that’s not only how REPLs work, it’s also basic storytelling: cause → effect. YMMV.

1 Like