I wish more "library" would be written that way. I.e. make the 80% use case as simple and clear as possible, and let the programmer change it if needed.. instead of providing hundreds of useless configuration (knowing exactly that you'll encounter a case where you'll have to hack your way in the code anyway because it wasn't part of the "configuration"). I'm not bitching in any way on the existing jQuery plugins. I u…
Show HN: Veneer, modal dialogs in 75 lines of JavaScript
11–20 of 29 posts
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#12Earlier quoted context omitted.
I don't really understand what's the point of using your 75 line script for creating modal dialogs instead of the one line solution mentioned by chrisacky.
If you're not trolling, can you show me how to reproduce my third example in one line?
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#13Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#14Earlier quoted context omitted.
Yeah, I did mention the line count in the title but the real point is that it doesn’t come with extra features that you’ll have to customize anyway. For example, there are a million ways to present next and previous buttons when you’re showing a group of dialogs, and if you want to use a different way than the one your library comes with, it’s going to be frustrating. I looked at five or six different libraries befor…
I don't really understand what's the point of using your 75 line script for creating modal dialogs instead of the one line solution mentioned by chrisacky.
I'm all for constructive criticism, but many of the posts in this thread are purely negative.
We have a responsibility to foster a community that creates, shares, and improves the state of the web for all of us. That won't happen through vicious infighting.
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#15A 75 line modal dialog library (+mootools) isn't a huge achievement by itself -- I usually write my own dialog modals until I need a feature or compatibility that is more easily attainable using one of the more well-written options out there.
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#16function showModalBox(options){ var el = document.createElement("div"); el.className = "dialog "+( !options.classNames ? "" : classNames.join(" ")); el.innerHTML = options.content; document.body.appendChild(el); }
showing a box is the most stupid thing in this industry and the world will be a better place when we stop creating dozens of non-reusable dialog libraries.
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#17Have I misunderstood your source?.. But when your first line of your README says that it depends on Mootools, which is shipping at like 40kb~, doesn't it kind of defeat the purpose of having a line count? Heck, here is a modal dialog in one line. var d = new dojo.Dialog({ title: "Pretty Awesome huh?", content: "And in just one line" }).show();
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#18It's great that you've written a modal dialog library but what differentiates it from the other popular options out there? A 75 line modal dialog library (+mootools) isn't a huge achievement by itself -- I usually write my own dialog modals until I need a feature or compatibility that is more easily attainable using one of the more well-written options out there.
Veneer tries to minimize leakiness by doing the absolute minimum while making it simple to add anything you need (as in my third example).
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#19As a user, I find modal dialogs very annoying, independently of whether they appear in the browser or in any other GUI application. Nice JS and all, but please think twice (or better thrice) before using a modal dialog.
Re: Show HN: Veneer, modal dialogs in 75 lines of JavaScript
#20We've worked with ColorBox ( http://jacklmoore.com/colorbox/ ) for the past couple years and it does the job well, just have to clean up the IE6 cruft. 3rd example would be just $('.stuff').colorbox({ rel: 'stuff' }) When you're creating one of these everyday you really don't want to setup the events and logic everytime.