Unanswered Filter

:discourse2: Summary Unanswered Filter adds a new breadcrumb dropdown that allows users to filter a topic list by unanswered (0 replies) and answered topics (more than 1 reply). There’s also an option to show an “unanswered” link in the nav as an alternative to the dropdown. It was adapted from this post by @simon
:eyeglasses: Preview Preview on theme-creator.discourse.org
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-unanswered-filter
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

dropdown mode:

link mode:

Theme settings:

  • Exclusions: you can exclude this filter from a page on your site, defaults to / and /top
  • Limit to groups: you can choose to only show the filter to specific groups (staff, for example)
  • Filter mode: defaults to dropdown, with the link style as an alternative

4 posts were split to a new topic: Add id or class to list elements

5 posts were split to a new topic: Can we exclude wikis from unanswered topics?

Hi @awesomerobot – I’ve just tried out the [previous behavior] “Unanswered filter link” component and it’s almost exactly what I need. There are just a couple of things on my wishlist:

  1. I’d love the ability to skip topics with specified categories and tags. Some informational topics don’t really call for replies; they might be in a specific category, or be tagged as “documentation,” etc. Pinned “Welcome” posts, for example, could be excluded by a tag.
  2. I wish “Unanswered” would behave a bit more as New and Unread do: appear only when non-zero, and display a count. It’s not as tempting to click when it appears there are no relevant unread topics.

With those additions it would be perfect—and, I’d argue, should be added as core Discourse functionality.


Just a note in case it’s helpful to others:

I decided to try the newer “Unanswered Filter” component. I don’t know if it was a hitch in my particular instance of Discourse, but I had some trouble getting it going. I uninstalled, reinstalled, and rebooted trying to get it to show up, and finally:

cd /var/discourse
./launcher destroy app
./launcher start app

… got it to take effect.

After clearing all exclusions in the component settings, it took me a sec to realize why the status filter doesn’t appear on the Categories view (and, in our case, the home page, which we default to Categories): because it’s a topic filter. [smacks forehead] It obviously can’t filter a list of Categories.

I still kind of wish it could exclude topics by tag, so it wouldn’t list informational topics as “unanswered,” but a simple workaround is to post one reply, e.g. “This topic is locked.” – before locking the topic.

Works as advertised - great component. :star:

1 Like

I’ve just merged a refactor that fixes an issue where the dropdown wasn’t updating and modernizes the Ember in use

If any new issues crop up, be sure to let us know!


A very nice plugin, thanks!

Could it be tweaked so that posts from staff members were not shown in the list? We only care about ordinary, poor users who did not get a reply. Staff members somehow will deal with that, I hope. :wink:

Ideally, it would be awesome to have one more filter, that showed posts that were not replied to by the staff. Just in case we to make sure a post was reviewed and answered by at least one staff member and not an ordinary fella.

1 Like

You could use data explorer to get those topics

1 Like

I’ve just merged an update to this component that adds a couple settings:

limit_to_groups replaces the previous show_only_for_staff setting (you can use the staff group instead)

1 Like

@awesomerobot, after the recent update, I am getting this error:

Error: Could not find module `discourse-i18n` imported from `discourse/theme-10/initializers/unanswered-filter-link

Any ideas on how I could solve this one?

Is there a possibility you will update this plugin in the near future to show posts with zero replies that were not created by the staff group?

Is your Discourse install up-to-date (admin/upgrade)? I’d expect an update to fix this

No plans at the moment, I don’t think there’s a straightforward way to do this… this theme component relies on a built-in URL parameter to get 0 replies (?max_posts=1) but I don’t believe we have something to hide posts created by users from a specific group.