Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow input cells to be collapsed #1340

Closed
Carreau opened this issue Jan 29, 2012 · 14 comments
Closed

Allow input cells to be collapsed #1340

Carreau opened this issue Jan 29, 2012 · 14 comments
Labels
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Jan 29, 2012

Open this issue as a reminder that we should implement different kind of cell folding at input/output level or higher section. see #1300)

@thpfaff
Copy link

thpfaff commented Apr 20, 2012

+1 from me.
It would be very nice to be able to hide input cells (while leaving the output visible) to transform a notebook into a pure report, for example.

@ivanov
Copy link
Member

ivanov commented Jul 6, 2012

I'm +1 on this as well. I like the ability of collapsing output cells that we already have merged in trunk, and don't see any reason why such functionality shoudn't extend to the code cells themselves. You can imagine having a quite involved (long) code cell that happens to get in the way of the text description that lives in a markdown cell above it, and the output of the figures generated below it.

@tmbdev
Copy link

tmbdev commented Aug 4, 2012

Almost every notebook of my about two hundred notebooks right now is intended for documentation, and all the preliminaries etc. at the top are a major eyesore and distracting to the reader. Every time I write the explanation, I end up writing an apology for having to start with that junk. I think this issue should have higher priority.

(On the other hand, I'm not sure whether hiding is the right solution in all cases. Actually, it might be nicer to be able to have a bit more support in iPython notebooks for "literate programming", so that I can put an entire section of code that Python needs at the beginning at the end.)

@wking
Copy link
Contributor

wking commented Feb 3, 2013

This seems like it would be useful for cued reveals (#2832). Can anyone familiar with the code base give an updated feasibility report (e.g. have the CodeMirror issues been worked out)?

@Carreau Carreau closed this as completed Feb 6, 2013
@caoimhinp
Copy link

Why was this closed? Was this just abandoned?

@ellisonbg
Copy link
Member

We have decided to not implement this feature in the live notebook itself.
It will be present in nbconvert and possibly in nbviewer though, where
viewing is more the purpose. We will however be adding the ability to
collapse/show full cells and sections of notebooks in the live notebook.

On Mon, Jul 1, 2013 at 8:52 AM, caoimhinp notifications@github.com wrote:

Why was this closed? Was this just abandoned?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1340#issuecomment-20290863
.

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@ruffsl
Copy link

ruffsl commented Feb 5, 2014

@ellisonbg, will the ability you reference allow for hiding code while live editing?
I suppose I'm a little confused as to what was decided.

One of the nice things I enjoy using with Wakari's current version, is that it allows me to toggle all the inputs cells and help me view and focus on just my writing and commenting in markdown and easily see the flow of figures and data I present.
toggle code

@ellisonbg
Copy link
Member

We are thinking more about hiding different elements of the page and trying to figure out how to do this in the best way in the live notebook and on nbviewer/nbconvert. I can't make any promises about exactly what will or won't be supported within IPython versus extensions, but we are thinking about it.

@spearsem
Copy link

I'm +1 for hideable input cells. One application is to launch a notebook as if it is a web-app, particularly with the interactive widgets. If the output cell is a plot with GUI controllers, then I don't need the input cell any more as long as the kernel has the code executed from the input cell available (for the widgets to target).

If this feature existed, it would be easy to do some metaprogramming on a .py file that was destined to be an input cell. You could programmatically build the notebook with that input cell, execute it to get the output cell, then collapse it, then launch the browser page.

In the widget example, it means I could "script" a web app from Python by writing some code to generate an interactive plot. Then when I launch it, the only thing that appears is that plot itself (no input cell) yet it can still be controlled via the widgets.

This would be a great feature, and it needs to be part of the live notebook proper, not converted notebooks, since it is still about executing live code (in my example, through the widgets).

@NathanielCapital
Copy link

A clean solution to print out all out puts session/markdown session with input hiding would be really nice!++1 for this feature.

@gabegaster
Copy link

+1 for this feature. Sometimes you just want a graph to illustrate a point -- but not to illustrate the code. Other times you want to make the point with the code.

@JohnOmernik
Copy link

@ellisonbg You wrote "We have decided to not implement this feature in the live notebook itself. It will be present in nbconvert and possibly in nbviewer though, where viewing is more the purpose. We will however be adding the ability to collapse/show full cells and sections of notebooks in the liv"

Why is this? I feel this is looking at iPython vs nbconvert through a narrow lens. If you look at iPython as a place to do work, there are many cases where you want to put some code in, maybe only show 1 line (the top line so you have a reminder of what's there) and then collapse the rest. Maybe you have a large text JSON file you want to push into a variable etc. you can put it into your variable, execute the code, then collapse it so you can get on to the work of manipulating it. This way the data is there, and anyone can open it back up, but now you are not scrolling through two pages of stuff to get to your "work"

@Carreau
Copy link
Member Author

Carreau commented Feb 19, 2015

@walterdalton can we chat privately ? On gitter ?

@marcopritoni
Copy link

+1 . Collapsing all inputs would be a very useful feature. I use IPython to work on data with interactive widgets. When I show the page to other non-coders, they get confused.

@ipython ipython locked and limited conversation to collaborators Jun 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests