mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-12 09:27:36 +00:00
Merge "Rough logging of metadata panel scrolling"
This commit is contained in:
commit
5c869aa9ec
|
@ -1062,7 +1062,7 @@ $wgResourceModules += array(
|
||||||
|
|
||||||
$wgHooks['EventLoggingRegisterSchemas'][] = function( array &$schemas ) {
|
$wgHooks['EventLoggingRegisterSchemas'][] = function( array &$schemas ) {
|
||||||
$schemas += array(
|
$schemas += array(
|
||||||
'MediaViewer' => 10536413,
|
'MediaViewer' => 10606177,
|
||||||
'MultimediaViewerNetworkPerformance' => 10596581,
|
'MultimediaViewerNetworkPerformance' => 10596581,
|
||||||
'MultimediaViewerDuration' => 10427980,
|
'MultimediaViewerDuration' => 10427980,
|
||||||
'MultimediaViewerAttribution' => 9758179,
|
'MultimediaViewerAttribution' => 9758179,
|
||||||
|
|
|
@ -70,6 +70,8 @@
|
||||||
'image-view': 'User viewed an image.',
|
'image-view': 'User viewed an image.',
|
||||||
'metadata-open': 'User opened the metadata panel.',
|
'metadata-open': 'User opened the metadata panel.',
|
||||||
'metadata-close': 'User closed the metadata panel.',
|
'metadata-close': 'User closed the metadata panel.',
|
||||||
|
'metadata-scroll-open': 'User opened the metadata panel by scrolling.',
|
||||||
|
'metadata-scroll-close': 'User closed the metadata panel by scrolling.',
|
||||||
'next-image': 'User viewed the next image.',
|
'next-image': 'User viewed the next image.',
|
||||||
'prev-image': 'User viewed the previous image.',
|
'prev-image': 'User viewed the previous image.',
|
||||||
'terms-open': 'User opened the usage terms.',
|
'terms-open': 'User opened the usage terms.',
|
||||||
|
|
|
@ -222,8 +222,13 @@
|
||||||
|
|
||||||
if ( panelIsOpen && !this.panelWasOpen ) { // just opened
|
if ( panelIsOpen && !this.panelWasOpen ) { // just opened
|
||||||
this.$container.trigger( 'mmv-metadata-open' );
|
this.$container.trigger( 'mmv-metadata-open' );
|
||||||
|
// This will include keyboard- and mouseclick-initiated open events as well,
|
||||||
|
// since the panel is anomated, which counts as scrolling.
|
||||||
|
// Filtering these seems too much trouble to be worth it.
|
||||||
|
mw.mmv.actionLogger.log( 'metadata-scroll-open' );
|
||||||
} else if ( !panelIsOpen && this.panelWasOpen ) { // just closed
|
} else if ( !panelIsOpen && this.panelWasOpen ) { // just closed
|
||||||
this.$container.trigger( 'mmv-metadata-close' );
|
this.$container.trigger( 'mmv-metadata-close' );
|
||||||
|
mw.mmv.actionLogger.log( 'metadata-scroll-close' );
|
||||||
}
|
}
|
||||||
this.panelWasOpen = panelIsOpen;
|
this.panelWasOpen = panelIsOpen;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue