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). 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

40 Likes

I’ve just updated this topic to reflect some refactoring that’s been done to this component.

Previously this component added an “unanswered” button to the nav, but we’ve added a little more functionality by switching this to a dropdown.

Old version, for reference:

image

If you’re looking to update to the new version, you can do so from admin > customize > themes, but be sure that you’ve updated Discourse first. The new dropdown required a minor change in Discourse to enable the “answered” filter.

10 Likes

I’ve also created a separate component, which uses the previous behavior of adding an “Unanswered” link to the nav:

10 Likes

Minor feature request: could you add an ID or class to the li element so we can style this a bit easier?

Edit: I found my way around it:

.category-navigation a[href$="max_posts=1"] {
	background-color: var(--blend-primary-secondary-5);
}

3 Likes

I’ve got a PR in the queue to add a class name to all of the nav items:

so once this is merged, .nav-item_unanswered should work!

4 Likes

Excellent, thanks! And to be clear: this is a change to Discourse itself, not the TC, correct?

1 Like

Oh yes, I should have mentioned that. This applies to core, and works for the theme component, which extends the core nav.

3 Likes