Page MenuHomePhabricator

Namespace pre-selection "Encyclopedic articles" activates unexpected namespaces
Open, LowPublic

Description

The checkbox "Encyclopedic articles" in the Advanced-Search interface is labeled like it would always select the main (article) namespace. But this is not always true. What is does is activating the users default selection of namespaces, which is stored as a user preference. The user is able to change this preference by using the "Remember selection for future searches" checkbox. For anonymous users and users who never changed it the preference is indeed the main namespace only.

Steps to reproduce:

  • Go to https://de.wikipedia.org/wiki/Spezial:Suche.
  • Unselect all namespaces.
  • Select only two: (Main) and Talk.
  • Check the "Remember" checkbox.
  • Search.
  • Now play around with the "Encyclopedic articles" checkbox. It will now select the main and talk namespace.
Root cause: A user not anticipating these details of the interfaces behavior created https://de.wikipedia.org/wiki/MediaWiki:Advancedsearch-namespaces-preset-default as well as https://de.wikipedia.org/wiki/MediaWiki:Advancedsearch-namespaces-preset-default/en. Both must be deleted.

Collection of other possible workarounds:

  • Ditch the feature to have a per-user "default" entirely, and stick to a per-wiki default that is the same for all users.
  • Let the checkbox always select the main namespace, and ignore the users preference. This way the label is correct. The downside is that the users preference is not accessible any more. It will only be used when entering Special:Search for the first time, but is not available as part of the namespace selection interface any more.
  • Make the label of the checkbox dynamically change the moment the interface detects the users "default" is not identical to the wikis default any more, and let it say "My default selection" or similar.
  • Change the label to always say "My default selection".
  • Have two checkboxes: one for the users preference, one for the main namespace only. Hide the first if they are identical anyway (which is the case for all anonymous users as well as users who never changed their preference).

Event Timeline

thiemowmde added a project: patch-welcome.
thiemowmde updated the task description. (Show Details)
thiemowmde added a subscriber: NordNordWest.
thiemowmde lowered the priority of this task from High to Low.Jan 16 2019, 3:16 PM
thiemowmde moved this task from Incoming to Advanced Search on the TCB-Team (now WMDE-TechWish) board.

I do appreciate the proposal to insert an additional MyDefault element if and only if there are differing user preferences in effect.

Note that main space goes for a Wikipedia only, but afaik it is defined per project. Usually that seems to be chosen as so-called content spaces. On mediawiki.org this is currently ns=0, API, Manual, Extension, Skin, Help. To prevent myself from getting fooled by a user preference I am not aware of I tested this anonymously.

The predefined label Standard does not explain anything to a regular user. Even more it is not clear that it is not a constant area, but influenced by stored user preference. No user is supposed to recall that a week ago a tic in the remember box has been made, and how this influences future behaviour.

Using the recent JS wizard will show the namespaces in effect now. That makes it a bit easier. Without that feature it is not obvious to the user which namespaces have been searched now and which were excluded.