Ticket #73 (closed enhancement: invalid)

Opened 3 years ago

Last modified 4 months ago

Support lists of custom results

Reported by: otaylor Assigned to:
Priority: moderate Keywords:
Cc:

Description

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 liste 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.

Attachments

list.patch (3.0 kB) - added by rschroll on 10/04/09 15:54:52.
Proof of concept patch

Change History

10/04/09 15:54:52 changed by rschroll

  • attachment list.patch added.

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?

09/27/11 23:51:28 changed by otaylor

  • status changed from new to closed.
  • resolution set to invalid.