Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popover #423

Closed
2 of 3 tasks
stof opened this issue Sep 15, 2023 · 39 comments
Closed
2 of 3 tasks

Popover #423

stof opened this issue Sep 15, 2023 · 39 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@stof
Copy link

stof commented Sep 15, 2023

Description

The popover attribute allows creating dropdown UIs using platform features, solving the case of a dropdown being cut by the overflow behavior of the container (as it goes in the top layer) and without requiring JS to trigger it (thanks to popovertarget.

This is already implemented in Blink and is partially implemented in Webkit. Reaching interop would allow relying on it.
Thus, due to the top-layer behavior, it is hard (or maybe even impossible) to polyfill this feature.

Specification

https://html.spec.whatwg.org/multipage/popover.html#the-popover-attribute

Open Issues

No response

Tests

https://wpt.fyi/results/html/semantics/popovers?label=master&label=experimental&aligned

Maybe also https://wpt.fyi/results/close-watcher/popover-closewatcher.html?label=master&label=experimental&aligned and https://wpt.fyi/results/close-watcher/popover-closewatcher-multiple-plus-free.html?label=master&label=experimental&aligned but not sure about them

Current Implementations

  • Blink
  • Gecko
  • WebKit

Standards Positions

mozilla/standards-positions#698

WebKit/standards-positions#74

Browser bug reports

https://bugzilla.mozilla.org/show_bug.cgi?id=1808823
https://bugs.chromium.org/p/chromium/issues/detail?id=1307772
https://bugs.webkit.org/show_bug.cgi?id=250171

Developer discussions

No response

Polls & Surveys

No response

Existing Usage

No response

Workarounds

No response

Accessibility Impact

No response

Privacy Impact

No response

Other

No response

@stof stof added the focus-area-proposal Focus Area Proposal label Sep 15, 2023
@foolip
Copy link
Member

foolip commented Sep 15, 2023

cc @stubbornella @mfreed7 @una

@nt1m
Copy link
Member

nt1m commented Sep 17, 2023

WebKit implements everything except popover=hint, which does not have a spec yet (hence isn't eligible for Interop 2024).

@mayank99 mayank99 mentioned this issue Sep 20, 2023
3 tasks
@jensimmons jensimmons changed the title popovers Popover Sep 21, 2023
@mfreed7
Copy link

mfreed7 commented Sep 29, 2023

popover=hint, which does not have a spec yet (hence isn't eligible for Interop 2024).

I agree with this part, with the caveat that we've got a spec PR open now to add popover=hint behavior. I'd love to get that reviewed and then add it to Interop 2024 if that's still possible!

@foolip
Copy link
Member

foolip commented Oct 5, 2023

In preliminary results for State of HTML 2023, popover was the most common response to the freeform question "Which existing HTML features or browser APIs are you unable to use because of browser differences or lack of support?" See #550 for details.

@lukewarlow
Copy link
Member

https://bugs.webkit.org/show_bug.cgi?id=263081 - This is an example of an interop bug with Popover implementations.

@nt1m
Copy link
Member

nt1m commented Oct 12, 2023

Someone would need to write a WPT for it

@foolip
Copy link
Member

foolip commented Oct 25, 2023

Also from State of HTML preliminary results, Popover was the feature that respondents expressed the most interest for. Note that this wasn't freeform, it's based on the features the survey asked about experience and sentiment for.

@LeaVerou
Copy link

LeaVerou commented Oct 25, 2023

@foolip You're burying the lede a little bit 😅 Popover came up all over the survey, in freeform and non-freeform questions. The need for native popovers was probably one of the biggest themes (2nd only after stylability IMO).

Most interesting known features (not freeform)

Out of the respondents who had heard each feature, what % were interested?

image

Popover is the first, with 52% of those who had heard it but not used it selecting that they were interested!

Most interesting unknown features (not freeform)

Out of the respondents who had not heard each feature, what % were interested?

image

46% of people who had not even heard of the Popover API before the survey selected they were interested.

Top interop pain points

“Which existing HTML features or browser APIs are you unable to use because of browser differences or lack of support?”

image

2700 issues / 1755 responses, manually classified

Popover is the first one, occupying almost 10% of all complaints!

Unable to use for other reasons

Which existing HTML features or browser APIs are you unable to use for other reasons (and why)?
Good candidates might be existing HTML features that you often have to recreate or augment using JS.

image

Popover is 6th here too, despite not really being relevant (since it's not yet supported really). I suspect people misread the questions and entered things that would be more relevant in the question above (i.e. due to browser support)

Top interactivity pain points (freeform)

What are your pain points around dynamic HTML changes?
Browser incompatibilities or lack of support, missing features, and other problems you face around interactive elements and behaviors (except forms), DOM manipulation, events, and related APIs.

image

12th most common complaint was related to the lack of popovers.

@foolip
Copy link
Member

foolip commented Oct 26, 2023

Thank you @LeaVerou for summarizing with nice screenshots!

@jensimmons
Copy link
Contributor

Could someone create a link to the tests that will likely be included, without any of popover=hint, (since it does not have a spec yet and therefore is not eligible for Interop 2024).

@mfreed7
Copy link

mfreed7 commented Oct 31, 2023

Could someone create a link to the tests that will likely be included, without any of popover=hint, (since it does not have a spec yet and therefore is not eligible for Interop 2024).

The OP contains the correct link to the tests: https://wpt.fyi/results/html/semantics/popovers?label=master&label=experimental&aligned

I tried, and failed, to come up with a search term that eliminates the tests that end in .tentative.html, but wpt.fyi's search syntax is... different than I'm used to. I did verify that all popover tests that use/test non-standard features (including popover=hint and anchor positioning) are correctly marked with .tentative.html.

@mfreed7
Copy link

mfreed7 commented Nov 7, 2023

@gsnedders
Copy link
Member

Do these tests not rely on anchor positioning?

@mfreed7
Copy link

mfreed7 commented Nov 13, 2023

Do these tests not rely on anchor positioning?

Hmm, those are good to highlight. Most rely on just the anchor attribute, and not all of anchor positioning. But you're right that none of that is standardized at the moment. We should probably rename those back to .tentative. I'll take care of that...

@mfreed7
Copy link

mfreed7 commented Nov 13, 2023

@stof
Copy link
Author

stof commented Nov 29, 2023

Actually, https://wpt.fyi/results/html/semantics/popovers/popover-invoking-attribute.html?label=experimental&label=master&aligned&q=not%20is%3Atentative contains a bunch of sub-tests that are for popover=hint (see the tests with missing results in Safari and Firefox). Those should probably be extracted in a separate tentative test.

@lukewarlow
Copy link
Member

Just as an fyi there's a firefox intent to ship

https://groups.google.com/a/mozilla.org/g/dev-platform/c/hrCP5RBO7mA/m/7w-1OsmbAQAJ

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 29, 2023
This refactors the test logic into a shared JS file and splits
the popover=hint test code into a new .tentative.html file.

Per this comment:
web-platform-tests/interop#423 (comment)

Bug: 1416284
Change-Id: Idda2716c476cf3d9b8fea724ece6e48d66e1fb62
@mfreed7
Copy link

mfreed7 commented Nov 29, 2023

Actually, https://wpt.fyi/results/html/semantics/popovers/popover-invoking-attribute.html?label=experimental&label=master&aligned&q=not%20is%3Atentative contains a bunch of sub-tests that are for popover=hint (see the tests with missing results in Safari and Firefox). Those should probably be extracted in a separate tentative test.

Another good point. In progress: web-platform-tests/wpt#43436

@stof
Copy link
Author

stof commented Nov 30, 2023

@mfreed7 thanks.
Looking at those in more details, the test titles in https://wpt.fyi/results/html/semantics/popovers/popover-stacking.html?label=experimental&label=master&aligned make me think that this non-tentative test also includes some sub-tests relying on anchor positioning, that should also be tentative.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Nov 30, 2023
This refactors the test logic into a shared JS file and splits
the popover=hint test code into a new .tentative.html file.

Per this comment:
web-platform-tests/interop#423 (comment)

Bug: 1416284
Change-Id: Idda2716c476cf3d9b8fea724ece6e48d66e1fb62
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Dec 4, 2023
Per the [1] comment, this test contained things about the anchor
attribute which aren't (yet) standardized. So this CL splits
those parts out into a separate tentative test.

[1] web-platform-tests/interop#423 (comment)

Bug: 1309178
Change-Id: I46969c0336a6260b4551ae9111fb0002231464fd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Dec 16, 2023
… from popover test, a=testonly

Automatic update from web-platform-tests
Split out anchor-attribute related stuff from popover test

Per the [1] comment, this test contained things about the anchor
attribute which aren't (yet) standardized. So this CL splits
those parts out into a separate tentative test.

[1] web-platform-tests/interop#423 (comment)

Bug: 1309178
Change-Id: I46969c0336a6260b4551ae9111fb0002231464fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5082149
Commit-Queue: Joey Arhar <jarharchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1234212}

--

wpt-commits: e905d6af9e32b9cfa514f8950c6ec82e3d59e4ad
wpt-pr: 43501

UltraBlame original commit: ca67079c1dd0480e5a32b578c08e09e32d415026
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Dec 16, 2023
…n-tentative test, a=testonly

Automatic update from web-platform-tests
Move popover=hint related code out of non-tentative test

This refactors the test logic into a shared JS file and splits
the popover=hint test code into a new .tentative.html file.

Per this comment:
web-platform-tests/interop#423 (comment)

Bug: 1416284
Change-Id: Idda2716c476cf3d9b8fea724ece6e48d66e1fb62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5074321
Auto-Submit: Mason Freed <masonfchromium.org>
Commit-Queue: Joey Arhar <jarharchromium.org>
Reviewed-by: Joey Arhar <jarharchromium.org>
Cr-Commit-Position: refs/heads/main{#1234222}

--

wpt-commits: fcd111f4f95c9dae1d0dd7f938fe427699534bc0
wpt-pr: 43436

UltraBlame original commit: 86d6622633a3fc6fae712f86f82871e1bae69e87
aosmond pushed a commit to aosmond/gecko that referenced this issue Dec 16, 2023
… from popover test, a=testonly

Automatic update from web-platform-tests
Split out anchor-attribute related stuff from popover test

Per the [1] comment, this test contained things about the anchor
attribute which aren't (yet) standardized. So this CL splits
those parts out into a separate tentative test.

[1] web-platform-tests/interop#423 (comment)

Bug: 1309178
Change-Id: I46969c0336a6260b4551ae9111fb0002231464fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5082149
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1234212}

--

wpt-commits: e905d6af9e32b9cfa514f8950c6ec82e3d59e4ad
wpt-pr: 43501
aosmond pushed a commit to aosmond/gecko that referenced this issue Dec 16, 2023
…n-tentative test, a=testonly

Automatic update from web-platform-tests
Move popover=hint related code out of non-tentative test

This refactors the test logic into a shared JS file and splits
the popover=hint test code into a new .tentative.html file.

Per this comment:
web-platform-tests/interop#423 (comment)

Bug: 1416284
Change-Id: Idda2716c476cf3d9b8fea724ece6e48d66e1fb62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5074321
Auto-Submit: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1234222}

--

wpt-commits: fcd111f4f95c9dae1d0dd7f938fe427699534bc0
wpt-pr: 43436
@wpt-interop
Copy link

This proposal has been accepted as part of Interop 2024! On behalf of the entire Interop team, thank you for proposing it. You’ll be able to track progress on this topic throughout the year via the Interop 2024 dashboard.

@zcorpan
Copy link
Member

zcorpan commented Feb 1, 2024

Thank you for proposing Popover for inclusion in Interop 2024.

We are pleased to let you know that this proposal was accepted as part of the Popover focus area. You can follow the progress of this focus area on the Interop 2024 dashboard.

For an overview of our process, see the proposal selection. Thank you for contributing to Interop 2024!

Posted on behalf of the Interop team.

@lukewarlow
Copy link
Member

I'm not sure where is the most appropriate place to raise this so noting here.

html/semantics/popovers/popover-shadow-dom.html - This test is part of interop2024 but has 2 subtests that rely on the anchor attribute which isn't part of interop (nor specced fully afaik).

@nt1m
Copy link
Member

nt1m commented Feb 18, 2024

@mfreed7 Can we get these split out from the test ?

@zcorpan
Copy link
Member

zcorpan commented Feb 20, 2024

Thanks @lukewarlow

I'm not sure where is the most appropriate place

A "Test Change Proposal" issue: https://github.com/web-platform-tests/interop/issues/new/choose

@mfreed7
Copy link

mfreed7 commented Feb 20, 2024

I'm not sure where is the most appropriate place to raise this so noting here.

html/semantics/popovers/popover-shadow-dom.html - This test is part of interop2024 but has 2 subtests that rely on the anchor attribute which isn't part of interop (nor specced fully afaik).

Yep, I can take care of this. I'll comment back here with a PR once I've had a chance to get it started.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 20, 2024
This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
@mfreed7
Copy link

mfreed7 commented Feb 20, 2024

Yep, I can take care of this. I'll comment back here with a PR once I've had a chance to get it started.

web-platform-tests/wpt#44679

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 20, 2024
This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 20, 2024
This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310497
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262923}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 20, 2024
This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310497
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262923}
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this issue Feb 23, 2024
This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310497
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262923}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 28, 2024
…nto tentative test, a=testonly

