[Patternfly] Slider element

Andreas Nilsson anilsson at redhat.com
Fri Mar 4 18:29:22 UTC 2016


Hi!
Long story short, setting up a storage pool in Cockpit wasn't optimal in 
the past. It's far from perfect now, but we've managed to improve one 
micro interaction of it:
In the past we had a input field where you just wrote numbers, so about 
as nice to use as fdisk from the cli, and then you might as well use 
fdisk from the cli :)
This is the original bug report 
https://github.com/cockpit-project/cockpit/issues/1116

With a upcoming fix, you'll be able to use slider, but there was no 
existing slider in Patternfly, so we made a custom one.
It's mostly just ~80 lines of CSS and a little bit of javascript for the 
logic.

This is the pull request that implements this: 
https://github.com/cockpit-project/cockpit/pull/3876/

This is how it looks in action:
https://cloud.githubusercontent.com/assets/209895/13535654/a410e560-e23b-11e5-9fa3-fad54d959aff.png

Is this something that would be interesting to have for others? Is there 
anything you would change?
I've filed an issue about in Patternfly here 
https://github.com/patternfly/patternfly/issues/210
- Andreas




More information about the PatternFly mailing list