Red links are linked separately

In I1a471f81cc9390fc9e8665a7a336cf2dd7a063ab we excluded
edit events that led to the creation of a new page.

This restores them by providing a dedicated home for this data
in the schema.

Additional changes:
* Address some line length warnings

Bug: T204073
Change-Id: Ie7eb95f15737e94b7926d38ed6411bc0e5df2404
This commit is contained in:
jdlrobson 2018-09-18 11:30:32 -07:00 committed by Stephen Niedzielski
parent 287a2aafe9
commit 03bc2518d4
2 changed files with 25 additions and 7 deletions

View File

@ -59,6 +59,7 @@
* @instance
*/
events: util.extend( {}, Overlay.prototype.events, {
'click a[href*=redlink]': 'onRedLinkClick',
'click a:not(.external):not([href*=edit])': 'onInternalClick',
// Only register attempts to edit an existing page (should be the one we are on),
// not internal clicks on redlinks to nonexistent pages:
@ -105,9 +106,10 @@
},
/**
* Event that is triggered when an internal link inside the overlay is clicked. This event
* will not be triggered if the link contains the edit keyword, in which case onEditClick
* will be fired. This is primarily used for instrumenting page issues (see
* Event that is triggered when an internal link inside the overlay is clicked.
* This event will not be triggered if the link contains the edit keyword,
* in which case onEditClick will be
* fired. This is primarily used for instrumenting page issues (see
* https://meta.wikimedia.org/wiki/Schema:PageIssues).
* @param {JQuery.Event} ev
* @memberof PageIssuesOverlay
@ -122,10 +124,26 @@
},
/**
* Event that is triggered when an edit link inside the overlay is clicked. This is
* primarily used for instrumenting page issues (see
* https://meta.wikimedia.org/wiki/Schema:PageIssues).
* Event that is triggered when a red link (e.g. a link to a page which doesn't exist)
* inside the overlay is clicked.
* @param {JQuery.Event} ev
* @memberof PageIssuesOverlay
* @instance
*/
onRedLinkClick: function ( ev ) {
var severity = parseSeverity( this.$( ev.target ) );
this.log( {
action: 'modalRedLinkClicked',
issuesSeverity: [ severity ]
} );
},
/**
* Event that is triggered when an edit link inside the overlay is clicked.
* This is primarily
* used for instrumenting page issues (see https://meta.wikimedia.org/wiki/Schema:PageIssues).
* The event will not be triggered in the case of red links.
* See onRedLinkClick for red links.
* @param {JQuery.Event} ev
* @memberof PageIssuesOverlay
* @instance

View File

@ -152,7 +152,7 @@
}
},
"EventLoggingSchemas": {
"PageIssues": 18326688,
"PageIssues": 18392542,
"WebClientError": 18340282
},
"ResourceModules": {