VEuPathDB / CoreUI

Core UI for VeuPathDB applications. Provides components, style definitions, and utilities to enable developers to rapidly assemble complex applications with consistent UI and UX across our portfolio of sites.
1 stars 0 forks source link

Create SelectTree and CheckboxTree components #92

Closed jernestmyers closed 2 years ago

jernestmyers commented 2 years ago

Works toward #89

jernestmyers commented 2 years ago

This branch contains the work from this PR as well, which wires together the SelectList component. Some tweaks and adjustments were made to accommodate the SelectTree component, but it's mostly the same.

Apologies in advance for not separating this out into smaller PRs.

dmfalke commented 2 years ago

I haven't yet read the code thoroughly, but I have played with the stories in storybook.

Functionality wise, I think this is almost there! There are a few things that I think need to be addressed, however:

CheckboxTree

When isSelectable is false, it acts as if it's in single-select mode. I.e., it still registers a selection and highlights the selected node. I think this might be to support using radio buttons for single select mode. I think we should decide to either always use radio buttons, or to never use radio buttons. When this prop is false, I don't think any selection should be possible. We have active use cases for all three options. I suggest we bring this topic to the styling group.

SelectList

Looks great!

SelectTree

It doesn't seem like the selection is being propagated. The label for the button always says "Select a variable", unless I toggle isSelectable to false, in which case the node I click on becomes selected.