bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

.

Open powder96 opened this issue 14 years ago • 14 comments

powder96 avatar Jan 15 '12 19:01 powder96

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.

mdo avatar Jan 15 '12 19:01 mdo

Since we are talking about stuff like that. Sliders with handles! (unless that is what you mean :) )

pokonski avatar Jan 15 '12 20:01 pokonski

How bout just something like this.

http://dl.dropbox.com/u/890048/Screen%20Shot%202012-01-19%20at%207.46.18%20PM.png

rposborne avatar Jan 20 '12 01:01 rposborne

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:

  1. contrasting text colours depending on the text's background (as in the example image from above) or
  2. 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:

rotaris avatar Jan 24 '12 07:01 rotaris

This is a feature would be very useful in the current project I am working on. I like the simplistic look of rposborne suggestion.

MarkPhilp avatar Jan 24 '12 20:01 MarkPhilp

@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.

pokonski avatar Jan 24 '12 20:01 pokonski

@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

rposborne avatar Jan 24 '12 20:01 rposborne

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.

JakeWharton avatar Jan 24 '12 20:01 JakeWharton

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.

rotaris avatar Jan 25 '12 12:01 rotaris

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.

mdo avatar Jan 25 '12 21:01 mdo

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.

lovskogen avatar Jan 26 '12 08:01 lovskogen

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.

rposborne avatar Jan 26 '12 15:01 rposborne

Do you have a concrete example?

lovskogen avatar Feb 01 '12 21:02 lovskogen

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.

mdo avatar Feb 05 '12 01:02 mdo