Jforrester has uploaded a new change for review.
https://gerrit.wikimedia.org/r/99720
Change subject: [WIP] Initial re-styling of the toolbar
......................................................................
[WIP] Initial re-styling of the toolbar
Move all text styles into a new 'list' toolbar group, and re-label the "More"
catch-all to now be "Insert", which is what it's left as. Less-used text styles
(strikethrough, code and underline) are demoted, and bold and italic promoted.
This is WIP awaiting an actual icon for the general concept of text styling,
curtosey of Ed. :-) – we'll probably want to composite the raw icon with the
down-fletch ('down') icon to show clearly that it's a menu.
TODO later (all would need OOjs UI's Toolbar class to be extended):
* Be able to magically composite a down-fletch icon for the menu if you ask
as well as the 'icon' parameter
* Be able to nest groups together, so that e.g. the style group and link and
clear buttons appear in a single group, even though they're distinct. Note
that this is an extant issue with the help/notices and menu groups on the
toolbar-action side.
* It might be nice if the toolbar group showed as active if any of group's
members are active.
Change-Id: I66a1bba347ea64e540106b1090995b3117a8b1b2
---
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve/init/ve.init.Target.js
3 files changed, 22 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/20/99720/1
diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 605fe30..fedc76b 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -268,6 +268,7 @@
'visualeditor-saveerror' => 'Error saving data to server: $1.',
'visualeditor-serializeerror' => 'Error loading data from server: $1.',
'visualeditor-toolbar-cancel' => 'Cancel',
+ 'visualeditor-toolbar-insert' => 'Insert',
'visualeditor-toolbar-savedialog' => 'Save page',
'visualeditor-usernamespacepagelink' => 'Project:User namespace',
'visualeditor-version-label' => 'Version',
@@ -759,6 +760,7 @@
* $1 is an error message, in English.',
'visualeditor-toolbar-cancel' => 'Label text for button to exit from
VisualEditor.
{{Identical|Cancel}}',
+ 'visualeditor-toolbar-insert' => 'Label text for insert menu in
toolbar.',
'visualeditor-toolbar-savedialog' => 'Label text for button to open
save dialog.
Used in:
diff --git a/VisualEditor.php b/VisualEditor.php
index c26ad52..2475ae4 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -674,6 +674,7 @@
'visualeditor-specialcharacterinspector-title',
'visualeditor-specialcharinspector-characterlist-insert',
'visualeditor-toolbar-cancel',
+ 'visualeditor-toolbar-insert',
'visualeditor-toolbar-savedialog',
'visualeditor-version-label',
'visualeditor-viewpage-savewarning',
diff --git a/modules/ve/init/ve.init.Target.js
b/modules/ve/init/ve.init.Target.js
index 73c5cb7..4068d44 100644
--- a/modules/ve/init/ve.init.Target.js
+++ b/modules/ve/init/ve.init.Target.js
@@ -30,16 +30,33 @@
/* Static Properties */
ve.init.Target.static.toolbarGroups = [
+ // History
{ 'include': [ 'undo', 'redo' ] },
+ // Format
{
'type': 'menu',
'include': [ { 'group': 'format' } ],
'promote': [ 'paragraph' ],
'demote': [ 'preformatted', 'heading1' ]
},
- { 'include': [ 'bold', 'italic', 'link', 'clear' ] },
+ // Style
+ {
+ 'type': 'list',
+ 'icon': 'down',
+ 'include': [ { 'group': 'textStyle' } ],
+ 'promote': [ 'bold', 'italic' ],
+ 'demote': [ 'strikethrough', 'code', 'underline' ]
+ },
+ // Link
+ { 'include': [ 'link', 'clear' ] },
+ // Structure
{ 'include': [ 'number', 'bullet', 'outdent', 'indent' ] },
- { 'include': '*', 'demote': [ 'specialcharacter' ] }
+ // Insert
+ {
+ 'include': '*',
+ 'label': 'visualeditor-toolbar-insert',
+ 'demote': [ 'specialcharacter' ]
+ }
];
--
To view, visit https://gerrit.wikimedia.org/r/99720
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66a1bba347ea64e540106b1090995b3117a8b1b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits