Live data from Hacker News

A Better Twitter Bootstrap Modal

github.com

61–70 of 73 posts

Re: A Better Twitter Bootstrap Modal

#61
post #53
post #50

Earlier quoted context omitted.

Well, I actually submitted a pull-request almost a year ago but it was rejected for "complexity"... I didn't understand that decision back then and I don't understand it today. The patch weighs in at about 100 lines which doesn't seem heavy to me. Especially when you consider that without the patch the bootstrap-"modal" is not a modal ... Anyway, here's the fixed bootstrap-modal.js for the version that was current ba…

You might want to change the language/syntax highlighting of that gist. That apostrophe on line 120...

Sorry, here's the same gist with proper syntax highlighting https://gist.github.com/bca7185d4cf0b71bd55b

Re: A Better Twitter Bootstrap Modal

#62
Nice. I'd remove the animation though. I think that animation is just annoyance (even slight) in structures that do not require animation. That extra few fractions of a second can mean a lot. That's why on Windows or OSX I remove the animation to hide and show application windows.

Re: A Better Twitter Bootstrap Modal

#63

This is a nice modal, but I'd much rather never have a modal ever. The only time a modal should appear is if a critical error occurred that the user must know about immediately. For most cases where modals tend to get used, like on iOS "please rate us", or "we want your contact information now", I don't think it is appropriate at all.

Why do you think that?

Re: A Better Twitter Bootstrap Modal

#66
post #61
post #53

Earlier quoted context omitted.

You might want to change the language/syntax highlighting of that gist. That apostrophe on line 120...

Sorry, here's the same gist with proper syntax highlighting https://gist.github.com/bca7185d4cf0b71bd55b

Thanks for this. Currently I have a workaround by using data-tabindex instead of the standard tabindex but I've been trying to find a more robust solution to this problem so I'm going to take a look at implementing something like this.

Re: A Better Twitter Bootstrap Modal

#70
post #63

This is a nice modal, but I'd much rather never have a modal ever. The only time a modal should appear is if a critical error occurred that the user must know about immediately. For most cases where modals tend to get used, like on iOS "please rate us", or "we want your contact information now", I don't think it is appropriate at all.

Why do you think that?

It's a forcible interruption of whatever the user is doing, and the user has to interact with it before continuing. As such, it should be used only when there is something that needs attention immediately.

If it's used for collecting user info after they hit a signup button, that's marginally acceptable, but they would still be unable to, for example, scroll back up the page to double-check some info until they finished with it. So I see popups like that as a failure of design; "I didn't know where to put this, so, here. Modal."

What modals are actually used for in the majority of cases I've seen is making modal popups begging first time visitors to register for websites and similar. This task is neither urgent nor necessary (nor, in most cases, desirable) for the users. Forcing them to interact with it before the rest of the page is incredibly irritating, but that will never stop because it's more lucrative.

Post reply on HN