Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfeat: add select spec #3619
feat: add select spec #3619
Conversation
|
@eljefe223 Doesn't look like I'll get a chance to review today but I'll try to take a look first thing in the morning. Real quick, I wanted to mention that there's a lot of work on select happening in OpenUI. If you haven't checked that out, take a look since we want to try to align with them as much as possible and we may then also have some feedback into that process. |
As FYI @EisenbergEffect this is based off the OpenUI work. FYI to @gregwhitworth that we're officially starting work in FAST on select as part of our partnership |
|
Awesome. I hadn't had a chance to review yet but just wanted to double check that at the start. |
|
You may want to move this to |
@janechu Yeah, I sort of did this out of defiance, Is there a good reason we do it this way? I'm happy to move it, but I it seems weird that we place it in specs only temporarily and then ultimately move it into its own folder. |
|
@eljefe223 Well, speaking broadly, I think we wanted to keep it so that specs are find-able for things (not just components) that were being worked on conceptually but did not yet have any code associated with them. When they do have code associated then we would move them to tie them to the code as documentation. If, for example, you wrote a spec and it stayed in some nested folder and it was forgotten, someone might be going through the |
| - `fast-select` | ||
|
|
||
| *Attributes:* | ||
| - `autocomplete` - Allows the developer to provide a hint on how to search the content within the `<fast-option>`(s) |
This comment has been minimized.
This comment has been minimized.
EisenbergEffect
Aug 7, 2020
Contributor
Would be great to see a more through explanation of how this is intended to work.
This comment has been minimized.
This comment has been minimized.
eljefe223
Aug 10, 2020
Author
Contributor
I was following the Open UI spec, I believe in the past we filtered the potential results, but thinking about this I'm a bit confused on why select would have this. This seems like more of feature of a dropdown on an autosuggest of textbox. @gregwhitworth can you clarify this feature?
This comment has been minimized.
This comment has been minimized.
chrisdholt
Aug 11, 2020
Member
We can also hold on adding autocomplete in the initial implementation.
This comment has been minimized.
This comment has been minimized.
chrisdholt
Aug 11, 2020
Member
Actually this may be a good thing to move to "next steps" - investigate autocomplete, etc...
This comment has been minimized.
This comment has been minimized.
eljefe223
Aug 12, 2020
Author
Contributor
@gregwhitworth and I were having a discussion offline and wanted to include those discussions here.
We will move this to next steps but wondering if select should have a text input or not, This seems more like a combobox or search box to me. I could not find any documentation online that "searching" options should be part of a select.
My issue with using the terminology of "search" is that when you search the text you input is not always in the suggested dropdown, which makes it not a select. Because you are not selecting some predetermined value
|
|
||
| ### Features | ||
| - Select one or multiple `<fast-option/>`(s) using the `multiple` attribute | ||
| - When Dropdown does not have enough screen real estate to open below `<fast-select>` it will open above. |
This comment has been minimized.
This comment has been minimized.
scomea
Aug 7, 2020
Member
Do we want more positioning choices (ie. always open above)? Leaving that to later version works too.
This comment has been minimized.
This comment has been minimized.
scomea
Aug 7, 2020
Member
Have you thought about how the flyout menu is placed in the dom, breaks out of parent containers or not, positioning mode?
This comment has been minimized.
This comment has been minimized.
eljefe223
Aug 7, 2020
Author
Contributor
I'm open here, but thinking it would just use the intersection observer work you have done.
| - `required` - boolean value that sets the field as required | ||
| - `selectedIndex` - The index of the first or last selected `<fast-option>` element, depending on the value of `multiple` | ||
| - `selectedOptions` - An `HTMLCollection` of the selected `<fast-option>` elements | ||
| - `size` - If the `<fast-select>` is shown with a scrollbar, this represents how many `<fast-option>`s are visible. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
gregwhitworth
Aug 7, 2020
It controls how many options are visible within the listbox which does indirectly control the height of the listbox. https://html.spec.whatwg.org/multipage/form-elements.html#attr-select-size
This comment has been minimized.
This comment has been minimized.
gregwhitworth
commented
Aug 7, 2020
Can you make sure to file or provide feedback against the Open UI spec as you find gaps and if you have a proposal put it into the issue or file a PR? |
| @@ -0,0 +1,158 @@ | |||
| # Select + Select-Option | |||
This comment has been minimized.
This comment has been minimized.
awentzel
Aug 10, 2020
Member
I think there should be some documentation around proper usage of a Select inside or outside of a <form>
| - `menu-open` -If the menu of the `<fast-option>` is open or not | ||
| - `multiple` - Allows user to select more than one `<fast-option>` | ||
| - `name` - Name of the control | ||
| - `options` - Returns an array of the `<fast-option>` elements contained by the `<fast-select>` element |
This comment has been minimized.
This comment has been minimized.
janechu
Aug 10, 2020
Member
Are we expecting this list of options to be updated at any point? If you are the use of index for selected-index and selected-options may be problematic.


eljefe223 commentedAug 4, 2020
Description
Adds spec for
<fast-select/>and<fast-option/>Issue type checklist
Is this a breaking change?
Adding or modifying component(s) in
@microsoft/fast-componentschecklistProcess & policy checklist