I think the Popover API will be really transformative when CSS Anchor Positioning[1] arrives as well. Anchor positioning will let you position elements relative to others on the page. Combined with the Popover API it will let you implement things like custom tooltips and context menus in a declarative way and without any need for libraries like PopperJS [2] [1] https://developer.chrome.com/blog/tether-elements-to-eac…
I just shipped a new article all about how to use the CSS anchoring API, which is landing in Chromium next week! https://developer.chrome.com/blog/anchor-positioning-api
Popover API
151–160 of 166 posts
Re: Popover API
#152Earlier 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?
Re: Popover API
#153Earlier quoted context omitted.
I love articles with actual running examples, thanks! Now I'm wondering how quickly this will get adopted, it looks very cool!
whats a reasonable expectation for this to get adopted across safari/firefox/edge? 1yr? 3yrs?
https://groups.google.com/a/mozilla.org/g/dev-platform/c/4cb...
Re: Popover API
#154Earlier quoted context omitted.
How is anchor different from relative?
The article I linked goes into the details, but basically a relative approach constrains your markup: The positioned thing must be a child of the relatively positioned anchor or a wrapper element, and you often cannot sensibly position it without using JS to check the location of the anchor. E.g. a popover menu for a button must check if the button is close to an edge of the viewport and position the menu element app…
Re: Popover API
#155Earlier quoted context omitted.
Let's say there's a native app that can also do pop ups. What's to stop the native app from basically stealing the likeness of your password manager? In other words, as web apps seek to become like native apps, they may also accrue the risks which are characteristic of that space.
There's not much to stop what you describe, other than the trust you place in a native app when you install it. Super common experience to have to give superuser access once during an installation process, and most bets are off regarding security once you do that. That's part of the added friction involved in running a native app; you have to trust it more. Only other alternative I can think of would be an Apple App…
On the matter of websites, if the decision rests on individual choice, then individuals certainly have a choice to visit (and thus trust) a particular domain name and cert. That users need merely type in a name, and that there's a giant company helping you search for these apps, simply means that web apps are easy to find and install (and native apps are only slightly harder to install).
Then there's the role of the app stores, which I imagine practically deals with the supermajority of garbage, spams and scams out there. We could also have orgs whose sole job is to maintain lists of credibility, if that's what people want. Then a web user could download a browser extension or use a browser that subscribed to these lists by default. In some ways that's what ad blockers are, except ad blockers are even more precise and there's nothing quite like it in the native world.
Re: Popover API
#156Demo https://mdn.github.io/dom-examples/popover-api
Re: Popover API
#157Earlier quoted context omitted.
As someone pointed out, it's indeed harder to animate but it's fully accessible, supports escape key to close, has a built-in backdrop and has built-in focus trap. Safari took a while to support it but now it's available everywhere. I think it's better than using a tag.
Apparently it's unsupported in the Firefox ESR version in Ubuntu 20.04, which still receives support from Canonical until 2025. I found that out because someone reported that my site didn't work.
Ubuntu itself doesn’t have an ESR package, only https://packages.ubuntu.com/focal/firefox which is at 125.
The Mozilla PPA does have an ESR package, but per https://launchpad.net/~mozillateam/+archive/ubuntu/ppa?field... it’s at 115.
has been supported since Firefox 98, meaning ESR 91 was the last release lacking it, and it reached end of support over a year and a half ago.
Re: Popover API
#158Re: Popover API
#159Earlier quoted context omitted.
I don't think this is often called "pop-up", mostly I see either popover or tooltip.
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
#160These 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.
That is quite a curious URL. The querystring is identifying the file, but it looks as if it’s hosted at https://kagi.com/proxy/passover-popovers-6.jpg
It's very likely built this way so
a) if you download it the image has the correct file name
b) the source URL is encoded in the query string and you can't abuse Kagi as a 'file host' by just plugging in any URL