Automatic update from web-platform-tests
Split out popover tests using `anchor` into tentative test

This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310497
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262923}

--

wpt-commits: c00ad32611211eced99cb946e6cb4710d68b9aee
wpt-pr: 44679
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Feb 28, 2024
…nto tentative test, a=testonly

Automatic update from web-platform-tests
Split out popover tests using `anchor` into tentative test

This was noted here:

web-platform-tests/interop#423 (comment)

Bug: 40059176
Change-Id: I58f3674d2901b8ca7df4c5d5ba8ed99c0b62a4de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310497
Commit-Queue: Di Zhang <dizhangg@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Di Zhang <dizhangg@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262923}

--

wpt-commits: c00ad32611211eced99cb946e6cb4710d68b9aee
wpt-pr: 44679
@promocot
Copy link

promocot commented Mar 23, 2024

::backdrop not supported css variable!

Example

::backdrop {
background: oklch(11.63% .045 var(--prm-hue) / 80%);
backdrop-filter: var(--blur-1);
}

Variables won't work! If to change on

::backdrop {
background: oklch(11.63% .045 282 / 80%);
backdrop-filter: blur(4px);
}

all will be works

@foolip
Copy link
Member

foolip commented Mar 23, 2024

@promocot if you're running into this issue in Chrome, it was fixed in https://chromestatus.com/feature/4875749691752448, in Chrome 122.

