News for hackers. Stuff that matters.
Re:Buttons with built-in loading indicators by pamelafox on Wednesday June 05, 2013 @10:07AM (#5825623)
That's actually the technique I use for buttons in my apps, and I believe I prompted them to add it to Bootstrap. You can see the thread about it here where it was added: https://github.com/twitter/bootstrap/issues/471#issuecomment...

But my point isn't who-invented-it, it's that it's very easy to implement this in your own buttons without using Bootstrap. I still use my own implementation, despite suggesting it to them. Just create some data attributes (I have data-default-message, data-inflight-message, and data-success-message) and change your buttons appropriately. I have a standard function that I call on my forms that handles that for me, which I've gisted here: https://gist.github.com/pamelafox/5714109 You could do that in a more elegant way than that bit of code. :-)

I prefer the changing-message approach to the showing-the-indicator approach because the verb stays, and you remember what it was that you were doing. Handy for us forgetful folks. You can use both, too, of course.

Re:Buttons with built-in loading indicators by cleaver on Wednesday June 05, 2013 @11:51AM (#5826377)
It's a great technique for buttons, even without the nice design. I've wondered for years why this is not more common. Having a "submit" button change state is such better UI than those horrid messages warning you not to click twice—I still run into that from time to time.
Re:Buttons with built-in loading indicators by BHSPitMonkey on Wednesday June 05, 2013 @06:03PM (#5828962)
The best route would probably be to show that warning somewhere, but hide it using JS. That way it's visible in scenarios where JS isn't available.