deathbeds / jupyterlab-deck

Lightweight presentations for JupyterLab

Home Page:https://jupyterlab-deck.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add code buttons

bollwyvl opened this issue · comments

Elevator Pitch

  • Offer a way to
    • collapse a code cell into a button with the cell's name metadata as a label, which runs the code cell
    • optionally offer a split button which would reveal the code editor

Motivation

Some code cells might be distracting, when the output is really what's wanted.

Design Ideas

As the name field isn't promoted anywhere, this would need to be in:

  • a property in the jupyterlab-deck metadata namespace
  • a new claimed tag

Either way, as the tag ui isn't very good for discovery of additional tags at present, this would be separate activity anyway.

┌─────────────────────┬─────┬─┐ 
│ ▶ frob the bozz     │ ... │▿│
└─────────────────────┴─────┴─┘

Running the main button would change color and icon:

┌─────────────────────┬─────┬─┐ 
│ ◔ frob the bozz     │ ... │▿│
└─────────────────────┴─────┴─┘

And some more tags would control whether:

  • output is shown/hidden/streamed by line

Ideally, successive, buttonized cells would stack up horizontally.

This might already be almost possible with styles, though there's probably no way to get the cell name out...