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

[selectlist] Add showPicker() method to <selectlist> #807

Closed
lukewarlow opened this issue Aug 19, 2023 · 3 comments · Fixed by #835
Closed

[selectlist] Add showPicker() method to <selectlist> #807

lukewarlow opened this issue Aug 19, 2023 · 3 comments · Fixed by #835
Labels
needs edits This is ready for edits to be made select These are issues that relate to the select component

Comments

@lukewarlow
Copy link
Collaborator

lukewarlow commented Aug 19, 2023

All input elements with some concept of a picker have a showPicker function that opens that UI. Adding this to <select> was marked as future work in whatwg/html#7319. However, a subsequent request for this behaviour was raised in whatwg/html#7957.

It would seem like a relatively simple addition to <selectlist> and I imagine there's more use cases for it like the above issue.

It's worth noting that while showPicker() doesn't exist for <select>s it does work for inputs with a datalist attached (inside of Chrome other browser may vary).

@josepharhar josepharhar added the select These are issues that relate to the select component label Aug 19, 2023
@josepharhar
Copy link
Collaborator

josepharhar commented Aug 29, 2023

I am tentatively supportive. I was just writing some reftests and I had to do interesting things to get the listbox open, and I was disappointed to find that something like this didn't already exist

@mfreed7 mfreed7 added the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Aug 31, 2023
@mfreed7
Copy link
Collaborator

mfreed7 commented Aug 31, 2023

Adding Agenda+ per the request at today's OpenUI meeting.

I'm supportive of adding showPicker() to HTMLSelectListElement.

@css-meeting-bot
Copy link

The Open UI Community Group just discussed [selectlist] Add `showPicker()` method to `<selectlist>` , and agreed to the following:

  • RESOLVED: Add showPicker to selectlist matching existing input conventions, other methods can be added across the board in future if need be.
The full IRC log of that discussion <hdv> Luke_W_: I noticed WHATWG added showPicker to input elemenets and it was deferred to the future for being added to select
<hdv> Luke_W_: so I could see it would make sense for it to be added to selectlist too
<masonf> +1
<una> q+
<gregwhitworth> ack una
<hdv> una: sounds good to me… is there a toggle method also? or just show?
<hdv> masonf: open question we haven't talked about, I think, for selectlist. We do have it for popover
<hdv> una: it looks like from the issue that there is future work for closePicker
<masonf> q?
<gregwhitworth> q+
<hdv> Luke_W_: sounds like worth adding as well
<masonf> q+
<gregwhitworth> ack masonf
<hdv> masonf: I remember the convo, but not sure if there was a reason it wasn't added to select before?
<hdv> Luke_W_: there didn't seem to be solid reason for adding… 
<hdv> s/adding/not adding
<hdv> gregwhitworth: feels like we should do it in totality
<hdv> gregwhitworth: would like to see the marriage between popover and this idea for selectlist to work out, like similar states and stuff
<gregwhitworth> we're on google meet as jitsi is down
<hdv> masonf: showPicker was added relatively recently… a complaint about it was that not all browsers had pickers for all the elements, like some browsers didn't have a picker for datepicker
<gregwhitworth> link is in discord telecon channel
<jarhar> q+
<hdv> masonf: so being able to find out if a picker was shown was regarded as something the platform probably shouldn't be revealing
<gregwhitworth> ack gregwhitworth
<gregwhitworth> ack jarhar
<hdv> masonf: though that conversation probably doesn't apply to select or selectlist as they always have pickers by definition
<hdv> jarhar: seems like we want to have showPicker, togglePicker and closePicker
<masonf> q?
<masonf> q+
<hdv> jarhar: I think we should certainly add showPicker and possibly closePicker as well.
<gregwhitworth> ack masonf
<brecht_dr> +1
<hdv> jarhar: and follow conventions
<hdv> masonf: +1 to what you just said… selectlist should follow convention of all the other things that support showPicker
<una> +1 to masonf
<Luke_W_> proposed resolution: Add showPicker to selectlist matching existing input conventions, other methods can be added across the board in future if need be.
<masonf> +1
<Luke_W_> RESOLVED: Add showPicker to selectlist matching existing input conventions, other methods can be added across the board in future if need be.
<hdv> +1

@lukewarlow lukewarlow added needs edits This is ready for edits to be made and removed agenda+ Use this label if you'd like the topic to be added to the meeting agenda labels Sep 14, 2023
lukewarlow added a commit to lukewarlow/open-ui that referenced this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs edits This is ready for edits to be made select These are issues that relate to the select component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants