Live data from Hacker News

We use too many damn modals (2018)

modalzmodalzmodalz.com

21–30 of 127 posts

Re: We use too many damn modals (2018)

#21
There's a very simple rule of thumb: must the user give some feedback before it makes any sense to use the rest of the site? If so, it's fine to use a modal. Otherwise, don't. Some examples:

Payment page: not a modal. The user might want to add more stuff to the cart, even when they are literally one click away from purchasing. Blanking out the rest of the page means they now have to work around the site to buy more stuff.

Error message: not a modal. The user is vanishingly unlikely to report an error immediately (obviously it's logged in any case), and probably just wants to try again with slightly different input.

Irreversible action confirmation: not a modal. For the same reason as the payment page, the user might want to do something else before retrying the irreversible action. Just display a prominent message so the user knows the action is not yet done. Or, if at all possible, implement undo instead.

My job depends on it: OK, use a modal. We forgive you.

Re: We use too many damn modals (2018)

#22
post #19
post #9

I remember reading somewhere that most (modal) dialogs are just lazy design. It's easier to have a dialog component and throw whatever notice or controls in there. It's a predictable and flexible canvas. Your password is incorrect? Error dialog. Easier to design and build that a warning state on the text-boxes and a message close to the login button. Writing a post? Editor dialog. It's easier to design and build than…

Maybe it's lazy but the important question should be: is it good design? I don't think it is, as it hides some information from the main page. But I think it can be done well and be useful, as said at the end of the article. After all, OS use a lot of modals.

The more important question: do the people paying you care if it’s good design? Because the people who have paid me thus far in my career have not cared.

Re: We use too many damn modals (2018)

#23
post #4

I don't want to complain, website is harder to read with all that 8 bitsh font type...Maybe normal post with one example for each idea would be good enough.

Granted the authors could have tried to get the website to work in reader mode (they might be missing an `` tag or some `` tags). But in the meantime, it works well in lynx ;)

Re: We use too many damn modals (2018)

#24
Let me see if I can articulate this well:

The problem problem with modals in a web page context is that they go against the statelessness of the html request/response model. They end up building up a lot of local state in the client, both model state as well as UI state, that eventually need to be reconciled with the server. If the user closes the modal, is the data saved for later? Does the form reset? Does the server know anything about it? If it is a wizard, were previous steps saved? And so on.

After many years of working on and with intercoolerjs/htmx, I now typically prefer inline editing and wizards, to a modal solutions. It fits better with the web model, allows for proper URLs, etc.

The inline-edit demo from htmx is a good example of something that might be implemented as a modal by some developers, but works very well as an inline-edit UI instead:

https://htmx.org/examples/click-to-edit/

(NB: I was lazy and did not make the URL update as I should have)

Re: We use too many damn modals (2018)

#26
post #22
post #19

Earlier quoted context omitted.

Maybe it's lazy but the important question should be: is it good design? I don't think it is, as it hides some information from the main page. But I think it can be done well and be useful, as said at the end of the article. After all, OS use a lot of modals.

The more important question: do the people paying you care if it’s good design? Because the people who have paid me thus far in my career have not cared.

What about the people who have not paid you?

Re: We use too many damn modals (2018)

#27
I was just about to share this our designer, who is always talking me down from modals, when I reached the bottom and discovered that our designer is in fact the author.

I seriously can't say enough for this message. Adrian helped us redesign our app 2 years ago, dispatching many many modals in the process, and delivering a huge increase in usability that our customers and users very much do care about.

Re: We use too many damn modals (2018)

#28

My biggest issue with modals, is that they never seem to be tested with mobile devices in mind. So when I'm on my phone, the ability to close it is often off the screen. The only choice is to leave the website at that point.

I often find the pattern on websites that I visit the site for the first time due to a link, read maybe half a paragraph, and then get a modal popup asking for my email address to subscribe. I've never read any content from them before, how would I know if I want to subscribe? My phone is also in landscape mode, so the modal's close button is off the screen, and I can't scroll to it cause it's an absolutely positioned modal.

So the only logical thing to do is avoid the site in the future, they're more interested in extracting money from their existing readers than getting new readers. Sorry, maybe if you had let me read one article I may have liked your content.

Post reply on HN