Page MenuHomePhabricator

[M] Special:Search results should have a way to suppress thumbnails
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
T306883 turned on thumbnail results for Special:Search, but does not have a method to prevent these. This enhancement request is to add search option, that is also callable as a parameter if calling search results outside of the UI, to suppress the thumbnails.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Multiple users have reported that they use search results in ways that the thumbnails are interfering, such as scraping result to be inputs to other processes. Additionally, when large results are requested the resultant output is slower and significantly larger when having to include media with each result.

Benefits (why should this be implemented?):
Reduce waste of processing and bandwidth resources, especially client side. Restore workflows that use certain scraping methods.

Acceptance Criteria

  • A preference is created under Search -> General that reads "Show thumbnails in Special:Search"
  • The preference defaults to checked
  • If unchecked, thumbnails do not appear in search results on Special:Search, except for File results
  • Help text is available that reads "Also show thumbnails for (Main) namespace. Thumbnails for File are always shown."
  • The ability to suppress thumbnails is also callable as a parameter if calling search results outside of the UI

Event Timeline

Reporting end users are aware that they can use a CSS hack to hide these, however that does not prevent the media data from being transmitted and processed by most webclients.

/*Remove search thumbnails*/
.searchResultImage-thumbnail {display:none}
Jonesey95 renamed this task from Special:Search results should have a way to supress thumnails to Special:Search results should have a way to supress thumbnails.Oct 9 2022, 5:05 AM

There are two approaches:

  1. add a ticbox on search form (default: no) whether this anonymous user wants thumbs, and memorize by cookie.
  2. add a preference for registered accounts, which provides default for ticbox, even if cookies are deleted after session. If such persistent user default is present, then general default may be “yes”.

I would like to see both, but at least the first one which helps all readers.

Basically it is a nice feature for the public audience looking for a particular topic to get the first 20 hits equipped with an eye-catcher, if they are not blind.

  • However, it is a burden for wiki content maintainer, listing 500 matches of some criteria.
  • If I am asking for Natural Landmarks, I will receive 500 thumbnails with a tree in the foreground, a lake in the middle and a mountain (or perhaps a cloud?) in the background. What do they tell me? I do not want my bandwidth used for that.

I consider this feature rather useless for text searches (other than the provided text snippet), but for file searches the thumbnail is essential and therefore present for years. So, in my opinion a different option for files would be needed, or for file searches the thumbnail is shown independently of a hopefully added preference.

Aklapper renamed this task from Special:Search results should have a way to supress thumbnails to Special:Search results should have a way to suppress thumbnails.Oct 10 2022, 10:40 AM
Aklapper removed a project: Advanced-Search.

On commons we want to have the option to enable all thumbnails completely, not mocked up pseudos like cropped squares. To give image researchers fast ways to overlook their search results seeing the exact image contents as miniatures, including all edges. For example to see if it is a landscape or portrait format. Thumbs of image files on Commons do need this special attention compared to thumbs on other projects.

On commons we want to have the option to enable all thumbnails completely, not mocked up pseudos like cropped squares. To give image researchers fast ways to overlook their search results seeing the exact image contents as miniatures, including all edges. For example to see if it is a landscape or portrait format. Thumbs of image files on Commons do need this special attention compared to thumbs on other projects.

Relevant discussion here. This makes Special:Search unusable on Commons. Squared, cropped thumbnails make zero sense when you're searching for images, please roll this back for Commons NOW.

EDIT: I've created a separate task for this at T320459.

To follow up on the statement at enwiki in (https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#How_to_get_the_WMF_to_reverse_this?) - this specific feature request isn't necessarily for a "preference" (as in a special:preferences type of preference), but for an option in Special:Search, a persistent option could be good - and "show thumbnails" could even still be the default. (Yes I realize persistence there would likely be stored in userinfo\uiprops - just saying I don't think it needs a whole UI in Special:Preferences as well). Option should be available for logged out users as well, and should be able to be specified from the uri (e.g. ?&searchresultthumbnails=0).

CBogen added a subscriber: CBogen.

To keep implementation simple and aligned with other preferences, we will be implementing this as a preference rather than a persistent option. I have updated the acceptance criteria of the task to reflect that and we will be working on this soon.

CBogen renamed this task from Special:Search results should have a way to suppress thumbnails to [M] Special:Search results should have a way to suppress thumbnails.Oct 12 2022, 3:36 PM

Just as a help fpr me to understand it right: By which preference shall anonymous users express that they do not want ever any thumbnail transferred via their slow and/or expensive internet connection?

Change 842806 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/core@master] Add preference to control Special:Search thumbnails

https://gerrit.wikimedia.org/r/842806

matthiasmullie added a subscriber: matthiasmullie.

I have a patch up to introduce this preference.
I just inversed the copy - instead of "Don't show thumbnails when using Special:Search", it now says "Show thumbnails in Special:Search" (easier to reason about), and added this help text, explicitly spelling out the effect: "Also show thumbnails for (Main) namespace. Thumbnails for File are always shown."
Is that ok? Any changes need?

Screenshot 2022-10-14 at 15.06.13.png (52×529 px, 13 KB)

This can also be invoked by anonymous users via a url param (or even registered users - it takes precedence over the preference): adding ?search-thumbnail-extra-namespaces=0 disabled thumbnails, ?search-thumbnail-extra-namespaces=1 enables them.

I have a patch up to introduce this preference.
I just inversed the copy - instead of "Don't show thumbnails when using Special:Search", it now says "Show thumbnails in Special:Search" (easier to reason about), and added this help text, explicitly spelling out the effect: "Also show thumbnails for (Main) namespace. Thumbnails for File are always shown."
Is that ok? Any changes need?

Screenshot 2022-10-14 at 15.06.13.png (52×529 px, 13 KB)

This can also be invoked by anonymous users via a url param (or even registered users - it takes precedence over the preference): adding ?search-thumbnail-extra-namespaces=0 disabled thumbnails, ?search-thumbnail-extra-namespaces=1 enables them.

LGTM! I'll update the AC.

CBogen updated the task description. (Show Details)

Sorry, but I did not understand the workflow for anonymous users.
There are two groups with different views:

  1. Thumbs are okay, sometimes helpful, very often pointless, but when I am looking for a regional sports team it shows me the logo.
  2. Never show images, since I have a slow or expensive connection and it slows me down and swallows my monthly budget.

What do you plan as default, and do you really expect that the other group will not use the search form field on every Wiki page any longer, but typing the entire URL for each query?

  • I have stated above that a ticbox on search result page is required, memorizing the state by cookie, using this configuration for all further searches until cookies are cleared.
  • This can be toggled for next searches until next switching.
  • Registered users should set a persistent default preference, since cookies are frequently cleared, e.g. when the browser quits.

Change 842806 merged by jenkins-bot:

[mediawiki/core@master] Add preference to control Special:Search thumbnails

https://gerrit.wikimedia.org/r/842806

Etonkovidova added a subscriber: Etonkovidova.

Checked on betalabs - the specs that are done are updated in the task description.

The following spec is not checked by default

[] The preference defaults to checked

That means that

  • existing user account won't see the thumbnails enabled
  • anon users won't see the thumbnails. The current production (wmf.5) shows thumbnails to anon users.
  • new user accounts won't see the thumbnails

@CBogen, @matthiasmullie - please confirm that it's the expected behavior.

Oh, that's most certainly not expected! I guess must've messed up somehow when inverting the logic. Will fix - thanks for catching that!

Change 843877 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/core@master] Add default value for search-thumbnail-extra-namespaces

https://gerrit.wikimedia.org/r/843877

Change 843877 merged by jenkins-bot:

[mediawiki/core@master] Add default value for search-thumbnail-extra-namespaces

https://gerrit.wikimedia.org/r/843877

Change 843913 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/core@wmf/1.40.0-wmf.6] Add default value for search-thumbnail-extra-namespaces

https://gerrit.wikimedia.org/r/843913

Sorry, but I did not understand the workflow for anonymous users.
There are two groups with different views:

  1. Thumbs are okay, sometimes helpful, very often pointless, but when I am looking for a regional sports team it shows me the logo.
  2. Never show images, since I have a slow or expensive connection and it slows me down and swallows my monthly budget.

What do you plan as default, and do you really expect that the other group will not use the search form field on every Wiki page any longer, but typing the entire URL for each query?

  • I have stated above that a ticbox on search result page is required, memorizing the state by cookie, using this configuration for all further searches until cookies are cleared.
  • This can be toggled for next searches until next switching.
  • Registered users should set a persistent default preference, since cookies are frequently cleared, e.g. when the browser quits.

Hi @PerfektesChaos, we noted your concerns and we evaluated all possible solutions to this, but we decided not to proceed with what you ask, because such solutions would be either non-intuitive for non-registered users or clog the Search UI with options that are already taken care of with a preference. In other words, the relative cost of each solution is not balanced by the desired outcome.

Oh, that's most certainly not expected! I guess must've messed up somehow when inverting the logic. Will fix - thanks for catching that!

Re-checked in beta - works as expected.

Change 843913 merged by jenkins-bot:

[mediawiki/core@wmf/1.40.0-wmf.6] Add default value for search-thumbnail-extra-namespaces

https://gerrit.wikimedia.org/r/843913

Mentioned in SAL (#wikimedia-operations) [2022-10-19T13:27:46Z] <mlitn@deploy1002> Started scap: Backport for [[gerrit:843913|Add default value for search-thumbnail-extra-namespaces (T320337)]]

Mentioned in SAL (#wikimedia-operations) [2022-10-19T13:28:11Z] <mlitn@deploy1002> mlitn and mlitn: Backport for [[gerrit:843913|Add default value for search-thumbnail-extra-namespaces (T320337)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-10-19T13:32:27Z] <mlitn@deploy1002> Finished scap: Backport for [[gerrit:843913|Add default value for search-thumbnail-extra-namespaces (T320337)]] (duration: 04m 41s)

Re-checked on wmf.6 - no issues found.

Hi !

On wikisource, NO thumbnail is available because pics are mainly in Author and Index space...
but this new feature considerably slows down the displaying of search results, and is ugly because of the "default" pic shown...

when will this option be deployed on wikisource, to allow inhibit this new feature, clearly not designed for wikisources...

@Hsarrazin Thumbnails are not meant to be showing on wikisource (and I can't see them).
Can you paste an example link where they're showing up?

@Hsarrazin: Please always provide full and clear steps to reproduce something, including full URLs, and check also in safemode. Thanks a lot.

This seems to not be showing up on Special:GlobalPreferences#mw-prefsection-searchoptions?

It doesn't work on Meta, since it's not enabled there. You might want to go to any version of Wikipedia, then access Special:GlobalPreferences#mw-prefsection-searchoptions from there.