Page MenuHomePhabricator

Reorder facets on search result screen to something more logical
Closed, ResolvedPublicFeature

Description

Right now the order of facets on the search results screen (example link) seems a bit weird:

  • Tool type
  • UI language
  • Origin
  • License
  • Author
  • For wikis
  • Keywords

I doubt most people would want to order tools based on whether the data has been crawled or entered using the API. Also, giving that most of the tools don't have data like UI language the top result for most of these facets is the 'missing' value. The most useful facet (keyword) is at the bottom of the list.

I would propose to reorder the list like this:

  • Keywords
  • Tool type
  • Author
  • UI language
  • License
  • For wikis
  • Origin

Event Timeline

bd808 triaged this task as Medium priority.Apr 20 2022, 4:49 PM
bd808 changed the subtype of this task from "Task" to "Feature Request".
bd808 moved this task from Backlog to Groomed/Ready on the Toolhub board.
Slst2020 added a project: User-Slst2020.
Slst2020 moved this task from To Do to Doing on the User-Slst2020 board.

@Slst2020 wrote on slack:
Related to T306536, I’m trying to understand where the tool search facets are ordered on the backend. Any hints? It would be quite easy to reorder them on the frontend, but I don’t know if that is better.

I think the order produced from the backend is semi-arbitrary and very likely related to dictionary iteration order in either the Python or Java runtimes that are involved. The configuration on the Python side is in ToolDocumentViewSet's faceted_search_fields member. Imposing ordering on the front end seems very reasonable to me as this is purely a UI concern. Filters.vue is where the data from the backend is filtered to remove completely empty facets and then iterated to output to the display.

Slst2020 removed a project: User-Slst2020.
Slst2020 subscribed.

The most useful facet (keyword) is at the bottom of the list.

Keyword is honestly the least useful facet as this is an uncontrolled vocabulary that shows a large variance from maintainer to maintainer in how identical concepts have been converted to keywords. The keyword field itself is deprecated in the >1.0 toolinfo.json schemas for this reason. This is also why I chose to place keywords at the bottom of the list of facets when I initially implemented the facets feature.

T308030: Controlled vocabulary and taxonomy for Toolhub will produce a number of more predictable and generally useful facets due to their use of controlled vocabularies.

Change 862411 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] ui(search): Display facets in deliberate order

https://gerrit.wikimedia.org/r/862411

bd808 changed the task status from Open to In Progress.Dec 1 2022, 5:34 AM
bd808 claimed this task.
bd808 moved this task from Groomed/Ready to Review on the Toolhub board.

Change 862411 merged by jenkins-bot:

[wikimedia/toolhub@main] ui(search): Display facets in deliberate order

https://gerrit.wikimedia.org/r/862411

Change 868183 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/deployment-charts@master] toolhub: bump container to 2022-12-14-185830-production

https://gerrit.wikimedia.org/r/868183

Change 868183 merged by jenkins-bot:

[operations/deployment-charts@master] toolhub: bump container to 2022-12-14-185830-production

https://gerrit.wikimedia.org/r/868183