jenkins-bot has submitted this change and it was merged.
Change subject: Discourage (ab)use of H1s, and relabel them
......................................................................
Discourage (ab)use of H1s, and relabel them
Re-label the headings in the MWFormatDropdownTool with MW-specific
headings per bug 43334, reduce the size of the dropdown's contents a
little to make the headings less vibrant, and move the H1 option to the
end of the list to further discourage its use.
Note that there are some issues with the underlying structure here and our
ability to split the repos into VE-core and VE-MW will need this to be
refactored.
Bug: 43334
Change-Id: I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9
---
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve/ui/styles/ve.ui.Tool.css
M modules/ve/ui/tools/dropdowns/ve.ui.MWFormatDropdownTool.js
4 files changed, 44 insertions(+), 20 deletions(-)
Approvals:
Trevor Parscal: Looks good to me, approved
jenkins-bot: Verified
diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 5450a98..dc87681 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -30,12 +30,12 @@
'visualeditor-dialog-action-apply' => 'Apply changes',
'visualeditor-dialog-action-cancel' => 'Cancel',
'visualeditor-dialog-action-close' => 'Close',
+ 'visualeditor-dialog-media-content-section' => 'Caption content',
'visualeditor-dialog-media-insert-button' => 'Insert media',
'visualeditor-dialog-media-insert-title' => 'Insert media',
'visualeditor-dialog-media-title' => 'Media settings',
- 'visualeditor-dialog-media-content-section' => 'Caption content',
- 'visualeditor-dialog-meta-categories-data-label' => 'Categories',
'visualeditor-dialog-meta-categories-category' => 'Category',
+ 'visualeditor-dialog-meta-categories-data-label' => 'Categories',
'visualeditor-dialog-meta-categories-defaultsort-label' => 'Sort this
page by default as',
'visualeditor-dialog-meta-categories-input-matchingcategorieslabel' =>
'Matching categories',
'visualeditor-dialog-meta-categories-input-movecategorylabel' => 'Move
this category here',
@@ -51,15 +51,14 @@
'visualeditor-dialog-meta-languages-section' => 'Languages',
'visualeditor-dialog-meta-title' => 'Page settings',
'visualeditor-dialog-reference-content-section' => 'Reference content',
- 'visualeditor-dialog-reference-options-section' => 'Options',
- 'visualeditor-dialog-reference-options-name-label' => 'Re-use by this
name',
'visualeditor-dialog-reference-options-group-label' => 'Use this group',
+ 'visualeditor-dialog-reference-options-name-label' => 'Re-use by this
name',
+ 'visualeditor-dialog-reference-options-section' => 'Options',
'visualeditor-dialog-reference-title' => 'Reference',
'visualeditor-dialog-referencelist-title' => 'References list',
- 'visualeditor-dialog-media-title' => 'Media settings',
+ 'visualeditor-dialog-transclusion-add-content' => 'Add content',
'visualeditor-dialog-transclusion-add-param' => 'Add parameter',
'visualeditor-dialog-transclusion-add-template' => 'Add template',
- 'visualeditor-dialog-transclusion-add-content' => 'Add content',
'visualeditor-dialog-transclusion-content' => 'Content',
'visualeditor-dialog-transclusion-options' => 'Options',
'visualeditor-dialog-transclusion-param-name' => 'Parameter name',
@@ -86,6 +85,12 @@
'visualeditor-formatdropdown-format-heading4' => 'Heading 4',
'visualeditor-formatdropdown-format-heading5' => 'Heading 5',
'visualeditor-formatdropdown-format-heading6' => 'Heading 6',
+ 'visualeditor-formatdropdown-format-mw-heading1' => 'Page title',
+ 'visualeditor-formatdropdown-format-mw-heading2' => 'Heading',
+ 'visualeditor-formatdropdown-format-mw-heading3' => 'Sub-heading 1',
+ 'visualeditor-formatdropdown-format-mw-heading4' => 'Sub-heading 2',
+ 'visualeditor-formatdropdown-format-mw-heading5' => 'Sub-heading 3',
+ 'visualeditor-formatdropdown-format-mw-heading6' => 'Sub-heading 4',
'visualeditor-formatdropdown-format-paragraph' => 'Paragraph',
'visualeditor-formatdropdown-format-preformatted' => 'Preformatted',
'visualeditor-formatdropdown-title' => 'Change format',
@@ -109,8 +114,8 @@
'visualeditor-notification-created' => '$1 has been created.',
'visualeditor-notification-restored' => '$1 has been restored.',
'visualeditor-notification-saved' => 'Your changes to $1 have been
saved.',
- 'visualeditor-outline-control-move-up' => 'Move item up',
'visualeditor-outline-control-move-down' => 'Move item down',
+ 'visualeditor-outline-control-move-up' => 'Move item up',
'visualeditor-preference-enable' => 'Enable VisualEditor (only in the
[[{{MediaWiki:Visualeditor-mainnamespacepagelink}}|main]] and
[[{{MediaWiki:Visualeditor-usernamespacepagelink}}|user]] namespaces)',
'visualeditor-preference-nosectionedit' => 'Use the wikitext editor for
editing sections while VisualEditor is in beta',
'visualeditor-referencelist-isempty' => 'There are no references with
the group "$1" on this page.',
@@ -268,12 +273,18 @@
'visualeditor-editsummary' => 'Label for the edit summary box',
'visualeditor-feedback-link' => 'Link to a page where users can leave
feedback that is automatically posted using this tool. This should be a
sub-page of {{msg-mw|visualeditor-descriptionpagelink}}',
'visualeditor-feedback-tool' => 'Text of tool in the toolbar that lets
users provide feedback',
- 'visualeditor-formatdropdown-format-heading1' => 'Item in the
formatting dropdown for a level 1 heading',
- 'visualeditor-formatdropdown-format-heading2' => 'Item in the
formatting dropdown for a level 2 heading',
- 'visualeditor-formatdropdown-format-heading3' => 'Item in the
formatting dropdown for a level 3 heading',
- 'visualeditor-formatdropdown-format-heading4' => 'Item in the
formatting dropdown for a level 4 heading',
- 'visualeditor-formatdropdown-format-heading5' => 'Item in the
formatting dropdown for a level 5 heading',
- 'visualeditor-formatdropdown-format-heading6' => 'Item in the
formatting dropdown for a level 6 heading',
+ 'visualeditor-formatdropdown-format-heading1' => 'Item in the generic
formatting dropdown for a level 1 heading',
+ 'visualeditor-formatdropdown-format-heading2' => 'Item in the generic
formatting dropdown for a level 2 heading',
+ 'visualeditor-formatdropdown-format-heading3' => 'Item in the generic
formatting dropdown for a level 3 heading',
+ 'visualeditor-formatdropdown-format-heading4' => 'Item in the generic
formatting dropdown for a level 4 heading',
+ 'visualeditor-formatdropdown-format-heading5' => 'Item in the generic
formatting dropdown for a level 5 heading',
+ 'visualeditor-formatdropdown-format-heading6' => 'Item in the generic
formatting dropdown for a level 6 heading',
+ 'visualeditor-formatdropdown-format-mw-heading1' => 'Item in the
MediaWiki formatting dropdown for a level 1 heading (page title)',
+ 'visualeditor-formatdropdown-format-mw-heading2' => 'Item in the
MediaWiki formatting dropdown for a level 2 heading (section)',
+ 'visualeditor-formatdropdown-format-mw-heading3' => 'Item in the
MediaWiki formatting dropdown for a level 3 heading (sub-section)',
+ 'visualeditor-formatdropdown-format-mw-heading4' => 'Item in the
MediaWiki formatting dropdown for a level 4 heading (sub-section)',
+ 'visualeditor-formatdropdown-format-mw-heading5' => 'Item in the
MediaWiki formatting dropdown for a level 5 heading (sub-section)',
+ 'visualeditor-formatdropdown-format-mw-heading6' => 'Item in the
MediaWiki formatting dropdown for a level 6 heading (sub-section)',
'visualeditor-formatdropdown-format-paragraph' => 'Item in the
formatting dropdown for paragraphs (normal text).
{{Identical|Paragraph}}',
'visualeditor-formatdropdown-format-preformatted' => 'Item in the
formatting dropdown for preformatted text',
diff --git a/VisualEditor.php b/VisualEditor.php
index fdad5e5..0c895f2 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -568,12 +568,12 @@
'visualeditor-editsummary',
'visualeditor-feedback-link',
'visualeditor-feedback-tool',
- 'visualeditor-formatdropdown-format-heading1',
- 'visualeditor-formatdropdown-format-heading2',
- 'visualeditor-formatdropdown-format-heading3',
- 'visualeditor-formatdropdown-format-heading4',
- 'visualeditor-formatdropdown-format-heading5',
- 'visualeditor-formatdropdown-format-heading6',
+ 'visualeditor-formatdropdown-format-mw-heading1',
+ 'visualeditor-formatdropdown-format-mw-heading2',
+ 'visualeditor-formatdropdown-format-mw-heading3',
+ 'visualeditor-formatdropdown-format-mw-heading4',
+ 'visualeditor-formatdropdown-format-mw-heading5',
+ 'visualeditor-formatdropdown-format-mw-heading6',
'visualeditor-formatdropdown-format-paragraph',
'visualeditor-formatdropdown-format-preformatted',
'visualeditor-formatdropdown-title',
diff --git a/modules/ve/ui/styles/ve.ui.Tool.css
b/modules/ve/ui/styles/ve.ui.Tool.css
index 63013c8..48b688c 100644
--- a/modules/ve/ui/styles/ve.ui.Tool.css
+++ b/modules/ve/ui/styles/ve.ui.Tool.css
@@ -129,6 +129,10 @@
width: 8em;
}
+.ve-ui-dropdownTool-mwFormat ul {
+ font-size: 80%;
+}
+
.ve-ui-dropdownTool-format .ve-ui-optionWidget[rel="paragraph"]
.ve-ui-labeledElement-label {
font-weight: normal;
}
diff --git a/modules/ve/ui/tools/dropdowns/ve.ui.MWFormatDropdownTool.js
b/modules/ve/ui/tools/dropdowns/ve.ui.MWFormatDropdownTool.js
index e1c3f89..504212e 100644
--- a/modules/ve/ui/tools/dropdowns/ve.ui.MWFormatDropdownTool.js
+++ b/modules/ve/ui/tools/dropdowns/ve.ui.MWFormatDropdownTool.js
@@ -26,16 +26,25 @@
ve.ui.MWFormatDropdownTool.static.name = 'mwFormat';
-ve.ui.MWFormatDropdownTool.static.cssName = 'format';
+ve.ui.MWFormatDropdownTool.static.cssName = 'format
ve-ui-dropdownTool-mwFormat';
ve.ui.MWFormatDropdownTool.static.items[1].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[1].label =
'visualeditor-formatdropdown-format-mw-heading1';
ve.ui.MWFormatDropdownTool.static.items[2].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[2].label =
'visualeditor-formatdropdown-format-mw-heading2';
ve.ui.MWFormatDropdownTool.static.items[3].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[3].label =
'visualeditor-formatdropdown-format-mw-heading3';
ve.ui.MWFormatDropdownTool.static.items[4].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[4].label =
'visualeditor-formatdropdown-format-mw-heading4';
ve.ui.MWFormatDropdownTool.static.items[5].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[5].label =
'visualeditor-formatdropdown-format-mw-heading5';
ve.ui.MWFormatDropdownTool.static.items[6].data.type = 'mwHeading';
+ve.ui.MWFormatDropdownTool.static.items[6].label =
'visualeditor-formatdropdown-format-mw-heading6';
ve.ui.MWFormatDropdownTool.static.items[7].data.type = 'mwPreformatted';
+// Move the H1 (item 1 in the list) to the end (7) so as to make it less
prominent and tempting to users
+ve.ui.MWFormatDropdownTool.static.items.splice( 7, 0,
ve.ui.MWFormatDropdownTool.static.items.splice( 1, 1 )[0] );
+
/* Registration */
ve.ui.toolFactory.register( 'mwFormat', ve.ui.MWFormatDropdownTool );
--
To view, visit https://gerrit.wikimedia.org/r/69801
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits