fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.91k stars 284 forks source link

Show execution order of cells #1326

Open lungben opened 2 years ago

lungben commented 2 years ago

It would be great to optionally show the execution order of cells in Pluto.

Use cases:

In order not to create too much "noise" in the notebook, the execution order could only be shown when hitting the Ctrl key (analogue to https://github.com/fonsp/Pluto.jl/pull/1144).

The cell order information is already available in the Pluto frontend (see https://github.com/fonsp/Pluto.jl/pull/891), therefore this requires only enhancements on the JS side.

disberd commented 2 years ago

Which event would you want to teigger the show of the execution order? Just pressing Ctrl would trigger it?

Also how did you think about showing it?

lungben commented 2 years ago

My first idea was to show cell numbers on the left side of each cell (analogue to Jupyter, but maybe a bit nicer) when Ctrl is pressed. Maybe with a delay for hiding them - when you release Ctrl the cell numbers are still shown for e.g. 30 seconds.

But other ideas are welcome!

kmacdough commented 1 year ago

Is there any current way to see dependency order in the Pluto UI?

If not, I'd like to push harder on this as it seems to overtly break the "simple - no hidden workspace state; friendly UI" principle of Pluto.jl. Perhaps the order can be inferred by an astute reader, but that seems neither simple nor friendly.

Have we considered showing numbers when execution is non-sequential? That would go a long way towards removing this hidden state, while minimizing unnecessary noise. I'm curious if there's any design reason for not including cell numbering currently.

Does Pluto have any sense of in-notebook "configuration"? If so, something like the following might enable both the clean & the clear use cases:

@plutoconfigure(show_cell_numbers => :always | :never | :as_needed)

EDIT: included suggestions