mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-18 02:00:53 +00:00
Merge duplicate ReferencePreviews Beta feature flag
Change-Id: Ia7f1c9128460bc5a139e37eb16fff649e80cd20f
This commit is contained in:
parent
700f8ed306
commit
e19b557227
|
@ -182,7 +182,6 @@ class PopupsHooks {
|
||||||
$vars['wgPopupsRestGatewayEndpoint'] = $config->get( 'PopupsRestGatewayEndpoint' );
|
$vars['wgPopupsRestGatewayEndpoint'] = $config->get( 'PopupsRestGatewayEndpoint' );
|
||||||
$vars['wgPopupsStatsvSamplingRate'] = $config->get( 'PopupsStatsvSamplingRate' );
|
$vars['wgPopupsStatsvSamplingRate'] = $config->get( 'PopupsStatsvSamplingRate' );
|
||||||
$vars['wgPopupsTextExtractsIntroOnly'] = $config->get( 'PopupsTextExtractsIntroOnly' );
|
$vars['wgPopupsTextExtractsIntroOnly'] = $config->get( 'PopupsTextExtractsIntroOnly' );
|
||||||
$vars['wgPopupsReferencePreviewsBetaFeature'] = $config->get( 'PopupsReferencePreviewsBetaFeature' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -196,7 +195,6 @@ class PopupsHooks {
|
||||||
* setting.
|
* setting.
|
||||||
* * `wgPopupsConflictsWithNavPopupGadget' - The server's notion of whether or not the
|
* * `wgPopupsConflictsWithNavPopupGadget' - The server's notion of whether or not the
|
||||||
* user has enabled conflicting Navigational Popups Gadget.
|
* user has enabled conflicting Navigational Popups Gadget.
|
||||||
*
|
|
||||||
* * `wgPopupsConflictsWithRefTooltipsGadget' - The server's notion of whether or not the
|
* * `wgPopupsConflictsWithRefTooltipsGadget' - The server's notion of whether or not the
|
||||||
* user has enabled conflicting Reference Tooltips Gadget.
|
* user has enabled conflicting Reference Tooltips Gadget.
|
||||||
*
|
*
|
||||||
|
|
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map.json
vendored
BIN
resources/dist/index.js.map.json
vendored
Binary file not shown.
|
@ -32,7 +32,7 @@ export default function setUserConfigFlags( config ) {
|
||||||
!!( popupsFlags & REFERENCE_PREVIEWS_ENABLED )
|
!!( popupsFlags & REFERENCE_PREVIEWS_ENABLED )
|
||||||
);
|
);
|
||||||
config.set(
|
config.set(
|
||||||
'wgPopupsReferencePreviewsBeta',
|
'wgPopupsReferencePreviewsBetaFeature',
|
||||||
!!( popupsFlags & REFERENCE_PREVIEWS_BETA )
|
!!( popupsFlags & REFERENCE_PREVIEWS_BETA )
|
||||||
);
|
);
|
||||||
/* eslint-enable no-bitwise */
|
/* eslint-enable no-bitwise */
|
||||||
|
|
|
@ -34,7 +34,7 @@ export default function createSettingsDialogRenderer( config ) {
|
||||||
*/
|
*/
|
||||||
return ( boundActions ) => {
|
return ( boundActions ) => {
|
||||||
if ( !$dialog ) {
|
if ( !$dialog ) {
|
||||||
$dialog = createSettingsDialog( config.get( 'wgPopupsReferencePreviewsBeta' ) );
|
$dialog = createSettingsDialog( config.get( 'wgPopupsReferencePreviewsBetaFeature' ) );
|
||||||
$overlay = $( '<div>' ).addClass( 'mwe-popups-overlay' );
|
$overlay = $( '<div>' ).addClass( 'mwe-popups-overlay' );
|
||||||
|
|
||||||
// Setup event bindings
|
// Setup event bindings
|
||||||
|
|
|
@ -13,7 +13,7 @@ QUnit.test( 'config settings are successfully set from bitmask', ( assert ) => {
|
||||||
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
||||||
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
||||||
config.get( 'wgPopupsReferencePreviews' ),
|
config.get( 'wgPopupsReferencePreviews' ),
|
||||||
config.get( 'wgPopupsReferencePreviewsBeta' )
|
config.get( 'wgPopupsReferencePreviewsBetaFeature' )
|
||||||
],
|
],
|
||||||
[ true, true, true, true ]
|
[ true, true, true, true ]
|
||||||
);
|
);
|
||||||
|
@ -26,7 +26,7 @@ QUnit.test( 'config settings are successfully set from bitmask', ( assert ) => {
|
||||||
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
||||||
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
||||||
config.get( 'wgPopupsReferencePreviews' ),
|
config.get( 'wgPopupsReferencePreviews' ),
|
||||||
config.get( 'wgPopupsReferencePreviewsBeta' )
|
config.get( 'wgPopupsReferencePreviewsBetaFeature' )
|
||||||
],
|
],
|
||||||
[ false, true, false, true ]
|
[ false, true, false, true ]
|
||||||
);
|
);
|
||||||
|
@ -39,7 +39,7 @@ QUnit.test( 'config settings are successfully set from bitmask', ( assert ) => {
|
||||||
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
||||||
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
||||||
config.get( 'wgPopupsReferencePreviews' ),
|
config.get( 'wgPopupsReferencePreviews' ),
|
||||||
config.get( 'wgPopupsReferencePreviewsBeta' )
|
config.get( 'wgPopupsReferencePreviewsBetaFeature' )
|
||||||
],
|
],
|
||||||
[ true, false, true, false ]
|
[ true, false, true, false ]
|
||||||
);
|
);
|
||||||
|
@ -52,7 +52,7 @@ QUnit.test( 'config settings are successfully set from bitmask', ( assert ) => {
|
||||||
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
config.get( 'wgPopupsConflictsWithNavPopupGadget' ),
|
||||||
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
config.get( 'wgPopupsConflictsWithRefTooltipsGadget' ),
|
||||||
config.get( 'wgPopupsReferencePreviews' ),
|
config.get( 'wgPopupsReferencePreviews' ),
|
||||||
config.get( 'wgPopupsReferencePreviewsBeta' )
|
config.get( 'wgPopupsReferencePreviewsBetaFeature' )
|
||||||
],
|
],
|
||||||
[ false, false, false, false ]
|
[ false, false, false, false ]
|
||||||
);
|
);
|
||||||
|
|
|
@ -158,7 +158,7 @@ class PopupsHooksTest extends MediaWikiTestCase {
|
||||||
];
|
];
|
||||||
$this->setMwGlobals( $config );
|
$this->setMwGlobals( $config );
|
||||||
PopupsHooks::onResourceLoaderGetConfigVars( $vars, '' );
|
PopupsHooks::onResourceLoaderGetConfigVars( $vars, '' );
|
||||||
$this->assertCount( 8, $vars, 'A configuration is retrieved.' );
|
$this->assertCount( 7, $vars, 'A configuration is retrieved.' );
|
||||||
|
|
||||||
foreach ( $config as $key => $value ) {
|
foreach ( $config as $key => $value ) {
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
|
|
Loading…
Reference in a new issue