This story is one part of all the contents that go in the quick view mentioned in T306898
As a searcher, I want to have discoverability opportunities beyond a given wikipedia on the search result page to uncover relevant content. Specifically I want to see Commons content related to the article I am viewing in QuickView.
Acceptance Criteria
- Search MediaSearch for images related to the QID of the article and show the top results in this section in quick view.
- The image grid should have two rows of images as shown in the image below with fixed height as specified in Figma. The width and # of images will be determined by flexible box css layout as mentioned in this slack message.
- If there are fewer images than what can fit in two rows either leave empty space at the end of the grid or only show one row.
- "Related images" heading is shown above the widget
- "view more" link below the image grid which will take the user to the MediaSearch images results page on commons for that query.
- "view more" link should not be there if there are no more images to view.
- Show the wikimedia commons logo and title under images as shown in Figma link below.
- When there are no images to show hide the commons widget.
- The quick view panel (if it was previously open before navigating to an article) should stay open when user return to search results using browser back button.
- Make it easy to disable this widget in case these it turns out to put too much stress on Commons search (e.g. config var)
Note: There may be performance implications of the additional API call required for this widget. Please look into this, discuss with the Search team, and document any ramifications in the comments.
From @EBernhardson:
it seems plausible that we could support the query load, but it's hard to really know what the level of load would be. queries against commons are more expensive than anything else. At a higher level, this sounds like "show n (~= 3-5?) images related to a page" which could be some sort of batch process calculated offline instead of at realtime, or calculated in realtime and cached for a few days like the related articles searches. In realtime we would only fetch the pre-calculated list of images that should be shown for this page.
Image grid
Link to quick view in figma