Live data from Hacker News

Popover API

developer.mozilla.org

71–80 of 166 posts

Re: Popover API

#71
> Popovers created using the Popover API are always non-modal. If you want to create a modal popover, a element is the right way to go.

Why? This is a legitimate use case for a popover. Especially if you're blurring the background while it's open. Why even offer that feature if a user's click can potentially trigger an action on some blurred out button.

*edit:

Apparently, you can combine the two:

> You can turn a element into a popover ( is perfectly valid) if you want to combine popover control with dialog semantics.

Wouldn't make more sense here? They're clearly acknowledging a use case.

Re: Popover API

#72
post #18

Earlier quoted context omitted.

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.

And surely this new API will not be abused. Right?

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

#73

I suspect this isn't going to get major usage. Making it a dedicated API makes these things easier to target by extensions and thus easier to block. There are legitimate usages but almost all of the ones I encounter are marketing call to actions and invasive support chat boxes which are both almost universally hated and would the target of those blocking action.

What about selecting an image to view?

Re: Popover API

#74
post #48

I suspect this isn't going to get major usage. Making it a dedicated API makes these things easier to target by extensions and thus easier to block. There are legitimate usages but almost all of the ones I encounter are marketing call to actions and invasive support chat boxes which are both almost universally hated and would the target of those blocking action.

What about cookie consents?

Also universally hated and widely blocked.

Re: Popover API

#75
post #57

Another extremely useful feature that won’t work for our Safari users with any older than 1 year old iPhones and means for the next five years we have to support both this API and a full-blown polyfill or alternative implementation.

Two year old iPhones are absolutely able to upgrade to iOS 17 and receive this feature, all the way back to iPhone 8. That said, I do wish Apple had their browser set up like Google does with a complete upgrade possible via the App Store. It feels unnecessary to completely tie it to the OS version.

I don't know how iOS works but if it was an app would other browsers be able to use Safari's rendering engine? There is also the lower functionality JS engine that Apple forces those browsers to use (if I'm not mistaken.)

Re: Popover API

#76
post #47
post #11

There is also ( https://developer.mozilla.org/en-US/docs/Web/HTML/Element/di... ) if you want modal dialogs.

And also if you need expanding/collapsing content, or, with a slight abuse, a "dropdown". Strange that unlike and , ` ` apparently lacks the the ability to be made declaratively `open` using the attribute. This feels like omission to me. I hope there is some based reasoning behind this decision. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/de...

Maybe because 'dialog' says "don't do that" but everybody did anyway?

(also possibly because the "insert into top layer" is sufficiently odd a thing to trigger that the designers felt representing it as an attribute was a worse idea than for dialog)

... though I'd really like some sort of explanation as to how to choose between "non-modal " and popover because the one thing I am very confident of here is that I don't know enough to answer that question myself.

Re: Popover API

#77
post #18

Earlier quoted context omitted.

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.

And surely this new API will not be abused. Right?

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

#78

These are popovers: https://kagi.com/proxy/passover-popovers-6.jpg?c=gBnCtLe1QYl... No you can't have that word to mean something else, it's sacred. And because you tried you can't have any of my popovers either.

I once asked a question about popovers, one guy replied he googled what they were and got hungry.

Re: Popover API

#79

Another extremely useful feature that won’t work for our Safari users with any older than 1 year old iPhones and means for the next five years we have to support both this API and a full-blown polyfill or alternative implementation.

All iPhones going all the way back to 2018 can upgrade to iOS 17 right now.

66% of all active iPhones are already on iOS 17, 23% are on iOS 16, and only 11% use anything older. People upgrade iOS fairly quickly and it’s uncommon to support anything more than the two most recent major versions. So it’s more like one year, not five.

https://developer.apple.com/support/app-store/

Re: Popover API

#80

These are popovers: https://kagi.com/proxy/passover-popovers-6.jpg?c=gBnCtLe1QYl... No you can't have that word to mean something else, it's sacred. And because you tried you can't have any of my popovers either.

Cliff House at Land's End in San Francisco had legendary popovers - too bad they closed down
Post reply on HN