Re:Why Is the Django Admin "Ugly"?
by Joker_vD on Friday October 27, 2023 @09:32AM
(#38038221)
But... transition from modals to pop-ups was a part of "going web 2.0" design switch. Now we're going back to modals and hail it as "modern"?
[ Parent
| on HN ]
Sorry I’m not sure I understand your question? I wasn’t on the internet before web 2.0, by modals I mean things like custom-styled <dialog> element[1] and the `dialog` ARIA role, which I would say are a more recent pattern than pop-up windows. "Modern" might not be the best term here, I should have just said more "usable" perhaps.
[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/di...
From the link you posted:
The HTML <dialog> element is used to create both modal and non-modal dialog boxes. Modal dialog boxes interrupt interaction with the rest of the page being inert, while non-modal dialog boxes allow interaction with the rest of the page.
The modal dialogs are easier for the programmer to use but they're quite inconvenient because generally, they ask you a question you can answer only by looking at/interacting with the rest of the page. Which you can't do (the modal dialogs on web also almost never can be dragged around).Gotcha, thank you. The reasons you mentioned are excellent, definitely a pattern that’s best avoided unless there are no other alternatives.
The term "modal" pre-dates <dialog> by a huge amount, and generally refers to a popup within the same window that prevents interacting with what's behind the popup (I believe the term comes from how you "change modes" when it appears). On the web they used to be implemented using <div> and CSS, often with some sort of javascript library so you didn't have to do it yourself.
I think you remembered it wrong. Going from pop-ups was earlier than modals. Pop-ups were supported by things like window.open() which has been around forever (perhaps NetScape 2.0?). In contrast designing a modal requires some slightly more recent CSS like absolute positioning (I believe CSS2 so still within the previous century).