AllenInstitute / biofile-finder

An open-use web application created for easy access, collaboration, and sharing of datasets through rich metadata search, filter, sort, and direct viewing in common industry applications or in our web-based 3D Volume Viewer.
https://biofile-finder.allencell.org/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Feature/standardize property filters #71

Closed aswallace closed 8 months ago

aswallace commented 8 months ago

Description of Changes

This moves the file properties that were previously in the FileMetadataSearchBar into the filter side bar to make their behavior/appearance more consistent with the other annotation filters. 3 new filter form types are also added: date range, regular numerical range, and a search box. The search box is primarily intended for text-type annotations that can't provide selectable values from the file explorer API (e.g., file name, file path). I also left the ListPicker component in place for numerical/date annotations where there are few enough options that it's not significantly easier to use a range.

Also removed the FileMetadataSearchBar from the UI and deleted the component + its tests

How to Review

Aside from the new form components, the changes are mostly to annotation and filter logic -- mainly, when file properties are included as part of the annotation lists and when they aren't. My main concern is how extensible this solution will be (especially for Sean's csv work), since it's still pretty specific and hardcoded to handling file properties.

Testing

Tested manually and with unit tests.

Screenshots of new UI components

Search box filter

Search box filter

Numerical range filter

Numerical range filter

Date range filter

Date range filter

closes #54

SeanLeRoy commented 8 months ago

So excited for this!

My main concern is how extensible this solution will be (especially for Sean's csv work), since it's still pretty specific and hardcoded to handling file properties.

This seems fine! I think what would be ideal here is to have this get approved and merged into main then I'll build a branch off this work that wraps up the conversion of file properties into generic annotations. Generally we should be okay special casing the display of top level file properties and their filtering options, but should opt towards making their filtering and overall inclusion to the metadata blocks of state as blended as possible.