Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What advantages does the new ion.RangeSlider bring to Shiny?

As of Shiny 0.11, the sliders have been changed to ion.RangeSlider.

At first glance, they look very different, especially with the HTML 5 skin:

enter image description here

...but apparently these new sliders can do (a lot?) more than the old sliders.

I'd like to take advantage of the new ion.RangeSlider, especially features like updateSliderInput, which wasn't working for me with the old sliders.

However, I can't seem to find any documentation on how to actually take advantage of what the new slider has to offer.

The documentation on the slider looks the same as it did prior to 0.11.

RStudio says the new sliders "support updating more properties from the server..."

My question is, what exactly are the properties that are supported?

Further, it looks like there are some skins that can change the appearance of the slider -- are these skins available out of the box when using Shiny?

For example:

enter image description here

I would love to use this skin -- suddenly the difference between the old slider and new slider is not so drastic.

Thanks.

like image 204
tumultous_rooster Avatar asked Sep 27 '22 09:09

tumultous_rooster


1 Answers

I think they decided to change to ion.rangeslider because it's much more powerful and supports a lot more features, but as you noticed, they haven't taken advantage of any of those features.

All the settings (https://github.com/IonDen/ion.rangeSlider#settings) can be changed within JavaScript, so the slider is technically already more powerful than before, but you're right that the Shiny functions need to be updated to make it more convenient to use these settings/features.

There's an open issue on github for exactly this problem, and they recently added the milestone of shiny 0.12.2 to it (https://github.com/rstudio/shiny/issues/866)

Regarding skins: by looking at the documentation, it says that you need to include a special CSS file for each one of the skins they provide

like image 146
DeanAttali Avatar answered Sep 30 '22 13:09

DeanAttali