Live data from Hacker News

Alertify.js

github.com

71–79 of 79 posts

Re: Alertify.js

#71

Very cool library! The one thing all of these type of things lack (e.g. this, dojo.dialog()) is that they are non-blocking to the execution thread, unlike alert()/confirm()/prompt(). I know it's not their fault, javascript doesn't allow this natively, but i feel like that would be immensely useful for general user input, form validation and the like. Yes, I am aware that it can be done currently through workarounds,…

Looking at the other comments, I think there might be a misunderstanding. The last thing you want is a UI blocking popup like alert() that, at least in browsers like Firefox and IE, effectively lock the entire browser from doing anything, which is a terrible anti-pattern in multi-tabbed browsers. Chrome did it right, at least with the HTTP authentication prompt, to make the UI block on a per-tab basis and have the pr…

FWIW, Firefox handles alert() much better than Chrome does. In Firefox, you can navigate away from the page, and switch tabs. Chrome won't let me open a new tab, and keeps the alert in front of other pages.

Re: Alertify.js

#72
I love it but I actually don't understand why you decided to put two completely separated features in a single library: the alert/confirm/prompt dialogs and the log/success/error messages.

I think that if you'd split this two things into two different libraries it would be better (e.g.: if i want only dialogs i'd prefer to include just them)

Re: Alertify.js

#73
Sweet, thanks for Sharing. Another lib to add to the list. Not sure how it compares to noty, which has many options.

Re: Alertify.js

#74
post #18

HALP! Does anyone know of a jQuery plugin that has notifications like they do on OSX. For example, when you raise the volume or mute you see that rounded transparent square? Is there something like that for the web?

I think http://stanlemon.net/pages/jgrowl is very close.

  jGrowl is a jQuery plugin that raises unobtrusive messages 
  within the browser, similar to the way that OS X's Growl
  Framework works.
It is pretty old by now (4 years), but a benefit of that is that it supports older browsers too.

And this plug-in is also close. Build on top of jQuery UI, so small footprint, but you'd need that library.

http://www.erichynds.com/examples/jquery-notify/

  This is a growl/ubuntu-like notification system built on 
  top of jQuery UI.

Re: Alertify.js

#75
post #32

Earlier quoted context omitted.

Are you saying it would be good for them to block? Why? When they execute, they run a callback with the input provided. Inside that callback, do whatever you need to do that requires some input.

Sometimes it's just easier to have linear code with some blocking than to create an entire state machine. Yes there are libraries that get close to this. No, it's still not the same.

You can have linear code without blocking - it's exceptionally common in the node world.

async.waterfall([ function getInput(){...}, function checkInput(){...}, function submitInput(){...}, ], function finally(){})

Each of the functions takes a callback, and returns err (if any) and output. If a callback returns err, it jumps to finally where you say what failed.

This is odd when you first get started with async, but it's really easy to visualize.

Think of a production line, with a number of different workers doing different stuff. If one of them gets a dud part, it throws it away.

Re: Alertify.js

#76

Earlier quoted context omitted.

Looking at the other comments, I think there might be a misunderstanding. The last thing you want is a UI blocking popup like alert() that, at least in browsers like Firefox and IE, effectively lock the entire browser from doing anything, which is a terrible anti-pattern in multi-tabbed browsers. Chrome did it right, at least with the HTTP authentication prompt, to make the UI block on a per-tab basis and have the pr…

FWIW, Firefox handles alert() much better than Chrome does. In Firefox, you can navigate away from the page, and switch tabs. Chrome won't let me open a new tab, and keeps the alert in front of other pages.

This may be platform dependent. I was just stuck in a FF alert that was a modal top-level window manager managed window the other day on Linux.

Re: Alertify.js

#78
post #75

Earlier quoted context omitted.

Sometimes it's just easier to have linear code with some blocking than to create an entire state machine. Yes there are libraries that get close to this. No, it's still not the same.

You can have linear code without blocking - it's exceptionally common in the node world. async.waterfall([ function getInput(){...}, function checkInput(){...}, function submitInput(){...}, ], function finally(){}) Each of the functions takes a callback, and returns err (if any) and output. If a callback returns err, it jumps to finally where you say what failed. This is odd when you first get started with async, but…

I get it. I do plenty of async programming. But, at the end of the day, no matter how nice you think the async.waterfall mess is, sometimes you just want to block. Sometimes it turns out that that is the right pattern. I've written dozens of async apps, much to the chagrin of co-workers who hate anything resembling async. I think I'm qualified to know that sometimes I get to a bit of code that sure would be nice with a simple blocking call.

Re: Alertify.js

#79

Earlier quoted context omitted.

FWIW, Firefox handles alert() much better than Chrome does. In Firefox, you can navigate away from the page, and switch tabs. Chrome won't let me open a new tab, and keeps the alert in front of other pages.

This may be platform dependent. I was just stuck in a FF alert that was a modal top-level window manager managed window the other day on Linux.

There are still a number of types of dialogs that are not tab-modal. See https://bugzilla.mozilla.org/show_bug.cgi?id=616843 and the bugs it depends on. alert() should be tab-modal content, though, and is for me.
Post reply on HN