mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
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
This commit is contained in:
parent
a06a81370c
commit
eafe5d844c
|
@ -30,12 +30,12 @@ $messages['en'] = array(
|
|||
'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 @@ $messages['en'] = array(
|
|||
'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 @@ $messages['en'] = array(
|
|||
'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 @@ $messages['en'] = array(
|
|||
'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 @@ Parameters:
|
|||
'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',
|
||||
|
|
|
@ -568,12 +568,12 @@ $wgResourceModules += array(
|
|||
'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',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -26,16 +26,25 @@ ve.inheritClass( ve.ui.MWFormatDropdownTool, ve.ui.FormatDropdownTool );
|
|||
|
||||
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 );
|
||||
|
|
Loading…
Reference in a new issue