kolibri
kolibri copied to clipboard
remove 'all' options from filters
Observed behavior
observation | illustration |
---|---|
The default unfiltered state really corresponds to these "all" filters being selected, but that is not currently the case | ![]() |
This leads to contradictory user-facing text | ![]() |
Separately, the filter "None of the above" (a.k.a. 'uncategorized' - see https://github.com/learningequality/kolibri/issues/8872) doesn't make any sense when one thing above is "All categories" | ![]() |
From @rtibbles:
filtering by
all <X>/no <X>
probably isn’t terribly useful, and much more useful to just be able to turn off the filter
From @jtamiace:
also becomes ambiguous what should happen when multiple filters are selected - what’s the difference between an empty filter and when it’s set to ‘All’?
Expected behavior
Remove 'all' options from filters, where empty is implicitly ‘All’. this is in line with our decision to turn the dropdowns for Channel, language, etc. into 'clearable' dropdowns.
User-facing consequences
Confusing filter options
Context
0.15.0-beta3
Can you help me, which files are needed to modify?
In the case of the all
filter, selecting the all
filter will set the filters to default and the clear all
button is doing the same thing, right?
So we are going to remove the all
, All categories
option completely and rename None of the above
to something like clear filter
/clear
etc.
In the case of the
all
filter, selecting theall
filter will set the filters to default and theclear all
button is doing the same thing, right?
That's correct. the 'clear all' button has the same effect as setting the filters to default, which is "unfiltered"
Alternatively, the user can achieve the same result by deselecting any active filters one at a time.
So we are going to remove the
all
,All categories
option completely and renameNone of the above
to something likeclear filter
/clear
etc
Not quite. "None of the above" has a different meaning and should remain as-is. It basically means "items that do not have any category".
FYI my understanding is that we may want to target this at the 0.15.x
branch, but note that we are getting very close to release this week so this is contingent on the change being relatively straightforward and not risky. @rtibbles and @marcellamaki will make that decision.
Please point out the files which are need to modified.
I believe this main components are the files in this directory:
https://github.com/learningequality/kolibri/tree/release-v0.15.x/kolibri/plugins/learn/assets/src/views/EmbeddedSidePanel
This might be as simple as deleting the 'all' buttons. However there is always a chance that some JS state or other files might need some cleanup after.
Before | After |
---|---|
![]() |
![]() |
Does this result look good? If this is correct, should I comment the button (maybe for the future) or delete it?
edit: please tell me if I am missing something from here (I think we only have to update the UI right?)
Expected behavior
Thankyou
Thank you!
Yes, the UI looks as I would expect. You can delete the code rather than commenting it out.
The main thing will be to make sure nothing strange happens in actual usage: it should still be possible to clear filters by using 'clear all' or clearing any toggles that are currently active.
Thank you @indirectlylit for your answer, I will soon submit a PR.
An updated spec based on the discussion in this thread that includes decisions above:
Removing the "All" options from the Category and Activity filters and introducing a "Clear" action in filter panel when the filter is active

@jtamiace Could you also review the Gherkin scenarios in this folder and suggest the steps that need to be added and/or amended? Mention @pcenov and me so we're ready to support when the change is introduced in the code.
@radinamatic @pcenov it looks like these changes are applicable to two files there.
/search-with-category-filters.feature Remove the entire scenario: Select "All categories" from the Category filter"
/search-results.feature Add new scenarios for clearing category and activity. Steps (given you're viewing search results): Scenario: "Clear filter from Categories" When I click the "Clear" button next to the Categories label in the filter panel Then I see < filter option > is no longer selected in the filter panel And I see the search results matching < filter options > are no longer included And I see the chips for < filter option > are removed from the header And I see < filter option > is no longer selected in the filter panel
Fixed with https://github.com/learningequality/kolibri/pull/9797