mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
mw.ViewPageTarget: Remove JS animations from transformPage()
Follows-up62c1d64ad0
. * Remove '.mw-indicators' animation for opacity. Was a left-over from other elements previously stripped in62c1d64ad0
. * '#siteNotice' no longer slides. It's hidden at the same time as '#contentSub', '#toc', and other elements. This is an annoying jump, and we should find a way to do it consistently and in a performant manner. * Fix state classes added in62c1d64ad0
. During deactivation, the ve-active class was kept for too long. This created a temporary state in which ve-active *and* ve-deactivating were applied. This was harmless as nothing ises the 've-deactivating' class yet. * Leaving toolbar as-is for another commit. Bug: T89543 Change-Id: Ide49f93c45a12f2c13eb4412a9a16a82fefeb43e
This commit is contained in:
parent
f687ba7ce0
commit
60e5ac0902
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
|
||||
.ve-activated #toc,
|
||||
.ve-activated #siteNotice,
|
||||
.ve-activated .mw-indicators,
|
||||
/* Most of bodyContent can be hidden as VE has an equivalent of most children
|
||||
in ve-init-target (sibling of #bodyContent). However, we can't hide it
|
||||
completely as subs should remain visible (for persistence with read mode),
|
||||
|
|
|
@ -287,7 +287,7 @@ ve.init.mw.ViewPageTarget.prototype.activate = function () {
|
|||
|
||||
$( 'html' ).addClass( 've-activating ve-activated' );
|
||||
this.activatingDeferred.always( function () {
|
||||
$( 'html' ).addClass( 've-active' ).removeClass( 've-activating' );
|
||||
$( 'html' ).removeClass( 've-activating' ).addClass( 've-active' );
|
||||
} );
|
||||
|
||||
this.bindHandlers();
|
||||
|
@ -368,7 +368,7 @@ ve.init.mw.ViewPageTarget.prototype.cancel = function ( trackMechanism ) {
|
|||
}
|
||||
|
||||
this.deactivating = true;
|
||||
$( 'html' ).removeClass( 've-activated' ).addClass( 've-deactivating' );
|
||||
$( 'html' ).addClass( 've-deactivating' ).removeClass( 've-activated ve-active' );
|
||||
// User interface changes
|
||||
if ( this.elementsThatHadOurAccessKey ) {
|
||||
this.elementsThatHadOurAccessKey.attr( 'accesskey', ve.msg( 'accesskey-save' ) );
|
||||
|
@ -409,7 +409,7 @@ ve.init.mw.ViewPageTarget.prototype.cancel = function ( trackMechanism ) {
|
|||
target.deactivating = false;
|
||||
target.activating = false;
|
||||
target.activatingDeferred.reject();
|
||||
$( 'html' ).removeClass( 've-active ve-deactivating' );
|
||||
$( 'html' ).removeClass( 've-deactivating' );
|
||||
|
||||
// Move remaining elements back out of the target
|
||||
target.$element.parent().append( target.$element.children() );
|
||||
|
@ -1338,15 +1338,6 @@ ve.init.mw.ViewPageTarget.prototype.transformPage = function () {
|
|||
|
||||
mw.hook( 've.activate' ).fire();
|
||||
|
||||
// Hide site notice (if present)
|
||||
$( '#siteNotice:visible' )
|
||||
.addClass( 've-hide' )
|
||||
.slideUp( 'fast' );
|
||||
// Hide page status indicators (if present)
|
||||
$( '.mw-indicators' )
|
||||
.addClass( 've-hide' )
|
||||
.fadeOut( 'fast' );
|
||||
|
||||
// Push veaction=edit url in history (if not already. If we got here by a veaction=edit
|
||||
// permalink then it will be there already and the constructor called #activate)
|
||||
if ( !this.actFromPopState && history.pushState && this.currentUri.query.veaction !== 'edit' ) {
|
||||
|
@ -1373,13 +1364,6 @@ ve.init.mw.ViewPageTarget.prototype.restorePage = function () {
|
|||
|
||||
mw.hook( 've.deactivate' ).fire();
|
||||
|
||||
// Make site notice visible again (if present)
|
||||
$( '#siteNotice.ve-hide' )
|
||||
.slideDown( 'fast' );
|
||||
// Make page status indicators visible again (if present)
|
||||
$( '.mw-indicators.ve-hide' )
|
||||
.fadeIn( 'fast' );
|
||||
|
||||
// Push non-veaction=edit url in history
|
||||
if ( !this.actFromPopState && history.pushState ) {
|
||||
// Remove the veaction query parameter
|
||||
|
|
Loading…
Reference in a new issue