Skip to content

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

Open
@ooloth

Description

@ooloth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions