jenkins-bot has submitted this change and it was merged.

Change subject: Add mediawiki-specific sequences to the command help dialog
......................................................................


Add mediawiki-specific sequences to the command help dialog

The extension registers a lot of sequences that don't apply to core
VisualEditor. Pretty much the opposite of the trigger situation, where
almost all are in core. So, merge them into the help dialog.

Update VE core submodule to master (be148ae)
New changes:
7380244 [BREAKING CHANGE] Include sequences in the command help dialog

Bug: T116013
Change-Id: I5ad2939c10140b954fb29e1e50414ab7d79aeab7
---
M extension.json
M lib/ve
M modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js
3 files changed, 30 insertions(+), 22 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extension.json b/extension.json
index 2dca8ac..511a71b 100644
--- a/extension.json
+++ b/extension.json
@@ -888,6 +888,7 @@
                                "visualeditor-shortcuts-formatting",
                                "visualeditor-shortcuts-history",
                                "visualeditor-shortcuts-other",
+                               "visualeditor-shortcuts-sequence-notice",
                                "visualeditor-shortcuts-text-style",
                                "visualeditor-slug-insert",
                                "visualeditor-specialcharacter-button-tooltip",
diff --git a/lib/ve b/lib/ve
index ec09198..be148ae 160000
--- a/lib/ve
+++ b/lib/ve
-Subproject commit ec09198bfa210d316dddbc2b1206d0596160e52b
+Subproject commit be148aeee342fa32f77852f290ecc98899a75d31
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js
index 6c26e44..18938f4 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWCommandHelpDialog.js
@@ -23,28 +23,35 @@
 
 OO.inheritClass( ve.ui.MWCommandHelpDialog, ve.ui.CommandHelpDialog );
 
-/* Static methods */
-
-/**
- * @inheritdoc
- */
-ve.ui.MWCommandHelpDialog.static.getCommandGroups = function () {
-       var commandGroups = 
ve.ui.MWCommandHelpDialog.super.static.getCommandGroups.call( this ),
-               accessKeyPrefix = 
mw.util.tooltipAccessKeyPrefix.toUpperCase().replace( /-/g, ' + ' ),
-               save = ve.msg( 'accesskey-save' );
-
-       if ( save !== '-' && save !== '' ) {
-               commandGroups.other.commands.push(
-                       {
-                               shortcuts: [ accessKeyPrefix + 
save.toUpperCase() ],
-                               msg: 'visualeditor-savedialog-label-save'
-                       }
-               );
-       }
-
-       return commandGroups;
-};
-
 /* Registration */
 
 ve.ui.windowFactory.register( ve.ui.MWCommandHelpDialog );
+
+( function () {
+       var accessKeyPrefix = 
mw.util.tooltipAccessKeyPrefix.toUpperCase().replace( /-/g, ' + ' ),
+               save = ve.msg( 'accesskey-save' );
+
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'textStyle', 'link', 
{ sequence: [ 'wikitextLink' ] } );
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'formatting', 
'blockquote', { sequence: [ 'wikitextDescription' ] } );
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'formatting', 
'listNumber', { sequence: [ 'numberHash' ] } );
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'formatting', 
'heading2', {
+               sequence: [ 'wikitextHeading' ],
+               msg: 'visualeditor-formatdropdown-format-heading2'
+       } );
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 'template', {
+               sequence: [ 'wikitextTemplate' ],
+               msg: 'visualeditor-dialog-transclusion-add-template'
+       } );
+       ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 'ref', {
+               sequence: [ 'wikitextRef' ],
+               msg: 'visualeditor-dialog-reference-title'
+       } );
+
+       if ( save !== '-' && save !== '' ) {
+               ve.ui.MWCommandHelpDialog.static.registerCommand( 'other', 
'save', {
+                       shortcuts: [ accessKeyPrefix + save.toUpperCase() ],
+                       msg: 'visualeditor-savedialog-label-save',
+                       demote: true
+               } );
+       }
+} )();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad2939c10140b954fb29e1e50414ab7d79aeab7
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: DLynch <[email protected]>
Gerrit-Reviewer: Divec <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to