Page MenuHomePhabricator

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

Description

Background

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.

Design

Prototype: https://di-search-3.web.app/Volvo

QA

To be done as part of T263657.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
Resolvedovasileva
ResolvedVolker_E
Resolvedovasileva
Resolvedovasileva
ResolvedEdtadros
DeclinedNone
Resolvedovasileva
Resolvedovasileva
Resolvedphuedx
Resolved alexhollender_WMF
Resolvedovasileva
DuplicateNone
Resolved alexhollender_WMF
ResolvedMNeisler

Event Timeline

Jdlrobson subscribed.

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 subscribed.

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?

e.g.

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 subscribed.

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

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

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

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

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

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

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

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

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

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