diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php index d89b6efb3e..5712cb1341 100644 --- a/VisualEditor.i18n.php +++ b/VisualEditor.i18n.php @@ -51,6 +51,8 @@ $messages['en'] = array( 'visualeditor-savedialog-label-restore' => 'Restore page', 'visualeditor-editnotices-tool' => '$1 {{PLURAL:$1|notice|notices}}', 'visualeditor-feedback-tool' => 'Leave feedback', + 'visualeditor-beta-label' => 'beta', + 'visualeditor-beta-warning' => 'VisualEditor is in \'beta\' and so may not let you edit everything yet.', 'visualeditor-meta-tool' => 'Page settings', 'visualeditor-window-title' => 'Inspect', 'visualeditor-linkinspector-title' => 'Hyperlink', @@ -107,7 +109,6 @@ $messages['en'] = array( 'visualeditor-problem' => 'Describe what went wrong with the wikitext serialization', 'visualeditor-aliennode-tooltip' => 'Sorry, this element cannot be edited using the VisualEditor', 'visualeditor-descriptionpagelink' => 'Project:VisualEditor', - 'visualeditor-alphawarning' => 'You are using an alpha version of the [[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]. It may be slow and make erroneous changes—please check each edit that you make.', 'visualeditor-browserwarning' => 'You are using a browser which is not officially supported by VisualEditor.', 'visualeditor-report-notice' => 'I understand that by clicking "Report problem" I will transmit my changes and my feedback, which will be stored for analysis. I agree to provide feedback in accordance with the [[{{MediaWiki:Visualeditor-report-link}}|Terms of Use]].', 'visualeditor-report-link' => 'foundation:Terms of Use', @@ -201,6 +202,8 @@ See also: 'visualeditor-savedialog-label-restore' => 'Label text for save button when the user is editing a previous revision', 'visualeditor-editnotices-tool' => 'Text of tool in the toolbar that shows edit notices (such as [[MediaWiki:editnotice-0]] and [[MediaWiki:editnotice-8/en]]) as a pop-up', 'visualeditor-feedback-tool' => 'Text of tool in the toolbar that lets users provide feedback', + 'visualeditor-beta-label' => 'Text of tool in the toolbar that highlights that VisualEditor is still in beta', + 'visualeditor-beta-warning' => 'Note shown when user clicks on \'beta\' label in VisualEditor, warning users that the software may have issues', 'visualeditor-meta-tool' => 'Text of tool in the toolbar the lets users set categories, language links and other page settings. {{Identical|Page settings}}', 'visualeditor-window-title' => 'Title of an unnamed inspector', @@ -275,7 +278,6 @@ Parameters: 'visualeditor-aliennode-tooltip' => 'Tooltip for items that the VisualEditor cannot edit', 'visualeditor-descriptionpagelink' => 'Name of a page describing the use of the VisualEditor in this project. {{doc-important|Do not translate "Project"; it is automatically converted to the wiki\'s project namespace.}}', - 'visualeditor-alphawarning' => 'Edit notice shown when the VisualEditor loads, warning users that the software may have issues', 'visualeditor-browserwarning' => 'Edit notice shown when the VisualEditor loads, warning users that their browser is not officially supported', 'visualeditor-report-notice' => 'Notice to user that their data will be sent for analysis. Link is in {{msg-mw|Visualeditor-report-link}}. diff --git a/VisualEditor.php b/VisualEditor.php index 58262ba592..b717e31988 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -60,8 +60,6 @@ $wgVisualEditorResourceTemplate = array( 'group' => 'ext.visualEditor', ); -$wgVisualEditorEditNotices = array( 'visualeditor-alphawarning' ); - $wgVisualEditorEnableSectionEditLinks = false; $wgResourceModules += array( @@ -167,6 +165,8 @@ $wgResourceModules += array( 'visualeditor-problem', 'visualeditor-editnotices-tool', 'visualeditor-feedback-tool', + 'visualeditor-beta-label', + 'visualeditor-beta-warning', 'visualeditor-meta-tool', 'visualeditor-restore-page', 'visualeditor-create-page', diff --git a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css index f48ee4fc7f..f821833f36 100644 --- a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css +++ b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css @@ -34,6 +34,24 @@ margin-top: 0.2em; } +/* Beta notices */ + +.ve-init-mw-viewPageTarget-toolbar-betaNotice { + display: none; + position: absolute; + right: -0.5em; + top: 30px; + width: 11em; + font-family: sans-serif; + border: solid 1px #ccc; + padding: 0.5em 1.25em 0 1.25em; + border-radius: 0.25em; + background-color: #fff; + box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2); + z-index: 3; + line-height: 1.5em; +} + /* Edit notices */ .ve-init-mw-viewPageTarget-toolbar-editNotices { @@ -44,7 +62,7 @@ width: 29em; font-family: sans-serif; border: solid 1px #ccc; - padding: 0 0.75em 0 0.75em; + padding: 0 1.75em 0 0.75em; border-radius: 0.25em; background-color: #fff; box-shadow: 0 0.15em 0.5em 0 rgba(0, 0, 0, 0.2); @@ -76,6 +94,12 @@ color: #555555; } +.ve-init-mw-viewPageTarget-tool-beta-label { + color: #aaaaaa; + font-size: 120%; + font-variant: small-caps; +} + .ve-init-mw-viewPageTarget-tool:hover .ve-init-mw-viewPageTarget-tool-label { text-decoration: underline; } diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 432ba08e06..9aa7cdb8c6 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -39,17 +39,24 @@ ve.init.mw.ViewPageTarget = function VeInitMwViewPageTarget() { this.saveDialogSaveButton = null; this.saveDialogReviewGoodButton = null; - this.$toolbarEditNotices = $( '