Page MenuHomePhabricator

Should not see squared, cropped thumbnails next to search results for files on Special:Search page on Commons
Closed, ResolvedPublic

Description

Changes made to Special:Search for T306883 break Special:Search on Commons.

When searching for files via Special:Search, cropped, squared thumbnails are shown instead of the full, uncropped ones. That may make sense when searching for articles on Wikipedia, but it does not make any sense when searching for images. There are still many users who prefer Special:Search instead of Special:MediaSearch on Commons for various reasons and this breaks their workflow.

Possible solution: In a discussion at the Commons Village pump, it was indicated that this "this could be fixed with a wiki-specific CSS override, in order to restore the traditional way of rendering the full image within the available bounding box." Please do that.

Relevant discussion: Did the Special:Search display change and break?.

Event Timeline

Aklapper renamed this task from Searchers should not see squared, cropped thumbnails next to search results for files on the special:search page on Commons to Should not see squared, cropped thumbnails next to search results for files on Special:Search page on Commons.Oct 11 2022, 9:32 AM

Note: T320510 will simply remove non-NS_FILE thumbnails again from Commons (and other non-Wikipedias), but they will still be displayed to fill the square (with edges cut)

Just a bit of context about why Special:Search thumbnail presentation has changed (in general): the traditional way of displaying them is visually inconsistent, and distracting.
We felt that adding relevant thumbnails to article results (not talking about Commons here) could greatly improve the search experience since they add additional context for people trying to find a matching result, but they shouldn't distract from the main content of the search results.

Of course, on Commons, that main content *is* the files, and being able to see them in full is of course not a distraction (quite the opposite - not being able to see them in full is painful)
That said, all our projects share a codebase, and these changes also ended up affecting Commons.

It looks like User:Speravir already came up with the same CSS fixes I was about to propose in order to restore thumbnail presentation on Commons (note: I would also recommend removing the bounding box border - that wasn't there before either)
I would highly encourage a Commons admin to add this to Common.css to apply this site-wide!

.searchResultImage-thumbnail .image img {
    object-fit: contain;
    object-position: center;
    border: none;
}

Thanks, I have made a request for somebody to add that piece of code to Commons' Common.css.

Thanks, I have made a request for somebody to add that piece of code to Commons' Common.css.

Added now: https://commons.wikimedia.org/w/index.php?title=MediaWiki:Common.css&diff=696305350&oldid=563766287 and works well.

Thanks @matthiasmullie for the snippet.

El_Grafo changed the task status from Invalid to Resolved.Oct 14 2022, 10:56 AM