Page MenuHomePhabricator

mwsuggest should support a .mw-search classname instead of hardcoded ids
Open, LowestPublic

Description

Currently mwsearch only supports the ids #searchform, #searchform2, #powersearch, and #search.

We should update mwsearch to use jQuery and add support for a .mw-search class name on the form to indicate a search form intended to search the wiki instead of requiring that custom skins use these hardcoded ids.

mwsearch looks a little big for me to just pickup and convert. It's also fairly focused around id's so it doesn't look easy to just convert to using a class without going ahead and converting most of it to jQuery.

Also, instead of hardcoding the ids of search inputs we should be using <code>$( theForm ).find(':input[name="search"]')</code> to fetch the search input.


Version: 1.20.x
Severity: normal

Details

Reference
bz30954

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:49 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz30954.
bzimport added a subscriber: Unknown Object (MLST).

Can you clarify what you mean by mwsearch? The MWSearch extension supplies backend support for the Lucene search server, but it sounds like you're referring to the setup of type-ahead suggestions on search fields (a feature that is sometimes known as mwsuggest).

Sorry I typed mwsearch when I meant mwsuggest. I'm referring to our /skins/common/mwsuggest.js code which uses hardcoded ids.

Though I'm now aware that Vector also has completely different search suggest code so I'm not sure if making that work as a replacement for mwsuggest would be better.

How relevant is this nowadays since we don't use mwsuggest and use simplesearch?

Restricted Application added a subscriber: Aklapper. · View Herald Transcript