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
Add expand/collapse support for long output elements like stdout and tracebacks #1513
Comments
I definitely agree that we probably want a better UI for collapsing of the output cells. But this will be very simple to pull off using plain old jquery - I don't think we need to worry about using plugins. The only difficult part is designing a UI that is clean and simple. |
What do you think of using this snippet: http://jsfiddle.net/RKsEm/ ? It's the simplest I could find, that uses jquery but isn't an extra full-blown plugin... |
We should just write our own code for this - it is pretty simple stuff On Thu, Mar 22, 2012 at 4:34 PM, Fernando Perez
Brian E. Granger |
yup, I also don't think buttons are the way to go in text areas... the snippet I linked to is actually tiny and an easy starting point, it shows the right jquery calls to do the expand/collapse. |
i think this an approach addressing this issue has now been merged into trunk, ff0f5cd |
y |
When cells produce very long strings of stdout, it would be better to present the output eliding the middle section and replacing that with an element that can be clicked to expand the whole thing:
For reference, the code that inserts the stdout elements is here.
Another place where similar functionality would be useful is in tracebacks: instead of flattening the whole traceback out, we could show only the bottom frame and offer a widget to expand the others only on request.
I looked around for options on how to best do this, and found a few options that range from simple snippets of JS we can add to using jquery plugins. This one seems like a reasonably simple one that doesn't add a ton of code for us.
I'd like some feedback from @ellisonbg and @minrk who know the JS code better than I, before starting to implement anything directly. Ultimately we may want to go with a more featureful solution if it looks like we're going to reuse this in several places, but if not I can cook something up quickly with the one linked above. Note: there are a ton of these online, so I'm happy to use another if anyone has a principled preference.
The text was updated successfully, but these errors were encountered: