-
Notifications
You must be signed in to change notification settings - Fork 949
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
Non-jquery slider #630
Comments
👎 on native browser sliders because of absence of range sliders that are used a lot. |
nouislider seems to only be about range sliders. |
Re: the current jquery ui slider, I just wanted to communicate that there is no problem with having jquery-based widgets. |
and jquery-ui... |
nouislider has range sliders, but it's not only about range sliders... |
It might seem silly to ask, but are we cool with WTFPL? |
I looked into the license a bit. Wikipedia has a bunch of links where the FSF acknowledges it, it seems that various people (whatever that's worth) say it is basically a public domain dedication. The license author even says you can relicense work ("The WTFPL lets you relicense the work under any other license." on http://www.wtfpl.net/faq/), so even if we're not happy with it, it seems we can change the license and maintain a fork. |
This would also probably fix #655. |
Apparently, new HTML specs have a "multiple" attribute for range sliders, and there is a polyfill: http://leaverou.github.io/multirange/ |
@jasongrout the one-value HTML5 sliders works well and seems to be pretty well supported across the board. I started working on this in the plane for Austin. However this will probably require us to have a well-separated view for the range... |
@SylvainCorlay Do you think it makes sense for me to try out this multirange polyfill for the native HTML slider? Another thing to consider: If we are going to replace the jQuery slider with a native one, should we not do the same for Dropdowns and Progress widgets? If so, then I think it would make sense to address the
roadmap item at the same time and implement a consistent style across both native and non-native elements. |
Additional option -- ion.rangeSlider. Supports both single and range slider modes. More demos from shiny. |
Just saw this announcement about changes in the jquery-ui infrastructure going forward: http://blog.jqueryui.com/2017/12/the-future-of-jquery-ui-and-jquery-mobile/ I think that's another thing in favor of finding an alternative. |
It looks like nouislider is now licensed MIT, as of about a month ago. |
A brief search still turned up these viable alternatives:
plus there are libraries like blueprintjs, etc. |
As a part of the January 2020 meeting (#2641), we discussed the alternatives listed above, in addition to building our own implementation. The main considerations were keeping the slider as simple as possible - with range slider support, and reducing dependencies such as JQuery and JQuery-UI. Below is a brief summary of all alternatives considered, including pros and cons:
We voted in favour of noUiSlider as it has no dependencies, and although it is quite feature-packed, we can expose only a part of the API which will keep functionality in line with what is currently available. We also agreed that, if needed, migration from noUiSlider to any custom implementation should be relatively simple in the future and won't require a major release. |
@jasongrout @SylvainCorlay @jtpio @mbektasbbg @vidartf @pbugnion @martinRenou |
@ibdafna - can you list the other alternatives we considered, perhaps with a brief summary of the discussion about each? |
Thanks, @jasongrout - I have added this to my comment above! |
Does anybody have an opinion re: |
As far as I can tell, interact.js is not a slider per se, but a library unifying touch and mouse events on top of which a slider could be built. Are you asking if we've thought about building our own slider on top of something like interact.js? |
Yes. One of their examples is how you would implement a slider. It seems a bit higher level than Lumino drag drop support. |
Can you point to that example? I can't find it. |
It's the first example on their docs page: https://interactjs.io/docs/ The code is linked to on that page, so if you just want to see the example: |
Ah I didn't realize @ibdafna was so far along in his slider PR. |
Interesting. That demo has a max slider value of 0.87 for me (Firefox, macOS), which seems odd. Yes, we're working on getting @ibdafna's nouislider implementation in, which is what we decided on at the widgets sprint. Thanks for pointing out an alternative, though! |
Oh interesting, it must be a bug. It has that same behavior for me in both Firefox and Chrome. |
Looking at slider options, here is a simple slider that appears to satisfy our needs: http://refreshless.com/nouislider/ (basic typescript definitions here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/nouislider/nouislider.d.ts)
@SylvainCorlay, @jdfreder, @afshin - what do you guys think of moving to use nouislider?
Another possibility is to use the browser sliders (they are pretty much standardized now, though the UI customizations vary greatly: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/. The problem there is that we wouldn't have range sliders, which would be a regression.
The text was updated successfully, but these errors were encountered: