mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Logging: editor_interface should be visualeditor
not visual
.
Also, it should switch when the editor switches. Bug: T254291 Change-Id: I2550529f51a8417586d6f0791d958fcf4b9d4fc6
This commit is contained in:
parent
e4da8b10f3
commit
5fa7d713d8
|
@ -156,7 +156,7 @@ CommentController.prototype.setup = function ( mode ) {
|
|||
mechanism: 'click',
|
||||
// TODO: Use 'wikitext-2017' when config.enable2017Wikitext is set
|
||||
// eslint-disable-next-line camelcase
|
||||
editor_interface: mode === 'visual' ? 'visual' : 'wikitext'
|
||||
editor_interface: mode === 'visual' ? 'visualeditor' : 'wikitext'
|
||||
} );
|
||||
|
||||
this.$replyLinkButtons.addClass( 'dt-init-replylink-active' );
|
||||
|
|
|
@ -252,7 +252,7 @@ ReplyWidget.prototype.onModeTabSelectChoose = function ( option ) {
|
|||
mw.track( 'dt.schemaVisualEditorFeatureUse', {
|
||||
feature: 'editor-switch',
|
||||
// TODO: Log as `source-nwe-desktop` when enable2017Wikitext is set
|
||||
action: mode + '-desktop'
|
||||
action: ( mode === 'visual' ? 'visualeditor' : 'wikitext' ) + '-desktop'
|
||||
} );
|
||||
};
|
||||
|
||||
|
|
|
@ -222,5 +222,10 @@ mw.loader.using( 'ext.eventLogging' ).done( function () {
|
|||
mw.config.get( 'wgWMESchemaEditAttemptStepOversample' )
|
||||
) ? 1 : sampleRate );
|
||||
}
|
||||
|
||||
if ( data.feature === 'editor-switch' ) {
|
||||
// eslint-disable-next-line camelcase
|
||||
session.editor_interface = session.editor_interface === 'visualeditor' ? 'wikitext' : 'visualeditor';
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue