User story: As a user searching for media on Commons, I want a way to see a group of related and specific queries, so that I can discover additional related media.
We have this:
Concept chips exist in a prototype state, and only for a few hardcoded search terms.
We want this:
- when a user does a search
- and the search term corresponds to a wikidata item
- and that wikidata item has a "subclass of" property
- then display a concept chip for each of the wikidata items the search term is a subclass of ... clicking on a concept chip brings the user to a mediasearch for that item's label in the user's language
Other acceptance criteria:
- If the search term corresponds to a wikidata item with a "subclass of" property, the concept chip(s) should show even if the original search term would provide zero results
- A new ticket is created to account for the rest of the heuristics in the spreadsheet - either one ticket for all of them, or a separate ticket for each
Suggested implementation:
- load the page as normal, then from the client side hit a new api endpoint to get the concept chip link, and then show it with client side code
(once this first concept chip is done then look into implementing the others in this list https://docs.google.com/spreadsheets/d/1KFuJhx-vQ4fyDuok_0Se1BcSEO88TGoiMzux1E4SY6c/edit?ts=5efcfa8d#gid=0 (can be implemented in parallel once the backbone is set up for this ticket))
Design
Although having small images per chip would be ideal to help illustrate the concept, if we are limited on time and resources and cannot implement that at this time, we can start with a chip that doesn't have images. (Out of scope for this ticket)
With image
No image (Specs are in pink and shown in pixels)
During development, please test the following:
- Test this feature while logged in AND logged out
- Test this feature on at least one mobile browser