As a user,
I want the wiki to show me only file types that make sense,
so that I can get more relevant search results.
Acceptance Criteria:
- The file types displayed in the first group of the file type selection can be configured in the AdvancedSearch configuration. See https://www.mediawiki.org/wiki/Help:CirrusSearch#filetype for a list of allowed values.
- There is a default configuration that makes sense for wikipedias (e.g. everything except EXECUTABLE, ARCHIVE, MULTIMEDIA, TEXT and UNKNOWN)
Background:
At the moment, the file type selection and behavior depending on the selection is inconsistent and distributed over three files:
- ext.advancedSearch.init.js (formatter)
- ext.advancedSearch.FileTypeOptionProvider.js (labels for each group)
- ext.advancedSearch.SearchModel.js The array FILETYPES_WITH_DIMENSIONS combines a selection of file types and the first part of MIME types.
Those three files could and should be refactored when tackling this task.
Internally, the filetype: prefix accepts more search terms than the ones listed on the help page, as defined by [[ https://github.com/wikimedia/operations-mediawiki-config/blob/9bb7ed54671744d4b9997d8f713d8f952c70f631/wmf-config/CirrusSearch-common.php#L218 | $wgCirrusSearchFiletypeAliases ]], but we probably don't want those aliases as their own group, as most of them are already covered by specific MIME type selections.