feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Expand/Collapse multiple cells to make pages more manageable

Open kalmdown opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe.

  1. Complex vis get long, especially if you break down the parts into their own cells. Want to hide parts that work.
  2. Would like to put in interactive elements that users can update but don't need to into sections that can be collapsed.
  3. Tend to have a number of debugging cells that I'd like to keep around but get out of the way unless there is a problem.

Describe the solution you'd like Would like a way to collapse multiple cells. Something like an ability to mark a markdown header as collapsible and then have all of the cells to the next header collapse.

kalmdown avatar Oct 18 '21 17:10 kalmdown

In a way this is asking for ways to group cells together into functional groups, and then be able to treat them as a class in some way like "hide", "fix to the top", "bold"

triptych avatar Oct 19 '21 21:10 triptych

Been creating a lot of notebooks, and I would be happy with just a single cutoff point per notebook, i.e. "Collapse/hide below this line".

Basically, in every notebook you will have "Source code" cells, which are not useful for consuming the data/content or using the inputs/dashboard. Typically I move those to the bottom of the notebook so they are out of the way. But it would be even better if I could just collapse all of them. External viewers (and the future me) would immediately know what they have to care about, and remove all the clutter and mental load from view. I would also not need to tag individual cells to show/hide.

Here's a good example: just let me collapse everything under "Source" by default here: https://observablehq.com/@jerryjappinen/xyz-hypothesis

You could implement this as a separate cell type, so I could just add section breaks into the notebook where I see fit. Or maybe a special attribute for headings (so I could just write <h2 closed>Source</h2>, for example) that would then automatically show/hide all the content below that heading.

This would make all my notebooks much more manageable and would be relatively easy to implement, I think. I just want to clean up the notebooks a little bit.

jerryjappinen avatar Sep 28 '24 09:09 jerryjappinen