Revert "Add option to show experimental login popup links"
This reverts commit 9b8d4fc6e1.
Bug: T367891
Change-Id: I1b51a56755f7c6123c0b065abef15efd935169fa
This commit is contained in:
parent
52e66c8aa8
commit
43c6ae92f7
9 changed files with 0 additions and 77 deletions
|
|
@ -3087,11 +3087,6 @@ config-schema:
|
|||
Show a bar of language selection links in the user login and user
|
||||
registration forms; edit the "loginlanguagelinks" message to
|
||||
customise these.
|
||||
ExperimentalLoginPopup:
|
||||
default: false
|
||||
description: |-
|
||||
Add extra login links that open different kinds of modal dialogs instead of navigating the page.
|
||||
As of May 2024, this config option is experimental and may be removed or changed in the future.
|
||||
ForceUIMsgAsContentMsg:
|
||||
default: { }
|
||||
type: object
|
||||
|
|
|
|||
|
|
@ -1892,12 +1892,6 @@ $wgUseXssLanguage = null;
|
|||
*/
|
||||
$wgLoginLanguageSelector = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the ExperimentalLoginPopup setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::ExperimentalLoginPopup
|
||||
*/
|
||||
$wgExperimentalLoginPopup = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the ForceUIMsgAsContentMsg setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::ForceUIMsgAsContentMsg
|
||||
|
|
|
|||
|
|
@ -1907,12 +1907,6 @@ class MainConfigNames {
|
|||
*/
|
||||
public const LoginLanguageSelector = 'LoginLanguageSelector';
|
||||
|
||||
/**
|
||||
* Name constant for the ExperimentalLoginPopup setting, for use with Config::get()
|
||||
* @see MainConfigSchema::ExperimentalLoginPopup
|
||||
*/
|
||||
public const ExperimentalLoginPopup = 'ExperimentalLoginPopup';
|
||||
|
||||
/**
|
||||
* Name constant for the ForceUIMsgAsContentMsg setting, for use with Config::get()
|
||||
* @see MainConfigSchema::ForceUIMsgAsContentMsg
|
||||
|
|
|
|||
|
|
@ -4973,15 +4973,6 @@ class MainConfigSchema {
|
|||
'default' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* Add extra login links that open different kinds of modal dialogs instead of navigating the page.
|
||||
*
|
||||
* As of May 2024, this config option is experimental and may be removed or changed in the future.
|
||||
*/
|
||||
public const ExperimentalLoginPopup = [
|
||||
'default' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* When translating messages with wfMessage(), it is not always clear what
|
||||
* should be considered UI messages and what should be content messages.
|
||||
|
|
|
|||
|
|
@ -605,7 +605,6 @@ return [
|
|||
'VariantArticlePath' => false,
|
||||
'UseXssLanguage' => false,
|
||||
'LoginLanguageSelector' => false,
|
||||
'ExperimentalLoginPopup' => false,
|
||||
'ForceUIMsgAsContentMsg' => [
|
||||
],
|
||||
'RawHtmlMessages' => [
|
||||
|
|
|
|||
|
|
@ -517,16 +517,6 @@ class SkinTemplate extends Skin {
|
|||
? 'login'
|
||||
: 'login-private';
|
||||
$personal_urls[$key] = $login_url;
|
||||
|
||||
if ( $this->getConfig()->get( MainConfigNames::ExperimentalLoginPopup ) ) {
|
||||
// Allow testing the new login flows (T364941).
|
||||
// The label is not localized because this is temporary and not to be enabled in production.
|
||||
foreach ( [ 'popup', 'iframe', 'newtab' ] as $mode ) {
|
||||
$personal_urls["login-experimental-$mode"] = $login_url;
|
||||
unset( $personal_urls["login-experimental-$mode"]['single-id'] );
|
||||
$personal_urls["login-experimental-$mode"]['text'] .= " (TEST: $mode)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1674,7 +1674,6 @@ return [
|
|||
'ready.js',
|
||||
'checkboxShift.js',
|
||||
'checkboxHack.js',
|
||||
'experimentalLoginPopup.js',
|
||||
'teleportTarget.js',
|
||||
'toggleAllCollapsibles.js',
|
||||
[ 'name' => 'config.json', 'callback' => static function (
|
||||
|
|
@ -1685,7 +1684,6 @@ return [
|
|||
'search' => true,
|
||||
'collapsible' => true,
|
||||
'sortable' => true,
|
||||
'experimentalLoginPopup' => $config->get( MainConfigNames::ExperimentalLoginPopup ),
|
||||
'selectorLogoutLink' => '#pt-logout a[data-mw="interface"]'
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
module.exports = function experimentalLoginPopup() {
|
||||
const modes = {
|
||||
popup: 'startPopupWindow',
|
||||
newtab: 'startNewTabOrWindow',
|
||||
iframe: 'startIframe'
|
||||
};
|
||||
|
||||
for ( const mode in modes ) {
|
||||
const method = modes[ mode ];
|
||||
|
||||
$( `#pt-login-experimental-${ mode }` ).on( 'mouseenter', () => {
|
||||
// Load early
|
||||
mw.loader.using( 'mediawiki.authenticationPopup' );
|
||||
} );
|
||||
|
||||
$( `#pt-login-experimental-${ mode } a` ).on( 'click', ( e ) => {
|
||||
e.preventDefault();
|
||||
mw.loader.using( 'mediawiki.authenticationPopup' ).then( ( require ) => {
|
||||
const authPopup = require( 'mediawiki.authenticationPopup' );
|
||||
authPopup[ method ]().then( ( userinfo ) => {
|
||||
if ( userinfo ) {
|
||||
mw.notify( 'LOGGED IN', { type: 'success' } );
|
||||
} else {
|
||||
mw.notify( 'CANCELLED' );
|
||||
}
|
||||
} ).catch( ( error ) => {
|
||||
mw.notify( String( error ), { type: 'error' } );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
}
|
||||
};
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
var checkboxShift = require( './checkboxShift.js' );
|
||||
var config = require( './config.json' );
|
||||
var experimentalLoginPopup = require( './experimentalLoginPopup.js' );
|
||||
var teleportTarget = require( './teleportTarget.js' );
|
||||
|
||||
// Break out of framesets
|
||||
|
|
@ -176,10 +175,6 @@ $( () => {
|
|||
updatePermanentLinkHash();
|
||||
}
|
||||
|
||||
if ( config.experimentalLoginPopup ) {
|
||||
experimentalLoginPopup();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a trusted UI element to perform a logout has been activated.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue