Page MenuHomePhabricator

Make new search widget configurable per project
Closed, ResolvedPublic3 Estimated Story Points



Not all of our projects will benefit from the addition of images and page descriptions. We'd like to make search configurable per project so that we can exclude them when necessary

Acceptance criteria

  • Allow images and page descriptions to be configurable per project
    • Vector should expose two new configuration flags. The flags will have to be passed to the JavaScript client and specifically to the Vue instance. The default configuration should keep the flags enabled or unset so that third-parties get the best experience.
    • WVUI's typeahead suggestion components will require two new component properties to be passed. When present, they will suppress presentation of thumbnail and / or description. The flags will be adjustable in the component's story and also any components that compose them in.
  • Config per project. The above projects will have the following set to on
    • Commons
      • neither
    • Wikidata
      • description
      • images
    • Wikispecies
      • descriptions
      • images
    • Wikibooks
      • neither
    • Wikinews
      • images only
    • Wikipedia
      • descriptions
      • images
    • Wikiquote
      • descriptions
      • images
    • Wikisource
      • neither
    • Wikiversity
      • images
    • Wikivoyage
      • descriptions
      • images
    • Wiktionary
      • images only
  • A configuration patch will be submitted for the above projects to mediawiki-config in advance of changes merging to Vector.




To be done as part of T263657.

Related Objects

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

Seems like this would benefit from analysis from Stephen or someone more closely tied to the Vue work. Assigning Stephen for now who can delegate if necessary.

Niedzielski updated the task description. (Show Details)
Niedzielski added a subscriber: Niedzielski.

I'm not sure what the config for the Vue search looks like but would it suffice to have a JSON config of static values? Or does this need to be dynamic?


var vueProps = Object.extend( {}, mw.config.get( 'wgVectorVueSearchConfig' ) );

If the above will work I think this is ready for estimation (and will take a similar approach to the work required for T263032). If I've misunderstood please move it back.

As far as I know, these configurations are statically defined per wiki.

Putting this back into ready for dev until the network client ticket is resolved (I've assigned myself to that one). If anyone else wants to pick this up feel free to. If not, I will take it when the network client work has settled

nray removed nray as the assignee of this task.Oct 20 2020, 6:44 PM
nray added a subscriber: nray.
nray removed nray as the assignee of this task.Oct 29 2020, 3:56 PM

Change 637520 had a related patch set uploaded (by Nray; owner: Nray):
[wvui@master] [components][typeahead-search][typeahead-suggestion] Add showThumbnail/showDescription props

Change 637520 merged by jenkins-bot:
[wvui@master] [components][typeahead-search][typeahead-suggestion] Add showThumbnail/showDescription props

Final piece remaining on this is adding config in vector and passing that to the top level component (e.g. App.vue). For that we will need the integration bit (T264355) so I have moved this to blocked

Change 643598 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/skins/Vector@master] Add Wvui Config to show/hide thumbnails and descriptions

This is dependent on the integration patch, but can probably be reviewed now if there is bandwidth

nray removed nray as the assignee of this task.Dec 2 2020, 6:04 PM

Change 643598 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Add Wvui Config to show/hide thumbnails and descriptions

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Edtadros.