Tchanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371588 )

Change subject: VisualDiff: Show less information about ref nodes
......................................................................

VisualDiff: Show less information about ref nodes

If a ref node's index changes (e.g. because an earlier
reference was inserted/removed), only describe the index
change.

(Currently the edit diffs in the save dialog don't show
any change if only the index has changed. Perhaps ideally
that is what would happen here eventually.)

Bug: T170235
Change-Id: I2513bb82099a92529516e4e217e61a2d0a2dd43b
---
M modules/ve-cite/ve.dm.MWReferenceNode.js
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/88/371588/1

diff --git a/modules/ve-cite/ve.dm.MWReferenceNode.js 
b/modules/ve-cite/ve.dm.MWReferenceNode.js
index de55223..1fae5b8 100644
--- a/modules/ve-cite/ve.dm.MWReferenceNode.js
+++ b/modules/ve-cite/ve.dm.MWReferenceNode.js
@@ -323,7 +323,11 @@
        return clone;
 };
 
+/**
+ * @inheritdoc
+ */
 ve.dm.MWReferenceNode.static.describeChange = function ( key, change ) {
+       // Only display messages for refGroup and listIndex changes
        if ( key === 'refGroup' ) {
                if ( change.from ) {
                        if ( change.to ) {
@@ -334,11 +338,9 @@
                }
                return ve.msg( 'cite-ve-changedesc-reflist-group-to', change.to 
);
        }
-       if ( key === 'listGroup' || key === 'originalMw' ) {
-               return null;
+       if ( key === 'listIndex' ) {
+               return 
ve.dm.MWReferenceNode.parent.static.describeChange.apply( this, arguments );
        }
-
-       return ve.dm.MWReferenceNode.parent.static.describeChange.apply( this, 
arguments );
 };
 
 /* Methods */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2513bb82099a92529516e4e217e61a2d0a2dd43b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Tchanders <thalia.e.c...@googlemail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to