Some users prefer Commons' existing category structure, and I think also feel like this tool is preferencing structured data. While custommatch combines P180 and the category, we should also have an option for just searching the category contents. This would mean querying the Wikidata item for P373, and then using incategory in the Commons query. Essentially, while results are still displayed off Commons, this would allow the tool to be used as a one(?)-click shortcut to see the Commons category results, and also to access the future editor tools as applies to them.
incategory search has been added to the View it! API.
It currently just checks the root category, which means result can be very limited if most things are placed sub-categories.
Examples for hamburgers, custommatch:depicts_or_linked_from vs incategory:
Should we include images in sub-categories? My concern is performance and rate limits, but we can maybe include the first X number of first level sub-categories.
I assume there is a character limit on search strings, too. In the UI, you run out of characters usually around 3-5 categories. Maybe the simple solution is just to do one additional API call to get the list of subcats (e.g. like this) and add the titles as an in array the API response. In the UI on this type of search, we could show some text at the top that links to search queries for each of the subcat titles. This mimics how categories work on-wiki, as well.
Support for P373 has been added to the UI.
Subcategories have not been integrated yet, but work has been started:
I am working on design (thinking of placing the categories in an accordion) as well as integrating subcategory search into the UI.