Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/174876

Change subject: Update OOjs UI to v0.1.0-pre (2a36afc90f)
......................................................................

Update OOjs UI to v0.1.0-pre (2a36afc90f)

New changes:
77d1ce2 Revert "Followup ca6a16f: use parent selector both for hiding and 
showing windows"
2a36afc Revert "Show the modal overlay as soon as openWindow is called"

Change-Id: Ia2f711e680ca92c05323797addc463cc12281a16
---
M resources/lib/oojs-ui/oojs-ui-apex.css
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-apex.svg.css
M resources/lib/oojs-ui/oojs-ui-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
M resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
M resources/lib/oojs-ui/oojs-ui.js
7 files changed, 35 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/174876/1

diff --git a/resources/lib/oojs-ui/oojs-ui-apex.css 
b/resources/lib/oojs-ui/oojs-ui-apex.css
index 1fd726c..813eca6 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.css
+++ b/resources/lib/oojs-ui/oojs-ui-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:14Z
+ * Date: 2014-11-21T00:25:55Z
  */
 /* @noflip */
 .oo-ui-rtl {
@@ -1974,7 +1974,7 @@
        height: 0;
        overflow: hidden;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
        width: auto;
        height: auto;
        top: 0;
@@ -1995,12 +1995,6 @@
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > 
.oo-ui-window-frame > iframe {
        width: 100%;
        height: 100%;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
-       visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
-       visibility: visible;
 }
 .oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
        width: 100%;
@@ -2032,7 +2026,7 @@
             -o-transition: all 250ms ease-in-out;
                transition: all 250ms ease-in-out;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
        opacity: 1;
 }
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js 
b/resources/lib/oojs-ui/oojs-ui-apex.js
index 7a2b5c5..b00eb90 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/resources/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:07Z
+ * Date: 2014-11-21T00:25:43Z
  */
 /* Instantiation */
 
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.svg.css 
b/resources/lib/oojs-ui/oojs-ui-apex.svg.css
index f23cb63..c2327e6 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.svg.css
+++ b/resources/lib/oojs-ui/oojs-ui-apex.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:14Z
+ * Date: 2014-11-21T00:25:55Z
  */
 /* @noflip */
 .oo-ui-rtl {
@@ -1974,7 +1974,7 @@
        height: 0;
        overflow: hidden;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
        width: auto;
        height: auto;
        top: 0;
@@ -1995,12 +1995,6 @@
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > 
.oo-ui-window-frame > iframe {
        width: 100%;
        height: 100%;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
-       visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
-       visibility: visible;
 }
 .oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
        width: 100%;
@@ -2032,7 +2026,7 @@
             -o-transition: all 250ms ease-in-out;
                transition: all 250ms ease-in-out;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
        opacity: 1;
 }
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.css 
b/resources/lib/oojs-ui/oojs-ui-mediawiki.css
index c667550..b2ec2d3 100644
--- a/resources/lib/oojs-ui/oojs-ui-mediawiki.css
+++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:14Z
+ * Date: 2014-11-21T00:25:55Z
  */
 /* @noflip */
 .oo-ui-rtl {
@@ -1846,7 +1846,7 @@
        height: 0;
        overflow: hidden;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
        width: auto;
        height: auto;
        top: 0;
@@ -1867,12 +1867,6 @@
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > 
.oo-ui-window-frame > iframe {
        width: 100%;
        height: 100%;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
-       visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
-       visibility: visible;
 }
 .oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
        width: 100%;
@@ -1904,7 +1898,7 @@
             -o-transition: all 250ms ease-in-out;
                transition: all 250ms ease-in-out;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
        opacity: 1;
 }
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.js 
b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
index 58e7a3c..5db4005 100644
--- a/resources/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:07Z
+ * Date: 2014-11-21T00:25:43Z
  */
 /**
  * @class
diff --git a/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css 
b/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
index d7f92d5..9fe2918 100644
--- a/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
+++ b/resources/lib/oojs-ui/oojs-ui-mediawiki.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:14Z
+ * Date: 2014-11-21T00:25:55Z
  */
 /* @noflip */
 .oo-ui-rtl {
@@ -1846,7 +1846,7 @@
        height: 0;
        overflow: hidden;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
        width: auto;
        height: auto;
        top: 0;
@@ -1867,12 +1867,6 @@
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > 
.oo-ui-window-frame > iframe {
        width: 100%;
        height: 100%;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
-       visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
-       visibility: visible;
 }
 .oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
        width: 100%;
@@ -1904,7 +1898,7 @@
             -o-transition: all 250ms ease-in-out;
                transition: all 250ms ease-in-out;
 }
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
        opacity: 1;
 }
 .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > 
