Page MenuHomePhabricator

TypeaheadSearch component doesn't take into account 'search-special-page' preference and is hardcoded to Special:Search
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):

SpecialSearch is being deprecated on Commons and MediaSearch is much better. It looks much better and is much easier to use. For example, it has a wall of images/videos and one can easily change the sorting or the filters. It's a modern design and SpecialSearch is a pain to use.

However, when entering a search phrase into the search bar and none of the results in the dropdown are what one is looking for so one clicks on "Search for pages containing [search phrase]", it still uses SpecialSearch instead of the MediaSearch. MediaSearch is what is being used when pressing enter but many, including new users, may click on that button at the bottom of the drop down. Having two different behaviors and interfaces is confusing and it using MediaSearch is especially important for people new to the site and not yet familiar with its many features and functionalities (e.g. they may think this is the only search interface).

Please make clicking this button have the same effect as pressing enter.

There could also be various further improvements in there like having multiple multiple buttons in that dropdown row for the different media-types (images, video, etc) but that's beyond the scope of this issue and probably isn't important and maybe not a good idea. One thing that I think should definitely improved though is that it should show some categories also when not search cat:search phrase – often it doesn't show any even if there's categories named exactly like the search phrase.

Note that this button is using SpecialSearch despite that "Choose your search interface" is set to MediaSearch in the preferences.

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):

Improved UX, less confusion, better user-friendliness, better interface, ease of use, consistency, etc

Benefits (why should this be implemented?):

Improved UX

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TheDJ renamed this task from Further replace legacy SpecialSearch with MediaSearch on Commons: when entering sth in search bar and clicking "Search for pages containing [xyz]" use MediaSearch to TypeAheadSearch component doesn't take into account 'search-special-page' preference and is hardcoded to Special:Search.Nov 13 2025, 9:16 PM

This is mostly because urlgenerator module is not intialized with the SearchPageTitle, unlike the App itself. This will have to be made possible and then fixed in all callers of of these components (Minerva and Vector ?)

Change #1204968 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/core@master] TypeAheadSearch: urlgenerator requires searchPageTitle

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

Change #1204969 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/skins/Vector@master] TypeAheadSearch: init urlgenerator with searchpage title

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

Change #1204970 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/skins/MinervaNeue@master] TypeAheadSearch: init urlgenerator with searchpage title

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

@Jdlrobson-WMF not sure if this is the best approach, but it's bed time now :)

Change #1204968 merged by jenkins-bot:

[mediawiki/core@master] TypeAheadSearch: Let urlgenerator uses specify a different search special page

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

bwang triaged this task as Medium priority.Nov 24 2025, 6:53 PM
Volker_E renamed this task from TypeAheadSearch component doesn't take into account 'search-special-page' preference and is hardcoded to Special:Search to TypeaheadSearch component doesn't take into account 'search-special-page' preference and is hardcoded to Special:Search.Dec 2 2025, 5:51 PM

Oops, I missed that there's already an open patch

Change #1204970 abandoned by TheDJ:

[mediawiki/skins/MinervaNeue@master] TypeAheadSearch: init urlgenerator with searchpage title

Reason:

leaving this to the team.

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

Change #1204969 abandoned by TheDJ:

[mediawiki/skins/Vector@master] TypeAheadSearch: init urlgenerator with searchpage title

Reason:

leaving this to the team

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