jenkins-bot has submitted this change and it was merged.

Change subject: Turn off universal box-sizing in alpha
......................................................................


Turn off universal box-sizing in alpha

This has apparently been causing issues for VisualEditor
Thus in alpha, to allow us to explore any breakage,
restrict it to views except VisualEditor
(I dislike the class name but I imagine this will only be temporary
whilst we work out what if anything actually needs this)
Bug: T85068
Bug: T86366
Change-Id: Iba498e31dece2e03351c8fd8ba04b90be128bd16
---
M javascripts/View.js
M javascripts/modules/editor/VisualEditorOverlay.js
M less/common.less
M less/reset.less
M tests/qunit/test_View.js
5 files changed, 24 insertions(+), 3 deletions(-)

Approvals:
  Kaldari: Looks good to me, approved
  Esanders: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/javascripts/View.js b/javascripts/View.js
index 87f7fb4..b5ebab2 100644
--- a/javascripts/View.js
+++ b/javascripts/View.js
@@ -145,6 +145,8 @@
                                this.$el = $( '<' + this.tagName + '>' );
                        }
                        this.$el.addClass( this.className );
+                       // FIXME: If this becomes a default should become part 
of className property.
+                       this.$el.addClass( 'view-border-box' );
 
                        // TODO: if template compilation is too slow, don't 
compile them on a
                        // per object basis, but don't worry about it now 
(maybe add cache to
diff --git a/javascripts/modules/editor/VisualEditorOverlay.js 
b/javascripts/modules/editor/VisualEditorOverlay.js
index b6d1680..ce21fc9 100644
--- a/javascripts/modules/editor/VisualEditorOverlay.js
+++ b/javascripts/modules/editor/VisualEditorOverlay.js
@@ -45,6 +45,8 @@
                        } );
                        this.$continueBtn = self.$( '.continue' ).prop( 
'disabled', true );
                        this.initializeSwitcher();
+                       // FIXME: This should be done by manipulating className
+                       this.$el.removeClass( 'view-border-box' );
                },
                /**
                 * Destroy the existing VisualEditor target.
diff --git a/less/common.less b/less/common.less
index c7f027d..e06f0a4 100644
--- a/less/common.less
+++ b/less/common.less
@@ -31,6 +31,14 @@
        bottom: 0;
 }
 
+// FIXME: Make default or delete based on outcome of T86366
+.alpha {
+       .view-border-box *,
+       .view-border-box {
+               .box-sizing(border-box);
+       }
+}
+
 .mw-mf-image-replacement {
        font-style: italic;
        color: @colorGray7;
diff --git a/less/reset.less b/less/reset.less
index fe0affa..04b5f59 100644
--- a/less/reset.less
+++ b/less/reset.less
@@ -21,16 +21,25 @@
        font: inherit;
        vertical-align: baseline;
        background: none;
-       .box-sizing(border-box);
 }
 table, caption, tbody, tfoot, thead, tr, th, td {
        font-size: 100%;
-       .box-sizing(border-box);
 }
+
+// box-sizing rules (currently in flux)
+// FIXME: Make default or delete based on outcome of T86366
+.beta,
+.stable {
+       * {
+               .box-sizing(border-box);
+       }
+}
+
 // CentralNotice banners use regular box-sizing
 div#centralNotice {
        .box-sizing(content-box);
 }
+
 button {
        border: none;
        background-color: transparent;
diff --git a/tests/qunit/test_View.js b/tests/qunit/test_View.js
index 0a88ce2..e43dc78 100644
--- a/tests/qunit/test_View.js
+++ b/tests/qunit/test_View.js
@@ -90,7 +90,7 @@
                        content: 'Some content'
                } );
                assert.strictEqual( view.$el[ 0 ].tagName.toUpperCase(), 'DIV', 
'wrap template in <div>' );
-               assert.strictEqual( view.$el.attr( 'class' ), 'my-class', 'set 
class for $el' );
+               assert.strictEqual( view.$el.hasClass( 'my-class' ), true, 'set 
class for $el' );
                assert.strictEqual( view.title(), 'Test', 'fill template with 
data from options' );
                assert.strictEqual( view.content(), 'Some content', 'fill 
template with data from options' );
        } );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba498e31dece2e03351c8fd8ba04b90be128bd16
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to