codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 69 forks source link

Better sorting and filtering of tags page #1198

Open cellio opened 1 year ago

cellio commented 1 year ago

meta:289418 (narrower request)

The tags page currently has the following buttons:

For an example that includes hierarchical tags, see https://electrical.codidact.com/categories/26/tags.

The request in the meta post is to be able to sort tags alphabetically. Counter-intuitively, the hierarchy view does that for you if there are no hierarchies, but if you just want a list of all tags sorted alphabetically regardless of hierarchies, you can't do that.

Further, the "missing excerpt" option is a filter while the others are sorts. That's caused confusion for the category buttons (where "native" looks to the user like a filter, see https://meta.codidact.com/posts/289141/289147#answer-289147). The proposal there is to move "is native?" into the filters UI and remove the button.

The tags page doesn't have the filters widget, which makes sense, but can we come up with a way to separate the concerns of sorting and filtering here? The linked meta question also asks if we can show or hide synonyms -- that sounds like another kind of filtering.

From the user perspective, I think the simplest approach would be two sets of controls: buttons for sorting including alphabetical, and a multi-selectable set of filtering options:

Three buttons:

For the Alphabetical view (only):

For Usage and Alphabetical views:

I think it would be confusing and hard to implement these filters for the hierarchy view. The "missing" button today shows you the Usage view already, so that's what people are used to. I'm comfortable saying that we will only offer these additional options for the non-hierarchical views.

Sorting synonyms by usage doesn't make sense; the synonyms are already shown with the main tag and we don't have synonym-specific usage data.

I'm imagining something like this:

mockup

We should add help for the checkboxes (tooltip? clickable '?'?) -- include synonyms means we're including them in the main alphabetical view in addition to listing them with their targets. Since people see the synonyms anyway, I think we'll need some disambiguation here to avoid confusion and usage questions.