-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/standardize property filters #71
Conversation
So excited for this!
This seems fine! I think what would be ideal here is to have this get approved and merged into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
extractValuesFromRangeOperatorFilterString(currentRange?.value).minValue ?? overallMin | ||
); | ||
const [searchMaxValue, setSearchMaxValue] = React.useState( | ||
extractValuesFromRangeOperatorFilterString(currentRange?.value).maxValue ?? overallMax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would be nice if FileFilter could store a Range
object with min
and max
fields instead of just a string, but that's probably beyond the scope of this PR
/* display: none; <- Crashes Chrome on hover */ | ||
-webkit-appearance: none; | ||
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to see screenshots to review changes with substantial CSS work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add! In this case though this is just re-use of other css modules elsewhere in the codebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added screenshots to PR description!
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
Numerical range filter
Date range filter
closes #54