News for hackers. Stuff that matters.
Re:Popover API by sseagull on Friday May 10, 2024 @08:46AM (#40318304)
Kinda funny that browsers have built-in pop-up blockers, but then create APIs like this. Yes I know the difference, but still.

I’m old enough to remember the pop-up and pop-under wars of the late 90s and early 2000s.

I guess we won that particular battle, but the war for our attention is far from over.

Re:Popover API by bestest on Friday May 10, 2024 @08:52AM (#40318362)
I think you're comparing apples with grapples.

A popover is floating element that appears to display a contextual piece of information when required.

What you're mentioning is something completely different.

Re:Popover API by alt227 on Friday May 10, 2024 @09:10AM (#40318557)
> What you're mentioning is something completely different.

I think that is because the term 'Pop-up' has changed. It used to mean the opening of a new browser window, typically smaller than the host window and floating somewhere on top.

Now it means a modal form within the same window and dom.

Re:Popover API by The_Colonel on Friday May 10, 2024 @11:39AM (#40320260)
I don't think this is often called "pop-up", mostly I see either popover or tooltip.
Re:Popover API by sseagull on Friday May 10, 2024 @12:21PM (#40320762)
Maybe by developers. But the public certainly calls them pop-ups

https://www.google.com/search?hl=en&q=%22newsletter%20pop%2D...

Re:Popover API by antifa on Saturday May 11, 2024 @11:05AM (#40328542)
Either way those are called modals, not popovers.
Re:Popover API by mst on Friday May 10, 2024 @09:34AM (#40318791)
I tend to use "apples to aardvarks" but now I'm not sure whether I like mine or yours better.

Shall have to alternate them for a bit and call it A/G testing.

Re:Popover API by nerdponx on Friday May 10, 2024 @09:23AM (#40318667)
And surely this new API will not be abused. Right?
Re:Popover API by lolinder on Friday May 10, 2024 @09:49AM (#40318963)
At this point in the web's development the better question is: will this allow our abusers to do things that weren't possible before or in ways that are less blockable than before?

I think the answer is pretty clearly no to both questions, but it will allow us to simplify a lot of our code that was designed to make actually-useful popovers.

Re:Popover API by jwells89 on Friday May 10, 2024 @11:25AM (#40320122)
It might be, but at least the offending site can be taken care of by closing a single tab.

The part that sucked about old style popups is that they leaked into and on occasion would hijack (in the case of popup chains) your OS’ windowing system and at best make a mess of things or at worst turn your computer unusable.

Re:Popover API by hhreefgguu on Friday May 10, 2024 @10:03AM (#40319129)
It seems like the only context in which it could be abused would be if you have JS disabled but this still works? (Because of course you can do this with JS).

As CSS becomes more powerful it seems like being able to disable these powerful features, while still retaining the “document styling” features, will be important.

Re:Popover API by notatoad on Friday May 10, 2024 @02:04PM (#40321966)
it doesn't allow developers to do anything they can't already do.

it does make those elements easier for adblockers to remove though, by implementing the functionality in a standard way that constrains all the related logic into one easily removable element.

Re:Popover API by jjice on Friday May 10, 2024 @08:51AM (#40318345)
I get the gist of what you're saying, but I don't think they're really comparable. Popups spam your OS with trash that impairs your ability to use your machine (at worst). Popover dialogs can be shut down by closing your tab and nothing more. We've also had these style of popovers for a while now because they're generally a really handy way of presenting info. Yeah, they can be used in annoying ways, but there are lots of genuine usecases, like a modal.
Re:Popover API by gwd on Friday May 10, 2024 @10:37AM (#40319552)
I'm seeing a lot of this kind of comment, but it's a bit non-sensical. You can implement pop-overs currently using existing <div>'s and such; e.g.:

https://getbootstrap.com/docs/5.3/components/popovers/

All this means is that you can implement popovers without having to include a magic extra library. All blocking an explicit "popover" element would do is cause people to stick with custom libraries.

Re:Popover API by ysavir on Friday May 10, 2024 @10:50AM (#40319738)
I generally agree with you, but one factor is the ability to filter out scripts using browser plugins. For example, if a page has 3rd-party scripts that trigger obnoxious modals, I can use NoScript to prevent those scripts from executing. If it doesn't require scripts to open the modals, would it shift the burden to adblockers, and start another competition in which the site and the adblocker are trying to get around the other?

I'm strongly in favor of the popover API existing, but it'll be interesting to see how it shifts handling page behaviors.

Re:Popover API by cjpearson on Friday May 10, 2024 @11:53AM (#40320428)
I still don't think there's any significant difference. You can create popover elements without JavaScript, but you can also create divs with a high z-index without JavaScript. You can toggle popover visibility via CSS or click without JavaScript, but you can also do that with divs and a checkbox.
Re:Popover API by The_Colonel on Friday May 10, 2024 @11:46AM (#40320341)
Obnoxious modals with ads would still download the content dynamically with JS so the NoScript would still do the job.
Re:Popover API by gyomu on Friday May 10, 2024 @12:09PM (#40320609)
The original pop-up implementation (which pop-up blockers aim to prevent) breaks the application content/OS boundary, this does not.

You don’t want that boundary to be broken, because that makes for less usable and less safe systems.

Re:Popover API by 1231232131231 on Friday May 10, 2024 @09:02AM (#40318476)
This is not a pop-up. People hate popups because they're intrusive and have their own window. This API replaces div modals and saves time and code for developers.
Re:Popover API by maccard on Friday May 10, 2024 @09:26AM (#40318703)
No, people hate pop ups because they steal focus and draw attention away from the content they’re interested in. Whether it’s a pop up or a popover, a prompt asking me to sign up to your newsletter is not something I want.
Re:Popover API by Zak on Friday May 10, 2024 @10:24AM (#40319412)
Both things are true. Popups are more disruptive because they remain even after the page that spawned them is closed and often obscure their origin.
Re:Popover API by coldpie on Friday May 10, 2024 @01:16PM (#40321423)
If you haven't already, go enable the Annoyances and Cookie banner filter lists in your uBlock Origin installation. It doesn't get all of them, of course, but it does get a lot. For the remainder, the Kill Sticky bookmark is pretty good about knocking them out: https://www.smokingonabike.com/2024/01/20/take-back-your-web...
Re:Popover API by marginalia_nu on Friday May 10, 2024 @09:19AM (#40318637)
They're basically the same. Browsers started blocking popups because they were almost always misused. Pop-overs took their place because they're somewhat less trivially blockable.
Re:Popover API by The_Colonel on Friday May 10, 2024 @11:55AM (#40320457)
The big difference is that there are very few valid use cases for popups, but many useful ones for popovers.
Re:Popover API by marginalia_nu on Friday May 10, 2024 @12:59PM (#40321234)
Keep in mind this was a time when virtually all state was kept serverside. Basically anything you could do with a popover you could do with a popup, and there were definitely benign uses of them.
Re:Popover API by TrueDuality on Friday May 10, 2024 @09:18AM (#40318616)
Which people still hate because its mostly marketing trash that gets in the way of whatever they were trying to do on the underlying page.
Re:Popover API by darby_eight on Friday May 10, 2024 @09:38AM (#40318842)
It also helps that we now just have spam covering content and slowing our computer down inside the window. Hell, many publications will even get you to pay for the privilege.
Re:Popover API by efilife on Friday May 10, 2024 @09:07AM (#40318535)
I've seen exactly this comment somewhere on HN already. What's going on?
Re:Popover API by jffry on Friday May 10, 2024 @09:10AM (#40318560)
Perhaps they typed it into the wrong tab, deleted it and reposted it here?

Doesn't seem to be a re-peat according to https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

Re:Popover API by sseagull on Friday May 10, 2024 @09:47AM (#40318934)
Deja vu?

I did start to type this as a response elsewhere, but never submitted it. And there’s nothing in my comment history.

So my theory is “great minds think alike” :)