Extension:SearchVue

Category:GPL licensed extensions
MediaWiki extensions manual
SearchVue
Release status: stableCategory:Stable extensions
Implementation Special page Category:Special page extensions, SearchCategory:Search extensions
Description Vue.js augmentations and improvements to Special:Search
Author(s) Structured Data team
Latest version Continuous updates
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.Category:Extensions with release branches compatibility policy
MediaWiki masterCategory:Extensions with manual MediaWiki version
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgQuickViewSearchFilterForQID
  • $wgQuickViewMediaRepositoryUri
  • $wgQuickViewDataRepositoryApiBaseUri
  • $wgQuickViewMediaRepositorySearchUri
  • $wgQuickViewMediaRepositoryApiBaseUri
Quarterly downloads 2 (Ranked 112nd)
Translate the SearchVue extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

The SearchVue extension provides improvements to the Special:Search page, including a "quickview" panel.

Requirements

The following extension must be installed for SearchVue to work:

The following extensions are not required but are strongly recommended to enhance the media search experience:

If you have a Wikibase repository and a local image store, the following extensions are additionally recommended to allow more data to be used to enhance multimedia search results:

Installation

After the extensions listed above are set up properly, enable the extension :

  • Download and place the file(s) in a directory called SearchVue in your extensions/ folder.
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See T173141 for potential complications.)Category:Extensions requiring Composer with git
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SearchVue' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

The following configuration settings can be added to LocalSettings.php:

  • $wgQuickViewMediaRepositoryApiBaseUri - URL of the API of the Commons repository used to fetch images for the selected page. If not set, the 'related images' section will not appear (default: https://commons.wikimedia.org/w/api.php
  • $wgQuickViewDataRepositoryApiBaseUri - URL of the API of the Wikidata repository used to link for the selected page. If not set, the 'interwiki links' section will not appear (default: https://www.wikidata.org/w/api.php
  • $wgQuickViewMediaRepositorySearchUri - URL of the Commons search page (default: https://commons.wikimedia.org/wiki/Special:MediaSearch?search=%s
  • $wgQuickViewMediaRepositoryUri - URL of the Commons home page (default: https://commons.wikimedia.org
  • $wgQuickViewSearchFilterForQID - the search parameter used to link the current page with a QID to improve the relevancy of search results (default: custommatch:depicts_or_linked_from=%s)

Coding conventions

JavaScript/Vue

As much as possible, SearchVue defaults to the Vue Style Guide.

For now, the extension does not use complete single-file components because it needs to be able to compile Less separately so it can be included immediately before the app loads to style the PHP UI.

CSS/Less

Since Wikimedia UI base variables are not in core MediaWiki, they are required as a package dependency; the extension then uses a shell script to copy them to the lib directory. To update the base variables, require the new version in package.json and install it, then run npm run build-lib to copy the updated file into lib. Commit the updated files.

The base variables are included in the extensions' own variables file, resources/mediasearch-variables.less. To use them in other files, include mediasearch-variables.less rather than directly including the base file.

The CSS class name prefix sdvs should be used for extension-level components.

See also

Category:Extensions used on Wikimedia#SearchVue
Category:All extensions Category:Extensions in Wikimedia version control Category:Extensions included in WikiForge Category:Extensions requiring Composer with git Category:Extensions used on Wikimedia Category:Extensions with manual MediaWiki version Category:Extensions with release branches compatibility policy Category:GPL licensed extensions Category:GetPreferences extensions Category:Search extensions Category:ShowSearchHitTitle extensions Category:SpecialPageBeforeExecute extensions Category:SpecialSearchResultsAppend extensions Category:SpecialSearchResults extensions Category:Special page extensions Category:Stable extensions