Page MenuHomePhabricator

Improve file type groups
Open, Needs TriagePublic

Description

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.

Related: T176613, T170402

Event Timeline

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

@Charlie_WMDE , @Lea_WMDE, @Tobi_WMDE_SW : Do you agree with the default selection? Please have a look at the list of possible file types and change the AC in the task description to a list of the files types that should be in selection. Also, please move this task in the MVP section if needed.

This task is mostly about improving quality and understandability of the code, the actual selection works, but we want to make sure it's more robust.

@gabriel-wmde Where can I find a description of what each of those type entails? I checked the link you provided above but couldn't find it there.