jenkins-bot has submitted this change and it was merged.
Change subject: Use Schema revision 15777589 for logging events
......................................................................
Use Schema revision 15777589 for logging events
The schema introduces a new field called `hovercardsSuppressedByGadget`,
which is `true` when the Navigation Popups gadget, rather than the Popups
extensions, is being used to fetch and display article summary.
Note that it may take some time before the Navigation Popups gadget is
loaded onto the page, thus actions taking place before this happens will
record the value of `hovercardsSuppressedByGadget` as `false`. This is
mostly the case with the `pageLoaded` action which almost always happens
before the gadget code is loaded.
Bug: T137203
Change-Id: Ie31deea7ae2323d6a346c67ed84fdf587ad55bd1
---
M extension.json
M resources/ext.popups.schemaPopups.utils.js
M resources/ext.popups.targets/desktopTarget.js
3 files changed, 12 insertions(+), 6 deletions(-)
Approvals:
jenkins-bot: Verified
Phuedx: Looks good to me, approved
diff --git a/extension.json b/extension.json
index db88d9b..e5f07d8 100644
--- a/extension.json
+++ b/extension.json
@@ -43,7 +43,7 @@
]
},
"EventLoggingSchemas": {
- "Popups": 15597282
+ "Popups": 15777589
},
"config": {
"@PopupsBetaFeature": "@var bool: Whether the extension should
be enabled as an opt-in beta feature. If true, the BetaFeatures extension must
be installed. False by default.",
diff --git a/resources/ext.popups.schemaPopups.utils.js
b/resources/ext.popups.schemaPopups.utils.js
index faf10ed..405b308 100644
--- a/resources/ext.popups.schemaPopups.utils.js
+++ b/resources/ext.popups.schemaPopups.utils.js
@@ -10,6 +10,7 @@
namespaceIdSource: mw.config.get( 'wgNamespaceNumber' ),
pageIdSource: mw.config.get( 'wgArticleId' ),
isAnon: mw.user.isAnon(),
+ hovercardsSuppressedByGadget: false,
popupEnabled: mw.popups.getEnabledState(),
popupDelay: mw.popups.render.POPUP_DELAY,
pageToken: mw.user.generateRandomSessionId() +
diff --git a/resources/ext.popups.targets/desktopTarget.js
b/resources/ext.popups.targets/desktopTarget.js
index 29ebb5a..02fbd19 100644
--- a/resources/ext.popups.targets/desktopTarget.js
+++ b/resources/ext.popups.targets/desktopTarget.js
@@ -27,7 +27,8 @@
pageTitleHover: $this.attr( 'title' ),
action: 'dwelledButAbandoned',
totalInteractionTime: Math.round( mw.now() -
data.dwellStartTime ),
- linkInteractionToken: data.linkInteractionToken
+ linkInteractionToken: data.linkInteractionToken,
+ hovercardsSuppressedByGadget:
data.hovercardsSuppressedByGadget
} );
}
}
@@ -50,7 +51,8 @@
pageTitleHover: $this.attr( 'title' ),
action: action,
totalInteractionTime: Math.round( mw.now() -
data.dwellStartTime ),
- linkInteractionToken: data.linkInteractionToken
+ linkInteractionToken: data.linkInteractionToken,
+ hovercardsSuppressedByGadget:
data.hovercardsSuppressedByGadget
} );
if ( action === 'opened in same tab' ) {
@@ -150,11 +152,13 @@
// have a side-effect on the other
function's data.
.on( 'mouseleave blur', {
dwellStartTime: dwellStartTime,
- linkInteractionToken:
linkInteractionToken
+ linkInteractionToken:
linkInteractionToken,
+ hovercardsSuppressedByGadget:
isNavigationPopupsGadgetEnabled()
}, onLinkAbandon )
.on( 'click', {
dwellStartTime: dwellStartTime,
- linkInteractionToken:
linkInteractionToken
+ linkInteractionToken:
linkInteractionToken,
+ hovercardsSuppressedByGadget:
isNavigationPopupsGadgetEnabled()
}, onLinkClick );
}
} );
@@ -191,7 +195,8 @@
}
mw.track( 'ext.popups.schemaPopups', {
- action: 'pageLoaded'
+ action: 'pageLoaded',
+ hovercardsSuppressedByGadget:
isNavigationPopupsGadgetEnabled()
} );
} );
} )( jQuery, mediaWiki );
--
To view, visit https://gerrit.wikimedia.org/r/299733
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie31deea7ae2323d6a346c67ed84fdf587ad55bd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits