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

Add imperative access to popover invoker, and connect popover/invoker to implicit anchor element #10728

Merged
merged 8 commits into from
Nov 15, 2024

Conversation

mfreed7
Copy link
Contributor

@mfreed7 mfreed7 commented Oct 28, 2024

This includes two related changes:

  1. The showPopover() and togglePopover() methods now include an options bag that allows setting the popover invoker implicitly. Previously this was only possible via the declarative popovertarget attribute.
  2. Popover invokers (set declaratively or imperatively) now create an implicit anchor element reference for that popover.

This new behavior was resolved in the WHATWG/CSSWG/OpenUI joint task force meeting on June 26, 2024.

Closes #10442
Closes #10675

(See WHATWG Working Mode: Changes for more details.)


/dom.html ( diff )
/infrastructure.html ( diff )
/popover.html ( diff )
/references.html ( diff )

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normative behavior looks good. A variety of editorial tweaks.

source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
Copy link
Contributor Author

@mfreed7 mfreed7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick review! I think I got everything, LMK if I missed something.

source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editorially LGTM (with one more nit). Let us know when all the boxes are checked.

source Outdated Show resolved Hide resolved
@mfreed7
Copy link
Contributor Author

mfreed7 commented Oct 30, 2024

Editorially LGTM (with one more nit). Let us know when all the boxes are checked.

Thanks! Done. It would be good to get the attention of @annevk and @smaug----, since the implementer support checkbox relies on our joint resolution at the form controls task force. (And I therefore didn't want to clutter up the standards positions requests for this.)

source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
This includes two related changes:
 1. The `showPopover()` and `togglePopover()` methods now include an
    options bag that allows setting the popover invoker.
 2. Popover invokers (declaratively or imperatively set) now create
    an implicit anchor reference for that popover.

This new behavior was resolved in the [WHATWG/CSSWG/OpenUI joint task
force meeting on June 26, 2024](whatwg#9144 (comment)).

Closes whatwg#10442
Closes whatwg#10675
@domenic domenic merged commit b4e1fb1 into whatwg:main Nov 15, 2024
2 checks passed
@annevk
Copy link
Member

annevk commented Nov 15, 2024

@mfreed7 OP doesn't include a link to a PR for renaming the tests away from .tentative. Have the tests also been updated to test source instead of invoker?

@mfreed7
Copy link
Contributor Author

mfreed7 commented Nov 15, 2024

@mfreed7 OP doesn't include a link to a PR for renaming the tests away from .tentative.

https://chromium-review.googlesource.com/c/chromium/src/+/6025803

There seems to be a chicken and egg problem with this. I've had folks complain about renaming .tentative too early (before the spec PR lands) and too late (after the spec PR lands).

Have the tests also been updated to test source instead of invoker?

web-platform-tests/wpt#49189

@annevk
Copy link
Member

annevk commented Nov 18, 2024

There seems to be a chicken and egg problem with this.

Ideally you create a PR against web-platform-tests that the specification editors can merge. That's how we have done this thus far.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 18, 2024
The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 18, 2024
The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 18, 2024
The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 18, 2024
The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}
@mfreed7
Copy link
Contributor Author

mfreed7 commented Nov 18, 2024

There seems to be a chicken and egg problem with this.

Ideally you create a PR against web-platform-tests that the specification editors can merge. That's how we have done this thus far.

Yeah, ok. The Chromium process makes that a bit harder, since we're accustomed to doing the review for WPT stuff within our code review system, and it then gets pushed automatically. I don't know if there's an easy way to tell it not to merge the WPT PR when the Chromium PR gets merged. If you know of one, please let me know!

@annevk
Copy link
Member

annevk commented Nov 18, 2024

You don't have to use the Chromium process to create a WPT PR. You can just create a PR directly against the repo.

@mfreed7
Copy link
Contributor Author

mfreed7 commented Nov 18, 2024

You don't have to use the Chromium process to create a WPT PR. You can just create a PR directly against the repo.

Yeah. It's just a lot more work. 😄

@annevk
Copy link
Member

annevk commented Nov 18, 2024

That seems strange. It really shouldn't be.

@mfreed7
Copy link
Contributor Author

mfreed7 commented Nov 18, 2024

That seems strange. It really shouldn't be.

Only due to familiarity. I spend 99% of my time writing C++ code within Chromium's tooling, so venturing outside is painful. It's ok - I'll try to put up the rename PRs like this in the future.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 20, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 21, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Nov 22, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 26, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 73e41baa89bb5804a6fb8a776bfe270b6204e7db
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 27, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 73e41baa89bb5804a6fb8a776bfe270b6204e7db
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 27, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 73e41baa89bb5804a6fb8a776bfe270b6204e7db
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 27, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <[email protected]>
Reviewed-by: Di Zhang <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 5092cf8b763c8b49bd138427b54cb868786bab4d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 5092cf8b763c8b49bd138427b54cb868786bab4d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Dec 1, 2024
…PTs, a=testonly

Automatic update from web-platform-tests
Remove .tentative from popover invoker WPTs

The spec PR landed:

  whatwg/html#10728

so this removes .tentative from the WPTs.

Bug: 364669918
Change-Id: I35e50fff8d94ff52e212844814a4e597c35d78b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6025803
Commit-Queue: Di Zhang <dizhanggchromium.org>
Reviewed-by: Di Zhang <dizhanggchromium.org>
Auto-Submit: Mason Freed <masonfchromium.org>
Cr-Commit-Position: refs/heads/main{#1384325}

--

wpt-commits: 6572d5b33f7e95cb1f857ed76d2cdd7939ef47ad
wpt-pr: 49225

UltraBlame original commit: 5092cf8b763c8b49bd138427b54cb868786bab4d
@smaug----
Copy link

That seems strange. It really shouldn't be.

Only due to familiarity. I spend 99% of my time writing C++ code within Chromium's tooling, so venturing outside is painful. It's ok - I'll try to put up the rename PRs like this in the future.

FWIW, similar here. Writing wpts is quite a bit easier on mozilla-central vs dealing with wpt repository explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: popover The popover attribute and friends
4 participants