New interact sliders

4 views
Skip to first unread message

Pat LeSmithe

unread,
Sep 17, 2009, 11:39:53 PM9/17/09
to sage-...@googlegroups.com
I've attached a snapshot of the default sliders provided by the new
jQuery UI spkg, available at

http://trac.sagemath.org/sage_trac/ticket/5447

(An active slider is orange.) Also attached: Shots of custom sliders
with thin and thinner handles. Which, if any, do you prefer?

slider_new.png
slider_new_thin.png
slider_new_thinner.png

William Stein

unread,
Sep 18, 2009, 12:14:05 AM9/18/09
to sage-...@googlegroups.com
I think I personally prefer the middle one.

William

>
> >
>



--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Maurizio

unread,
Sep 18, 2009, 2:00:30 AM9/18/09
to sage-devel
Wouldn't be better if there was some sort of triangular end which
points to the exact thick (when they are plotted)? Without them, the
slider look a bit "approximate" or "inexact" :)

Pat LeSmithe

unread,
Sep 18, 2009, 4:48:36 PM9/18/09
to sage-...@googlegroups.com
Maurizio wrote:
> Wouldn't be better if there was some sort of triangular end which
> points to the exact thick (when they are plotted)? Without them, the
> slider look a bit "approximate" or "inexact" :)

A visible "notched" guide does not appear to be a built-in option [1]:

http://jqueryui.com/demos/slider/#default

How about an optional input field tied to the slider? Then we could
sweep with a slider and fine-tune with the form. Or a spinbox-slider
combination?

It's highly unlikely I can turn to this soon, but I did find

http://code.google.com/p/jquery-spin-button/

The timeInterval option is nice. Demo:

http://dev.screw-axis.com/sandbox/jquery-spin/demo/demo1.html

How can we make it easier to extend interacts? Organize the existing
controls as plug-ins generated from Jinja templates? Distill the
existing Python classes down to a minimal required interface (callbacks,
etc.)?


[1] Other libraries *may* have more choices:

http://developer.yahoo.com/yui/
http://www.extjs.com/deploy/dev/examples/samples.html

I don't know how difficult it is to mix and match.

Jason Grout

unread,
Sep 18, 2009, 9:33:27 PM9/18/09
to sage-...@googlegroups.com
Pat LeSmithe wrote:
> Maurizio wrote:
>> Wouldn't be better if there was some sort of triangular end which
>> points to the exact thick (when they are plotted)? Without them, the
>> slider look a bit "approximate" or "inexact" :)
>
> A visible "notched" guide does not appear to be a built-in option [1]:
>
> http://jqueryui.com/demos/slider/#default
>
> How about an optional input field tied to the slider? Then we could
> sweep with a slider and fine-tune with the form. Or a spinbox-slider
> combination?


Does the old flora theme not work with the new jqueryui? Last time we
upgraded, we ended up keeping the old flora theme.

>
> It's highly unlikely I can turn to this soon, but I did find
>
> http://code.google.com/p/jquery-spin-button/
>
> The timeInterval option is nice. Demo:
>
> http://dev.screw-axis.com/sandbox/jquery-spin/demo/demo1.html
>
> How can we make it easier to extend interacts? Organize the existing
> controls as plug-ins generated from Jinja templates? Distill the
> existing Python classes down to a minimal required interface (callbacks,
> etc.)?


+1. +Whatever I can vote. It would make a huge, huge difference if it
was easy to design, combine, and layout interact controls.


Thanks,

Jason


--
Jason Grout

William Stein

unread,
Sep 18, 2009, 10:06:45 PM9/18/09
to sage-...@googlegroups.com

I think it would be utterly trivial to at least make it so the user
can layout interact controls in any way they want. Anything more
will be harder -- but just layout would be easy to implement, given a
reasonable design.

I'm all for it.

William

Pat LeSmithe

unread,
Sep 19, 2009, 1:48:51 AM9/19/09
to sage-...@googlegroups.com
Jason Grout wrote:
> Does the old flora theme not work with the new jqueryui? Last time we
> upgraded, we ended up keeping the old flora theme.

No, or at least, not well with a simple substitution. Apparently, a lot
has changed from 1.6r807svn to 1.7.2.

Jason Grout

unread,
Sep 19, 2009, 2:22:56 AM9/19/09
to sage-...@googlegroups.com


Hmmm, well, thanks for trying.

It looks like the slider handle is styled with the class
.ui-slider-handle. I suppose we could make the handle transparent and
then just put in our own background image like the flora image (or
something that matches the theme a bit better).

If that's too hard, then I vote for your middle option on your other
post. It's thick enough to give something to grab, but thin enough to
seem still precise.

Jason

--
Jason Grout

Jason Grout

unread,
Sep 19, 2009, 2:35:21 AM9/19/09
to sage-...@googlegroups.com


At the same time, I view this as a very minor issue. Since we don't
have a scale marked on the slider, there is absolutely no difference
between a thick slider and a thin slider. You still have to watch the
numbers to the side of the slider and there is no different response
between thick and thin sliders.

If we had a scale marked on the slider, then I could see being able to
precisely point the slider at a specific spot on the scale being more of
an issue.

Personally, I'd much rather you spend your time on getting images in the
documentation. That would make a much bigger difference to me and lots
of my students.

So I vote for the middle thickness and be done with it :).

Michael Brickenstein

unread,
Sep 21, 2009, 2:26:26 AM9/21/09
to sage-devel

> [1] Other libraries *may* have more choices:
>
> http://developer.yahoo.com/yui/http://www.extjs.com/deploy/dev/examples/samples.html
>
> I don't know how difficult it is to mix and match.

JQuery (in the compatibility mode) and dojo have a good reputation for
mixing with other libraries.
Other libraries like prototype and mootools are considered to be more
problematic.
Cheers,
Michael
Reply all
Reply to author
Forward
0 new messages