Page MenuHomePhabricator

Filtering options integrated with new search/TOC
Open, MediumPublic


E.g. topics you're subscribed to, topics you've participated in, etc.

This ticket describes "quick filters" that provide basic filtering options. For advanced filters, see T99875.

Entry points

Quick filters are shown in two locations:

  • When accessing the search bar. Quick filters are shown when the user input is in the search bar but there is not a search query yet. As soon as the user types, quick filters are no longer shown.

  • At the bottom of the table of contents. It is an always visible footer for the table of contents (even if the list of topics needs scrolling, the quick filters are visible).

Filter mechanism

Regardless of the location, the "quick filter" component is the same. It works as a quick way to apply the common filters and it provides an option to access the advanced search panel in case more options are needed.

  • When a filter is active, it appears in the search bar.
    • Active filers have an "X" action to remove them.
  • When a filter is active, only topics matching the criteria will be shown in the board and the table of contents.
    • The quick filter bar will show an indicator of how many topics are shown and the total to communicate that there are more topics than those shown.
    • When several filters are applied, only the topics meeting all of them are shown. That is, an "AND" approach is followed when combining filters.
    • The URL gets updated so that the results can be bookmarkable.
  • If there is no room to show all the filters as separate elements they can be grouped by categories or into a single element.
    • Taping on them will open the advanced search panel (T99875) from which individual filters can always be adjusted.

Filter actions

The options provided for filtering are (note that reverse filters are also provided):

  • Activity:
    • Recent activity: Show only topics with recent activity (i.e., with new content since last user visit, or last day/week).
    • Visited: Show only topics the user has visited (when the user access a topic in the ToC it gets marked as viewed (grey line on the left). The user can filter those to use the ToC to focus on those topics pending reading.
  • Users:
    • Participant. The user has participate din the topic in some way (the topic was created by the user, or was mentioned).
    • Mentioned. Topics the user has been mentioned.
  • Starred. Topics the user is subscribed to.
  • Completed. Topics that are marked as closed/locked/etc. Conversations that are still open are presented as "ongoing" but terms may change.

Event Timeline

I was thinking that if the filtering is implemented in the search engine, "topics you've participated in" could be implemented by storing the list of unique users in the topic document in ElasticSearch. Not sure if this is the best way, but thought it was worth mentioning.