Closed Bug 1692730 Opened 5 years ago Closed 4 years ago

[wpt-sync] Sync PR 27623 - Introduce <selectmenu> with basic shadow structure and some controller code

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 27623 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/27623
Details from upstream follow.

b'Daniel Clark <daniec@microsoft.com>' wrote:

Introduce <selectmenu> with basic shadow structure and some controller code

Begin implementing the \<selectmenu> element, a version of \<select> with
a fully author-customizable UI.

See https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/9TcfjaOs5zg/m/WAiv6WpUAAAJ
and associated links for additional context.

Establish the basic shadow DOM structure, with a button (which
includes an arrow icon and a container to show the value), and
a listbox based on \<popup>. There are \<slot> elements to add
\<option>s to the popup and replace any of the default parts.

Include some basic styles. The default button part looks something
like the native \<select>, but the default listbox will need more
work to improve its appearance.

Add basic controller code using NativeEventListeners. Clicking
the button part opens the listbox \<popup>, and the value property
and text shown in the button are updated when an option is clicked.
This controller code is applied to the default parts and to
author-supplied parts that are included via the \<slot>s.

Add tests to validate some basic scenarios involving the
controller code. Note, a couple of the
selectmenu-value.tentative.html
tests fail because updates to the value property are not yet
synchronous (should they be?).

There are many TODOs and open questions to investigate, but
this change establishes a starting point for exploring
an approach to customizable form controls.

Bug: 1121840
Change-Id: I68c0513b0e30813cbaa3b69fc2acb9086c7400ba
Reviewed-on: https://chromium-review.googlesource.com/2693857
WPT-Export-Revision: 9fb33517e2055462003709d987d81fca37e71f65

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 7 subtests

Status Summary

Firefox

OK : 2
FAIL : 10

Chrome

OK : 2
FAIL : 10

Safari

OK : 1
FAIL : 7
ERROR: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/semantics/forms/the-selectmenu-element/selectmenu-popup.tentative.html
Opening the popup and clicking an option should change the selectmenu's value: FAIL (Chrome: FAIL)
With custom button and popup: opening the popup and clicking an option should change the selectmenu's value: FAIL (Chrome: FAIL)
Clicking a popup with no listbox part does nothing: FAIL (Chrome: FAIL)
/html/semantics/forms/the-selectmenu-element/selectmenu-value.tentative.html
Test that HTMLSelectMenu with no options has empty string for value: FAIL (Chrome: FAIL, Safari: FAIL)
Test value with HTMLOptionElement element option parts: FAIL (Chrome: FAIL, Safari: FAIL)
Test value with non-HTMLOptionElement element option parts: FAIL (Chrome: FAIL, Safari: FAIL)
Test that value is updated when options are removed: FAIL (Chrome: FAIL, Safari: FAIL)
Test that value is updated when the part attribute is removed: FAIL (Chrome: FAIL, Safari: FAIL)
Test that slotted-in selected-value part is updated to value of selectmenu: FAIL (Chrome: FAIL, Safari: FAIL)
Test that option parts in a slotted-in listbox are reflected in the value property: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/69be64b67b03 [wpt PR 27623] - Introduce <selectmenu> with basic shadow structure and some controller code, a=testonly https://hg.mozilla.org/integration/autoland/rev/147716de4c9c [wpt PR 27623] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/802f2f9859fa [wpt PR 27623] - Introduce <selectmenu> with basic shadow structure and some controller code, a=testonly https://hg.mozilla.org/integration/autoland/rev/1552e9279679 [wpt PR 27623] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7edf34629e5f [wpt PR 27623] - Introduce <selectmenu> with basic shadow structure and some controller code, a=testonly https://hg.mozilla.org/integration/autoland/rev/b5c7e71cb851 [wpt PR 27623] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.