Page MenuHomePhabricator

[L] Searchers see thumbnails next to search results on the special:search page
Open, Needs TriagePublic

Description

This is part of the UI improvements epic https://phabricator.wikimedia.org/T306626

User Story
As a reader, I want to be able to easily scan the search result page to easily locate the information I am looking for.

Description
This ticket is to add article thumbnails next to each article result. Thumbnails can provide a visual anchor on a text heavy page and assist in locating an article. This only applies to article namespaces and files namespaces (which already show a thumbnail right now).

Explorations
See the discussion happening on this spike ticket

Final proposal
See detailed specs for thumbnail here

Technical implementation
https://phabricator.wikimedia.org/T307034#7938844

Acceptance Criteria

  • This thumbnails are for desktop only and not mobile.
  • All article namespace will have thumbnails
  • For namespaces that already have thumbnails like files, leave the design and behaviour as is. No change required.
  • For article thumbnails - fill the square and and align to the top of the image as shown in option 4 in the image here.
  • Articles that do not have thumbnails will have a placeholder image. As shown here
  • Examen the handling of NSFW/explicit images used in the Go bar and determine if that solution works here and is appropriate
  • Determine how to display thumbnails for results in other language wikis (e.g. like in T309745)
  • Give the thumbnail a specific CSS class that they can target and hide (As per feedback from community, people would like to be able to hide thumbnails with user CSS.)
  • Determine how to show thumbnails for file namespace results (From @matthiasmullie: Need to check on thumbnails for file namespace; I seem to recall that thumbs are only generated for article namespace for pretty much every wiki. We may be able to fetch image data for file namespace as well via another way, though, but that too could be a little more complex with instantcommons vs local results)

Event Timeline

Technical note:

Provided via pageprops but may already be available. To be confirmed - https://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=pageprops&format=json

Will require a brief spike to work out how we will define image thumbnail dimensions.

{"batchcomplete":"","query":{"pages":{"736":{"pageid":736,"ns":0,"title":"Albert Einstein","pageprops":{"defaultsort":"Einstein, Albert","jsonconfig_getdata":"1",

//This prop here
"page_image_free":"Einstein_1921_by_F_Schmutzer_-_restoration.jpg",

"wikibase-badge-Q17437798":"1","wikibase-shortdesc":"German-born scientist (1879\u20131955)","wikibase_item":"Q937"}}}}}
Sneha updated the task description. (Show Details)
CBogen updated the task description. (Show Details)
CBogen added a subscriber: matthiasmullie.

Will require a brief spike to work out how we will define image thumbnail dimensions.

Should probably use $wgThumbLimits, those are likely pre-generated, available

Will require a brief spike to work out how we will define image thumbnail dimensions.

Should probably use $wgThumbLimits, those are likely pre-generated, available

See T307034

CBogen updated the task description. (Show Details)
CBogen renamed this task from Searchers see thumbnails next to search results on the special:search page to [L] Searchers see thumbnails next to search results on the special:search page.Wed, Jul 27, 4:44 PM
CBogen updated the task description. (Show Details)