GNOME Bugzilla – Bug 660324
Support lists of custom results
Last modified: 2018-07-10 22:06:25 UTC
[ Originally filed as http://www.reinteract.org/trac/ticket/73 Transcribing a suggestion from an old thread on the Reinteract group: Tero Jäntti wrote: === I like it, not because it outputs HTML, but because it presents lists nicely. I like Reinteract because it is great for experimenting things. So, what if, when receiving a list of CustomResult objects, they would all be drawn as a list. With list comprehensions, such list would be great for experimenting with different parameter values, like: [ plot( f(x, 5) ) for x in range(-5, 5) ] [ rere.search(x, 'foo') for x in ['foo', 'foo|bar', '[a-z]+'] ] That way you would immediately see which values suit best in whatever case you are doing. Better yet, drawing nested lists of CustomResults as two-dimensional tables... Although that would eat a lot of screen space. === Another possibility would be to support a list of custom results as a "slide deck" where you could page through the different results. Actually you could implement slides([ plot( f(x, 5) ) for x in range(-5, 5) ]) Right now without any changes to the Reinteract core ... it would just be a widget (GtkNotebook with or without tabs, perhaps) that embedded each all the custom result widgets and allowed selection between them.
Proof of concept patch 10/04/09 16:04:48 changed by rschroll ===================================== This patch makes lists or tuples of CustomResults be displayed. There are two modes for display, and the user may toggle between them. In the first, the widgets are displayed in a vertical list. In the second, each widget is a page in a gtk.Notebook. Some questions I have about this solution: - Should this work with general iterables, not just lists and tuples? - It only works if all elements of the list are CustomResults. Should it also support mixed lists? - Does the all() check short-circuit correctly? Otherwise, this could become a bottleneck when dealing with large arrays. - Is being able to toggle between the views helpful or confusing? - Can the toggle triangle be moved into the gutter? - Should the default view depend on the number or size of widgets?
Created attachment 197627 [details] [review] Proof of concept patch Patch from the original ticket
This could be done more easily with wrappers nowadays. If we don't want to make this the default behavior, the wrapper still could come with Reinteract for the user to enable as desired.
Reinteract is not under active development anymore and had its last code changes in early 2012: http://git.fishsoup.net/cgit/reinteract/log/ Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.