ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
32 stars 8 forks source link

Select list option groups #2111

Closed atmgrifter00 closed 4 months ago

atmgrifter00 commented 4 months ago

Pull Request

šŸ¤Ø Rationale

This PR only introduces groups to the Select. Providing this feature for the Combobox 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 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:

šŸ§Ŗ Testing

Unit tests. Matrix tests.

āœ… Checklist

rajsite commented 4 months ago

@atmgrifter00 I think the richtext changes are trivial and non-breaking so don't need to wait for @vivinkrishna-ni