equinor / webviz-core-components

Discipline agnostic Webviz and Dash components.
https://github.com/orgs/equinor/projects/24
MIT License
15 stars 16 forks source link

New Range Filter Component #194

Open jorgenherje opened 2 years ago

jorgenherje commented 2 years ago

Create component for filtering among list of integers - i.e. create ranges

Feature request came when wanting to filter among list of realization numbers in a webviz-subsurface-plugin.

The Volumetrics-plugin has such filtering functionality, but callback functionality can become complex. To simplify usage of such filtering, a React-component can be considered.


Possible Solution

Allow each component to edit the selected elements from list, if the range slider is selected, only one range is valid. If the list is selected, multiple ranges can be selected. The input TextField can be edited as well, and will modify values/selections in the RangeSlider and List. Can add delay on props update to prevent callbacks immediately after edit.

Input:

Output:


Print screen from Volumetrics-plugin image

image


Additional context

Consider if wcc.Select should have some sort of delay, as callbacks fire fairy quickly during interaction with current solution. Can have "edit"-mode where props are not updated before edit mode timer has timed out?

Feature request created: https://github.com/equinor/webviz-core-components/issues/195

image

rubenthoms commented 2 years ago

Another suggestion could be the following component design with multiple single-value and range selections in a single slider: https://www.figma.com/file/wg5OpOtyZ2mPCaK8IUYcf8/Range-Filter-Component?node-id=0%3A1