.
Interesting add on to progress bars. I'll talk to @fat about what he thinks about adding support for this after we push 2.0.
Since we are talking about stuff like that. Sliders with handles! (unless that is what you mean :) )
How bout just something like this.
http://dl.dropbox.com/u/890048/Screen%20Shot%202012-01-19%20at%207.46.18%20PM.png
Here's a possibly useful link: Slippin' Sliders with Dijit
How bout just something like this.
http://dl.dropbox.com/u/890048/Screen%20Shot%202012-01-19%20at%207.46.18%20PM.png
Good idea. Only problem I see with it is that on very low % values it will look horrible.
Yup, would look good as long as the entirety of the progress/percentage value has the same background. When the progress bar is 'crossing over' the text region, it can look kind of awkward (here's an example). Possible solutions are to have:
- contrasting text colours depending on the text's background (as in the example image from above) or
- make the text readable at all times, regardless of the background (e.g. with a text shadow or just a solid background that covers the width of the text — kind of like what's done in section "(11) Background image has too much salience (text hard to see)" of this article).
Anyway, some other solutions which may be simpler than making a ruler component:
- A progress tooltip at the progress bar's edge (here's an example screenshot with a tooltip after some sloppy hacking)
- Show a percentage or progress value (example 1, example 2)
This is a feature would be very useful in the current project I am working on. I like the simplistic look of rposborne suggestion.
@rotaris, I like the idea with the Tooltip :) That would require modifications to the Tooltip library to attach the tooltip to the right side of the bar, though.
@rotaris How you would go about implementing the color change? What happens when the progress bar crosses a character?
As for the tooltip I think it's the best candidate so far.
I attached a screenshot that shows my implementations flaw. http://i.imgur.com/yPEC8.png
What about something along the lines of prepended and appended text (much like the inputs). You can prepend or append a <span> on either side which would square off that side of the progress bar allowing for text.
edit: It looked a lot better in my mind... could be cleaned up a bit.

That would require modifications to the Tooltip library to attach the tooltip to the right side of the bar, though.
Yeah, quite possibly, @pokonski. I don't think @fat is too keen on more placements (looking at his comment on #857 — which incidentally, was opened by you!) though, so maybe introduce a bit of JavaScript to deal with placement and such? Or introduce the placement but not document it, so as to prevent abuse? We'll have to think it over.
@rotaris How you would go about implementing the color change? What happens when the progress bar crosses a character?
@rposborne Maybe using this clever overflow: hidden approach: http://stackoverflow.com/questions/1080708/css-progress-bar-text-color-for-contrast-filled-and-empty-backgrounds ? I've had a little play but haven't gotten very far.
I added some basic font formatting to the bar a few days ago, so we've taken care of that. This doesn't work for low percentages, but starts to get the job done.
Why is this necessary for a progress bar? Less is more. The progress bar has a width of 100%, and people will see how far the progress is, no need for a ruler.
On a range type input, I'm all for a ruler. But in the progress bars.
We aren't assume it's going to state % more like a root values such as "X out of Y" or something where the progress bar can be made more useful to the end user.
Do you have a concrete example?
Going to drop this as a feature request, for progress bars at least. If we do a range input, we'll support some sort of ruler-esque aspect, but that's it.