trelliscope / trelliscopejs-lib

JavaScript viewer for Trelliscope displays
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

Fix inputs that are missing from R package #794

Closed Incin closed 1 year ago

Incin commented 1 year ago

We are missing input options that are available to specify in the R interface. These are the following

Ryan can provide an example that has these specified.

hafen commented 1 year ago

You can see the type definitions for these inputs here:

https://github.com/trelliscope/trelliscope/blob/main/inst/types/types.ts#L97-L117

I would base off of the following MUI components for these:

Note that for the number input, min and max are optional. If one or both are provided, we should restrict inputs to those ranges.

Another important thing is that we need to keep the panel labels at their specified maximum height (I think it's 27px). So we may need to get creative with the size of some of these. It may make most sense for many of these to show a read-only representation of the current value in the panel label with the edit pencil icon and a popover that opens up to provide more space for the input, like we have done with the text input (see image below). We probably will need this for checkbox and multiselect. Maybe even radio to deal with the issue of too many options bleeding outside the available space for the label.

image
hafen commented 1 year ago

I have made an example with all of these types of inputs here:

https://github.com/hafen/trelliscope-examples3/tree/main/inputs_test