[IPython-dev] Feasilibity of widgets/layout for mimicking this
Brian Granger
ellisonbg at gmail.com
Wed Aug 20 19:25:48 EDT 2014
The need to do the messy add_class stuff after they are on the page
will go away. We have new HBox and VBox classes that automatially do
the layouts. That is the "great new stuff".
Glad you got this far!
On Wed, Aug 20, 2014 at 6:15 PM, Nicholas Bollweg
<nick.bollweg at gmail.com> wrote:
> Didn't see this when it was posted (and then didn't see cyrille's and
> brian's posts until just now! curse you gmail!), but in the meantime, hacked
> this together:
>
> http://nbviewer.ipython.org/gist/anonymous/840b5cec9e19f3e39090
>
> Screenshot:
>
> http://i.imgur.com/wP3VmWK.png
>
> Obviously lots of room for improvement, but I think you can see you can be
> very successful without writing any javacript at all.
>
> There are some tricks: add_class and remove_class only happen to something
> that is actually on the page.
>
> As for wrapping it all: you'll end up exposing:
>
> a function that returns the dialog widget
> a function something that handles the add_remove class cleanup
>
> it might be fixed in the new stuff
>
> a function that will do both of the above and actually call
> IPython.display.display
>
> this should also return the widget, in case people want custom handlers, I
> guess?
>
> As Brian says, though: really some great stuff coming up!
>
>
> On Wed, Aug 20, 2014 at 4:15 AM, Cyrille Rossant <cyrille.rossant at gmail.com>
> wrote:
>>
>> Hi Adam,
>>
>> I'll do a tutorial about IPython widgets at EuroSciPy in a week [1].
>> I'm notably planning to demonstrate how to build, in the notebook, a
>> GUI like the one you showed. I'll put here the link to the GitHub repo
>> when everything's ready.
>>
>> Best,
>> Cyrille
>>
>> [1] https://www.euroscipy.org/2014/schedule/presentation/60/
>>
>> 2014-08-17 19:54 GMT+02:00 hugadams <hughesadam87 at gmail.com>:
>> > (Please disregard if doublepost; having some subscription issues)
>> >
>> > Hello,
>> >
>> > We are developing a spectroscopy library and want to put in some
>> > interactive
>> > plots/utilities to make the software a bit more approachable to novices.
>> > I'd really like to build the entire interactive plotting interface
>> > through
>> > the notebook's new widget system. My reasoning is as follows:
>> >
>> > - All static plots are already matplotlib-based, so we wouldn't have
>> > to
>> > write a seperate plotting api
>> > - Notebooks are inherently browser-ready, so sharing plots would be
>> > great
>> > - Is it likely that static nbviewer will eventually support
>> > widgets? Since the data is required, I figured not...
>> > - Our tutorials are already in notebooks, so we'd like to be
>> > consistent.
>> >
>> > I've watched all the videos I can find from the widgets, and think I'm
>> > fine
>> > with the Python end; however, am finding it hard to come by lots of
>> > information on controlling the layout of the widgets. I know it's
>> > mostly
>> > done in javascript, and I think the most complex view we will have will
>> > look
>> > something like this:
>> >
>> > https://sites.google.com/site/shigemorita/home/2dshige
>> >
>> > How much time would you estimate a javascript novice ought to spend on
>> > getting something like that in the notebook? Can anyone share tutorials
>> > for
>> > the layout portion of the widget API? Any information is helpful.
>> > Lastly,
>> > does anyone have any hacky ideas of how to bury the source code so that
>> > the
>> > widgets merely display, rather than the user copy/pasting the widget
>> > source
>> > into a cell?
>> >
>> > Thanks
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
--
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger at calpoly.edu and ellisonbg at gmail.com
More information about the IPython-dev
mailing list