.oo-ui-window-frame {
diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js
index 1165085..228f01c 100644
--- a/resources/lib/oojs-ui/oojs-ui.js
+++ b/resources/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (d0af1e5b65)
+ * OOjs UI v0.1.0-pre (2a36afc90f)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-18T00:28:07Z
+ * Date: 2014-11-21T00:25:43Z
  */
 ( function ( OO ) {
 
@@ -1439,6 +1439,7 @@
  * @param {Object} [config] Configuration options
  * @cfg {string} [size] Symbolic name of dialog size, `small`, `medium`, 
`large` or `full`; omit to
  *   use #static-size
+ * @fires initialize
  */
 OO.ui.Window = function OoUiWindow( config ) {
        // Configuration initialization
@@ -1820,7 +1821,7 @@
  * instead of display.
  *
  * @param {boolean} [show] Make window visible, omit to toggle visibility
- * @fires toggle
+ * @fires visible
  * @chainable
  */
 OO.ui.Window.prototype.toggle = function ( show ) {
@@ -2081,7 +2082,7 @@
 
        this.getTeardownProcess( data ).execute().done( function () {
                // Force redraw by asking the browser to measure the elements' 
widths
-               win.$element.removeClass( 'oo-ui-window-load 
oo-ui-window-setup' ).width();
+               win.$element.removeClass( 'oo-ui-window-setup' ).width();
                win.$content.removeClass( 'oo-ui-window-content-setup' 
).width();
                win.$element.hide();
                win.visible = false;
@@ -2094,9 +2095,10 @@
 /**
  * Load the frame contents.
  *
- * Once the iframe's stylesheets are loaded the returned promise will be 
resolved. Calling while
- * loading will return a promise but not trigger a new loading cycle. Calling 
after loading is
- * complete will return a promise that's already been resolved.
+ * Once the iframe's stylesheets are loaded, the `load` event will be emitted 
and the returned
+ * promise will be resolved. Calling while loading will return a promise but 
not trigger a new
+ * loading cycle. Calling after loading is complete will return a promise 
that's already been
+ * resolved.
  *
  * Sounds simple right? Read on...
  *
@@ -2125,12 +2127,11 @@
  * All this stylesheet injection and polling magic is in #transplantStyles.
  *
  * @return {jQuery.Promise} Promise resolved when loading is complete
+ * @fires load
  */
 OO.ui.Window.prototype.load = function () {
        var sub, doc, loading,
                win = this;
-
-       this.$element.addClass( 'oo-ui-window-load' );
 
        // Non-isolated windows are already "loaded"
        if ( !this.loading && !this.isolated ) {
@@ -2855,10 +2856,13 @@
 
        // Window opening
        if ( opening.state() !== 'rejected' ) {
-               if ( !win.getManager() ) {
+               // Begin loading the window if it's not loading or loaded 
already - may take noticable time
+               // and we want to do this in parallel with any other 
preparatory actions
+               if ( !win.isLoading() && !win.isLoaded() ) {
+                       // Finish initializing the window (must be done after 
manager is attached to DOM)
                        win.setManager( this );
+                       preparing.push( win.load() );
                }
-               preparing.push( win.load() );
 
                if ( this.closing ) {
                        // If a window is currently closing, wait for it to 
complete

-- 
To view, visit https://gerrit.wikimedia.org/r/174876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2f711e680ca92c05323797addc463cc12281a16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf8
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to