kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

remove 'all' options from filters

Open indirectlylit opened this issue 3 years ago • 8 comments

Observed behavior

observation illustration
The default unfiltered state really corresponds to these "all" filters being selected, but that is not currently the case image
This leads to contradictory user-facing text image
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" image

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.

image

User-facing consequences

Confusing filter options

Context

0.15.0-beta3

indirectlylit avatar Dec 08 '21 14:12 indirectlylit

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.

akash5100 avatar Dec 10 '21 04:12 akash5100

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?

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 rename None of the above to something like clear 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".

indirectlylit avatar Dec 10 '21 18:12 indirectlylit

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.

indirectlylit avatar Dec 10 '21 18:12 indirectlylit

Please point out the files which are need to modified.

akash5100 avatar Dec 11 '21 12:12 akash5100

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.

indirectlylit avatar Dec 11 '21 18:12 indirectlylit

Before After
Screenshot from 2021-12-12 13-35-26 Screenshot from 2021-12-12 13-37-02

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

akash5100 avatar Dec 12 '21 08:12 akash5100

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.

indirectlylit avatar Dec 12 '21 16:12 indirectlylit

Thank you @indirectlylit for your answer, I will soon submit a PR.

akash5100 avatar Dec 12 '21 16:12 akash5100

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

Screen Shot 2022-10-04 at 10 37 46 AM

jtamiace avatar Oct 04 '22 17:10 jtamiace

@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 avatar Oct 04 '22 18:10 radinamatic

@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

jtamiace avatar Oct 04 '22 21:10 jtamiace

Fixed with https://github.com/learningequality/kolibri/pull/9797

marcellamaki avatar Oct 25 '22 13:10 marcellamaki