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

<select> with size > 1 is not specified #153

Closed
dandclark opened this issue Aug 13, 2020 · 7 comments · Fixed by #848
Closed

<select> with size > 1 is not specified #153

dandclark opened this issue Aug 13, 2020 · 7 comments · Fixed by #848
Labels
select-v2 Features regarding the second iteration of the selectmenu element

Comments

@dandclark
Copy link
Collaborator

<select size="n"> with n > 1 has an appearance similar to <select multiple>, with no button and no light dismiss. It's not quite the same as multiple though, since only one option can be specified. The current anatomy doesn't discuss size > 1 at all; this should be added.

That is, assuming this is a modality that we even want to support in the new <select>? Not sure how commonly this is actually used.

@dandclark dandclark added the select These are issues that relate to the select component label Aug 13, 2020
@una
Copy link
Collaborator

una commented Aug 26, 2020

size isn't as straightforward with our proposal considering we'd want the children to be stylable (padding, border, content etc.). Supporting the size attribute will be determined based on the if we want the new <select> to be full interoperable with existing properties or not. Just bringing up the additional challenge here.

@scottaohara
Copy link
Collaborator

scottaohara commented Jan 13, 2022

if there ends up being a separate listbox element (which seems a very good idea to me), then I don't see the reason to also have a size attribute on the new select. Authors could use the new select for a select that invokes a listbox popup... and a listbox for a static listbox.

Edit: i retract my statement about a listbox element being a good idea. i think we can do better.

@github-actions
Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label Jul 13, 2022
@josepharhar
Copy link
Collaborator

I'm guessing that like the existing <select> element, the size attribute would only apply to <selectmenu multiple>, which we have deferred, so I'm going to change the label from select to select-v2

@josepharhar josepharhar added select-v2 Features regarding the second iteration of the selectmenu element and removed select These are issues that relate to the select component labels Feb 21, 2023
@github-actions github-actions bot removed the stale label Feb 22, 2023
@scottaohara
Copy link
Collaborator

I'd submit we disregard size, since it's purpose is to create a single-select in-page listbox.

rather, and why i edited my previous comment in this thread, because present scott is smarter than past scott, than support size there should probably be a new (better) element to facilitate what <select size=>1> achieves (awkwardly) today. and that elements is probably not selectmenu

@josepharhar
Copy link
Collaborator

I was talking to mason a while ago about the size attribute, and he thought it would be a bad idea since we would have to figure out exactly what the height of an option is and then set the height of the container based on that - but what if the height of the options changes in response to the container height? We would end up doing some sort of circular layout. The existing <select multiple> element doesn't have this problem since you can't really style it.

I think we should not support the size attribute for <selectlist>, <selectlist multiple>, or <listbox>.

@scottaohara
Copy link
Collaborator

agreed. size isn't really a necessary attribute to carry over - since it's the method to make a select element change from a trigger that invokes the listbox popup, to just displaying the element as a persistent listbox in the web page. outside of that, everything else it does can be handled with css.

josepharhar added a commit to josepharhar/open-ui that referenced this issue Sep 26, 2023
josepharhar added a commit that referenced this issue Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
select-v2 Features regarding the second iteration of the selectmenu element
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants