Introduces the ListOptionGroup component. This component required some APIs that manage the visibility of visual separators between groups and other visuals. This management occurs by the Select handling when the hidden or visibilityHidden state of a ListOptionGroup changes and then updating the necessary states on both the group that changed its hidden state and the adjacent groups if present. The ListOptionGroup manages its own visibilityHidden\hidden state based on the aggregate state of its contained ListOptions.
I've also changed the ListOption to assign itself to the option slot that now exists in both the ListOptionGroup template and all of the various dropdown components (i.e. Select, Combobox, and RichTextMentionListbox). This follows a similar pattern to that of the Tabs component and its related pieces.
Out of scope:
Explicit handling of groups within groups. It may be prudent to provide a more robust implementation that sets some validity state on the Select itself. For now, if a client provides a nimble-list-option-group within another nimble-list-option-group, nothing will get displayed in the dropdown, but no exception is thrown. The documentation currently states that this is unsupported.
š§Ŗ Testing
Unit tests. Matrix tests.
ā Checklist
[ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
Pull Request
š¤Ø Rationale
791
This PR only introduces groups to the
Select
. Providing this feature for theCombobox
will be handled separately.š©āš» Implementation
Introduces the
ListOptionGroup
component. This component required some APIs that manage the visibility of visual separators between groups and other visuals. This management occurs by theSelect
handling when thehidden
orvisibilityHidden
state of aListOptionGroup
changes and then updating the necessary states on both the group that changed its hidden state and the adjacent groups if present. TheListOptionGroup
manages its ownvisibilityHidden\hidden
state based on the aggregate state of its containedListOption
s.I've also changed the
ListOption
to assign itself to theoption
slot that now exists in both theListOptionGroup
template and all of the various dropdown components (i.e.Select
,Combobox
, andRichTextMentionListbox
). This follows a similar pattern to that of theTabs
component and its related pieces.Out of scope:
Select
itself. For now, if a client provides animble-list-option-group
within anothernimble-list-option-group
, nothing will get displayed in the dropdown, but no exception is thrown. The documentation currently states that this is unsupported.š§Ŗ Testing
Unit tests. Matrix tests.
ā Checklist