Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #260 +/- ##
============================================
+ Coverage 72.85% 73.48% +0.63%
- Complexity 388 398 +10
============================================
Files 47 47
Lines 1260 1290 +30
============================================
+ Hits 918 948 +30
Misses 342 342 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I have updated the implementation to use a dropdown menu instead, and merge the AND/OR toggle into the dropdown: Recording.2025-04-02.151712.mp4 |
|
Does the current behavior of hiding list facets when there are no values to list always make sense? What if I select We could show the list facet always if it has a filter. If we are not already doing that. But that might not go far enough. We are always showing the range facets, so dropping the list facets seems inconsistent. If there are no values to list, what about showing no matching items instead of the list? |
We should always show facets that has an active filter. If we hide the facet, then there are no good way to dismiss the filter other than modifying the query string (which is not feasible). There are multiple things that we can do to improve the experience:
|
The current idea was to hide a facet with no values when nothing was selected in that specific facet. And if values were selected in the facet, but ended up with no results due to switching from OR to AND, at least show the facet and the selected values with 0 count (TODO as per #180 and #249).
This is to some extent unintentional. Hiding this would only work if we check that all the matching results do not have that date field. Since we didn't do much with "no value" before (besides making the query work), the UI wasn't catering for it. With the list facet it was different, since we already got the allowed values from Elasticsearch, and therefore knew when nothing existed. Additionally, with a list facet you are not supposed to select something that can lead to no results. With a range facet you can enter a range that might lead to no results. We cannot really prevent that, unless we query the min/max for that field and add validation. In other words: range facets can also be hidden, but requires additional ES queries and logic.
The current behavior is similar to e-commerce facets, and zbMath, where empty facets are not shown. But specifically: only if nothing was selected. In the example of selecting IMO adding the message would be a non-standard solution to the current problem of hiding facets inconsistently. The appeal of hiding facets is to narrow the UI and show the user exactly what can be filtered on. So if that's not entirely our intention, and we instead want to repurpose the facets to also act as "data quality indicators" (by explicitly saying when there is nothing), then a message might be necessary. |
|
TODO tracked by #261 |
For #119
For #117
Screencast_20250331_140434.webm
TODO: