mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-13 17:56:55 +00:00
Merge "Add feature flag to disable reference previews by default"
This commit is contained in:
commit
4800c27d34
|
@ -80,6 +80,7 @@ See the .storybook/README.md for details.
|
|||
|
||||
## Terminology
|
||||
|
||||
* Footnote - What the Cite extension shows at the bottom of the page.
|
||||
* Hovercard - Deprecated term for popup.
|
||||
* Link preview - A similar user feature in the Android native app.
|
||||
* Navpop / nav pop - A popup-like UI from the NavigationPopups gadget.
|
||||
|
@ -87,3 +88,6 @@ See the .storybook/README.md for details.
|
|||
being hovered over by a cursor.
|
||||
* Page preview - A specific type of popup that shows a page summary.
|
||||
* Preview - A synonym for popup.
|
||||
* Reference - A specific type of popup that previews the Cite extension's
|
||||
footnotes. Since footnotes are typically used for references, and the tag's
|
||||
name is `<ref>`, the terms are used synonymously.
|
||||
|
|
|
@ -72,6 +72,8 @@
|
|||
"PopupsGateway": "mwApiPlain",
|
||||
"@PopupsRestGatewayEndpoint": "Specify a REST endpoint where summaries should be sourced from. Endpoint must meet the spec at https://www.mediawiki.org/wiki/Specs/Summary/1.2.0",
|
||||
"PopupsRestGatewayEndpoint": "/api/rest_v1/page/summary/",
|
||||
"@PopupsReferencePreviews": "Temporary feature flag to disable reference previews during developement.",
|
||||
"PopupsReferencePreviews": false,
|
||||
"@PopupsEventLogging": "Whether we should log events. Note if this is enabled without using that variable events will be logged for all users without any sampling! Be careful!",
|
||||
"PopupsEventLogging": false,
|
||||
"@PopupsStatsvSamplingRate": "Sampling rate for logging performance data to statsv.",
|
||||
|
|
|
@ -112,6 +112,7 @@ class PopupsHooks {
|
|||
$vars['wgPopupsGateway'] = $conf->get( 'PopupsGateway' );
|
||||
$vars['wgPopupsEventLogging'] = $conf->get( 'PopupsEventLogging' );
|
||||
$vars['wgPopupsRestGatewayEndpoint'] = $conf->get( 'PopupsRestGatewayEndpoint' );
|
||||
$vars['wgPopupsReferencePreviews'] = $conf->get( 'PopupsReferencePreviews' );
|
||||
$vars['wgPopupsStatsvSamplingRate'] = $conf->get( 'PopupsStatsvSamplingRate' );
|
||||
}
|
||||
|
||||
|
|
|
@ -171,11 +171,12 @@ class PopupsHooksTest extends MediaWikiTestCase {
|
|||
'wgPopupsRestGatewayEndpoint' => '/api',
|
||||
'wgPopupsVirtualPageViews' => true,
|
||||
'wgPopupsGateway' => 'mwApiPlain',
|
||||
'wgPopupsReferencePreviews' => false,
|
||||
'wgPopupsStatsvSamplingRate' => 0
|
||||
];
|
||||
$this->setMwGlobals( $config );
|
||||
PopupsHooks::onResourceLoaderGetConfigVars( $vars );
|
||||
$this->assertCount( 6, $vars, 'A configuration is retrieved.' );
|
||||
$this->assertCount( 7, $vars, 'A configuration is retrieved.' );
|
||||
|
||||
foreach ( $config as $key => $value ) {
|
||||
$this->assertEquals(
|
||||
|
|
Loading…
Reference in a new issue