Live data from Hacker News

Smoke.js - A framework-agnostic styled alert/confirm system for javascript

ssssnakes.com

21–28 of 28 posts

Re: Smoke.js - A framework-agnostic styled alert/confirm system for javascript

#21

I wouldn't use it, because it doesn't use the main hotkeys for user interaction on the alert box (enter, space) or the confirm box (enter, space, escape). I also would have liked it better, if the default functions of alert and confirm would have been overwritten, instead of recreated into an object. Overwriting the existent functions would have been made it a snap to integrate smoke.js into existing projects.

To my knowledge, you can't overwrite the existent confirm function because you can't pause the running of JS like the standard function does.

Re: Smoke.js - A framework-agnostic styled alert/confirm system for javascript

#24

Fly. On the usability tip, why don't you allow making the dialog appear near the user's mouse? Having to move it from the link (or wherever the user's mouse is at the time) to the action buttons is unnecessary.

A counterpoint: I don't like things that appear near my mouse. My mouse is rarely positioned where I'm looking, and anything that appears under my mouse when I'm about to click on something interferes with (and occasionally "steals") normal clicks. The worst is when a dialog pops up with important information, and the OK or Cancel button right under the mouse, just as I was halfway through clicking on something else.

Re: Smoke.js - A framework-agnostic styled alert/confirm system for javascript

#25
post #3

I feel like the alert and confirm modals should not be allowed to be dismissed by clicking outside. Especially confirm: "Destroy all. Yes, No?" -> click outside...nothing.

It's the "panic" action, akin to a "close dialog" button. Clicking outside (should) default to the "safe" choice, in this case, "no".

I would disagree. If there is a choice to be made, and that choice truly matters, I believe there should be no way to accidentally make the choice.

Re: Smoke.js - A framework-agnostic styled alert/confirm system for javascript

#26
I wish it also did prompt(). That would save a lot of work when you just want to input one field or want to let users copy-paste a URL to the page.

Edit: rgbrgb posted http://news.ycombinator.com/item?id=2748038 about Apprise. It does what smoke.js does and then some. Thanks

Re: Smoke.js - A framework-agnostic styled alert/confirm system for javascript

#28
post #9

Sorry, but this is the latest entry in obsolete and obtrusive functionality. It's useless for mobile (just tested iOS Safari and Opera), which is the platform you should start with, and it's been proven out to be an annoying hindrance to the user on the desktop. Don't interrupt CRUD. If you can't trust the user to not perform an irreversible action, then you're doing it wrong.

Noticed that it didn't work on my iPad as well. May be an early release, but mobile compatibility is crucial.
Post reply on HN