Hide tags in filter list - New Site Setting

Over at Stonehearth we’ve been using the tag system pretty extensively in a few of our categories. We also have show filter by tag enabled and sorted by popularity. The problem we’re now seeing is that certain tags are used many times (like duplicate), that they permanently sit at the top of the drop-down. It would be nice if we could have a field in site settings (similar to staff tags) where we can list tags to hide from the filter drop-down.

2 Likes

This seems very edge casey… I think a far better outcome is to clean up our markup so you can do this with CSS:

<div class="cat">
     <a id="ember1477" class="ember-view tag-badge-wrapper badge-wrapper bullet tag-resolved" href="/tags/c/support/resolved">resolved</a>
</div>

To

<div class="cat tag-resolved">
     <a id="ember1477" class="ember-view tag-badge-wrapper badge-wrapper bullet tag-resolved" href="/tags/c/support/resolved">resolved</a>
</div>

Then you could do:

.category-support .cat.tag-resolved {
   display: none;
}
1 Like

Not against CSS - if we were to do that, would we need to raise the max tags in filter list as we’re only hiding the tag visually, not removing it?

probably yeah, depends on how many you are hiding. I assume there are only 3 or so you are looking to hide.

Looking really quickly, we’d want to hide duplicate, resolved, no_longer_applicable, not_a_bug, and not_reproducible

Yeah I think you would still have plenty of the tags in the list then, you could add a few more if you must.

1 Like

Hi @jomaxro and @sam,
I wonder is there now better solution since it was discussed 6 years ago.
We have the same problem: certain tags e.g. support_closed appear on top of search list (since obviously majority of topics closed) and users mistakenly select this instead of more rare support tag (which is used to open topics).

1 Like

Off the top of my head, I am not aware of an alternative solution.

Thank you, Joshua, for replying on the matter “6 years later”… :slight_smile:

I guess it would be quite difficult to achieve (read: convince maintainers) but it looks closer to a feature “hide/gray-out some tags when topic is created”

Here is a tiny theme component that hides tags in the filter drop-down via a setting: GitHub - Arkshine/discourse-hide-tags-from-filter-dropdown
Does it help?

Example

With cloud tag:

Before:
NVIDIA_Share_Of8bx6hwgi

After:
NVIDIA_Share_avDktRpXwj
NVIDIA_Share_wbq965TuCB

1 Like