Skip to content

Allow multiple values to be selected in each filter category #23

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

Open
ooloth opened this issue Jul 21, 2019 · 0 comments
Open

Allow multiple values to be selected in each filter category #23

ooloth opened this issue Jul 21, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@ooloth
Copy link
Owner

ooloth commented Jul 21, 2019

Summary

Currently, only one value can be selected in each filter category (i.e. only one format, one topic, one author and one source). We should make it possible to select multiple values from each category (e.g. filter for tutorials that match 3 topics).

Motivation

  • Combinations of filters make it easier to narrow the list to exactly what you're looking for
  • For topics in particular, I've often tried to use this feature (forgetting I haven't build it yet 🤣)

Approach

  • Convert filter category states from string values to array values
  • When a topic is clicked, add it to that filter category's array
  • To filter the list, we'll check if each item's filter values contains every item in the related filter arrays in state

While this would most useful for topics (and maybe useless for sources), I think we might as well enable this behaviour for all filter categories to be consistent.

If you have suggestions for how to improve this approach, feel free to share!

Related

#28 is also exploring how to improve the filter logic implementation.

@ooloth ooloth added the enhancement New feature or request label Jul 21, 2019
@ooloth ooloth changed the title Allow combinations of the same filter Allow multiple values to be selected in each filter category Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant