News for hackers. Stuff that matters.
Re:Buttons with built-in loading indicators by lamby on Wednesday June 05, 2013 @05:21AM (#5824450)
It's not known very well, but Bootstrap has similar functionality, albeit not as pretty:

http://twitter.github.io/bootstrap/javascript.html#buttons

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.
Re:Buttons with built-in loading indicators by taude on Wednesday June 05, 2013 @10:21AM (#5825727)
I combined the bootstrap method with some Font-Awesome, and accomplished getting some animation in my buttons in a simple manner.

See "Buttons" section at http://fortawesome.github.io/Font-Awesome/examples/

Re:Buttons with built-in loading indicators by j-m-o on Wednesday June 05, 2013 @10:39AM (#5825854)
Font-Awesome also has a really nice 'Animated Spinner' icon as well on that example page, which works nicely with Bootstrap buttons.
Re:Buttons with built-in loading indicators by ronilan on Wednesday June 05, 2013 @07:07AM (#5824777)
As long as te app won't "break" by the user navigating away, anything that avoids the "loading" modal is a great UX improvement. Ajax errors can also be sent to the button with "error" icon, BTW.
Re:Buttons with built-in loading indicators by prisonguard on Wednesday June 05, 2013 @05:36AM (#5824493)
agreed, might be trivial but i think the button text could as well switch to 'Submitting' like bootstrap
Re:Buttons with built-in loading indicators by simonbarker87 on Wednesday June 05, 2013 @05:33AM (#5824482)
Did not know about this at all, thanks