https://wpt.fyi/results/html/semantics/interactive-elements/the-dialog-element/backdrop-inherits.html?label=master&label=stable is the relevant test for this, and it looks like it was previously failing (but now passing) in Safari as well.

If you have a problem in the latest version of each browser, please file bug reports in the appropriate bug tracker.

@promocot
Copy link

promocot commented Mar 23, 2024

Hello, thanks, I tried to update manual my chrome browser, and yep after works, but i found another bug with close popover on clic to icon. For example, I have a HTML

<button popovertarget="mypopover" popovertargetaction="show">Show popover</button>
<button popovertarget="mypopover" popovertargetaction="hide">Hide popover</button>
<div id="mypopover" popover="">Popover content</div>

If I click on show button i will see popup, if i click on hide button i will close popup, but if i have structure like this

<button popovertarget="mypopover" popovertargetaction="show">
  Show popover

<div id="mypopover" popover="">Popover content
      <button popovertarget="mypopover" popovertargetaction="hide">Hide popover</button>
</div>

when i click on show button i will see popup, and if i try to click on the hide button, nothing happens

@foolip
Copy link
Member

foolip commented Mar 24, 2024

@promocot I see you're missing a </button> in that second example, but with or without it still works in my testing, clicking "Hide popover" closes it.

If you have more question please try Stack Overflow, and if you think there are browser bugs file a bug with the appropriate browser.

This issue was to track popover for inclusion in Interop 2024, and is not a good place to ask for help with popover.

@promocot
Copy link

I am not missing the button in the second example, I place the button inside the popover as a close button. I tested in chrome. Ok i will try to write email for chrome developers

@promocot
Copy link

I found a problem, in my test case i used attribute for SVG icon not button

but if I add a button with an icon, and set the attribute for the button, all works

@foolip
Copy link
Member

foolip commented Mar 24, 2024

@promocot that's interesting, do you mean you were trying to add the popovertarget or popovertargetaction attributes to an SVG element? This probably doesn't work the way the spec is written, can you file an issue at https://github.com/whatwg/html/issues with a code sample of what you were attempting?

@promocot
Copy link

Yes, I will write about this with a video demo and codeopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: Done
Development

No branches or pull requests