Mooeypoo has uploaded a new change for review.
https://gerrit.wikimedia.org/r/195313
Change subject: Only set element as icon in transclusions that require it
......................................................................
Only set element as icon in transclusions that require it
When deciding to add an icon to a transclusion (specifically, when
it is hidden) do so only if it is justified. Otherwise the
node becomes the icon even when it has information in it, which,
starting from the latest ooui change, also has specific (small)
sizing.
Change-Id: I521c92fc645a392077e6cc90f55557c4cea3cb11
---
M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/13/195313/1
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
index 139e7ce..3dbd514 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
@@ -131,8 +131,6 @@
// Since render replaces this.$element with a new node, we need to make
sure
// our iconElement is defined again to be this.$element
- this.setIconElement( this.$element );
- this.$element.addClass( 've-ce-mwTransclusionNode' );
if (
$( generatedContents ).text().trim().length === 0 &&
// Check whether the element is too small to comfortably select
@@ -141,6 +139,8 @@
this.$element.height() < 8
)
) {
+ this.setIconElement( this.$element );
+ this.$element.addClass( 've-ce-mwTransclusionNode' );
// The template is empty or hidden
this.setIcon( 'template' );
} else {
--
To view, visit https://gerrit.wikimedia.org/r/195313
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I521c92fc645a392077e6cc90f55557c4cea3cb11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits