Extension:SearchVue
SearchVue Release status: beta |
|
---|---|
File:SDAW Search improv 06b metadata in quick view.png | |
Implementation | Special page , Search |
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. |
MediaWiki | master |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Translate the SearchVue extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
SearchVue 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 in order to enhance the media search experience:
If you have a Wikibase repository and a local image store, the following extensions are additionally recommended in order 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 by adding wfLoadExtension( 'SearchVue' );
along with the required config variables to LocalSettings.php
.
You might need to run composer install
in the extension directory, or in the root directory of your MediaWiki installation if you are using a setup that merges all extension's dependencies into MediaWiki's vendor directory.
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 links 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 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 full 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 aren't in core, 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's own variables file, resources/mediasearch-variables.less
. To use them in other files, include mediasearch-variables.less
rather than directly including the base file itself.
The CSS class name prefix sdvs
should be used for extension-level components.
See also
- Structured Data Across Wikimedia/Search Improvements - current design details and page for feedback
File:Wikimedia-logo black.svg | <translate> This {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is being used on one or more [[<tvar name=2>m:Special:MyLanguage/Wikimedia projects</tvar>|Wikimedia projects]].</translate> <translate> This probably means that the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension|skin}} is stable and works well enough to be used by such high-traffic websites.</translate> <translate> Look for this {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extension's|skin's}} name in Wikimedia's <tvar name=2>CommonSettings.php</tvar> and <tvar name=3>InitialiseSettings.php</tvar> configuration files to see where it's installed.</translate> <translate> A full list of the {{<tvar name=1>#ifeq:Extension|Extension</tvar>|extensions|skins}} installed on a particular wiki can be seen on the wiki's <tvar name=ver>Special:Version</tvar> page.</translate> |
SDAW Search improv 06b metadata in quick view.png |
- Pages with script errors
- Pages with broken file links
- Beta status extensions
- Special page extensions
- Search extensions
- Extensions with release branches compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in Wikimedia version control
- GetPreferences extensions
- ShowSearchHitTitle extensions
- SpecialPageBeforeExecute extensions
- SpecialSearchResults extensions
- SpecialSearchResultsAppend extensions
- All extensions
- Extensions used on Wikimedia