JGonera has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73556


Change subject: Story 931: Editing guider text
......................................................................

Story 931: Editing guider text

Also, scope p inside .content in mf-typography.less to avoid unnecessary
rules for p in other places.

Change-Id: I3622840e3ce8be34bf14469084a271204fdffd43
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editor/editor.js
M less/common/mf-typography.less
M less/common/overlays.less
M less/modules/editor.less
M stylesheets/common/mf-typography.css
M stylesheets/common/overlays.css
M stylesheets/modules/editor.css
M templates/overlays/editor.html
11 files changed, 30 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/56/73556/1

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index e1ddfda..519dfe6 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -253,6 +253,7 @@
        'mobile-frontend-editor-summary-placeholder' => 'Tell us what you 
changed (optional)',
        'mobile-frontend-editor-cancel-confirm' => 'Do you really want to 
abandon your edit?',
        'mobile-frontend-editor-wait' => 'Saving edit, please wait.',
+       'mobile-frontend-editor-guider' => '"Continue" will allow you to 
preview and save.',
        'mobile-frontend-editor-success' => 'Success! Your edit was saved.',
        'mobile-frontend-editor-success-landmark-1' => 'Congratulations, you 
are now a {{SITENAME}} editor!',
        'mobile-frontend-editor-error' => 'Error, edit not saved.',
@@ -682,6 +683,7 @@
        'mobile-frontend-editor-summary-placeholder' => 'A placeholder for the 
summary input field asking user what they changed (the field is optional).',
        'mobile-frontend-editor-cancel-confirm' => 'Question asking user if 
they are positive about abandoning unsaved edit.',
        'mobile-frontend-editor-wait' => 'Text that displays while a page edit 
is being saved.',
+       'mobile-frontend-editor-guider' => 'Text that explains to editors with 
no edits that taping "Continue" will allow them to see a preview and save.',
        'mobile-frontend-editor-success' => 'Text that displays when a page 
edit has been successfully saved.
 
 Used as "toast" message.',
diff --git a/includes/Resources.php b/includes/Resources.php
index bb325a7..9043512 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -221,6 +221,7 @@
                        'mobile-frontend-editor-summary-placeholder',
                        'mobile-frontend-editor-cancel-confirm',
                        'mobile-frontend-editor-wait',
+                       'mobile-frontend-editor-guider',
                        'mobile-frontend-editor-success',
                        'mobile-frontend-editor-success-landmark-1' => array( 
'parse' ),
                        'mobile-frontend-editor-refresh',
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 16b5d48..c438619 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -18,7 +18,8 @@
                        summaryMsg: mw.msg( 
'mobile-frontend-editor-summary-placeholder' ),
                        licenseMsg: mw.msg( 'mobile-frontend-editor-license' ),
                        previewMsg: mw.msg( 
'mobile-frontend-editor-preview-header' ),
-                       waitMsg: mw.msg( 'mobile-frontend-editor-wait' )
+                       waitMsg: mw.msg( 'mobile-frontend-editor-wait' ),
+                       guiderMsg: mw.msg( 'mobile-frontend-editor-guider' )
                },
                template: M.template.get( 'overlays/editor' ),
                className: 'mw-mf-overlay editor-overlay',
@@ -48,6 +49,7 @@
                                isNew: options.isNew
                        } );
                        this.sectionId = options.sectionId;
+                       this.isNewEditor = options.isNewEditor;
                        this._super( options );
                },
 
@@ -200,7 +202,7 @@
                                        new Page( { title: title, el: $( 
'#content_wrapper' ) } );
                                        M.router.navigate( '' );
                                        self.hide();
-                                       if ( mw.config.get( 'wgUserEditCount' ) 
=== '0' ) {
+                                       if ( self.isNewEditor ) {
                                                msg = 
'mobile-frontend-editor-success-landmark-1';
                                        } else {
                                                className = 'toast';
diff --git a/javascripts/modules/editor/editor.js 
b/javascripts/modules/editor/editor.js
index 2fad685..9c5ab40 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -29,6 +29,7 @@
                        new EditorOverlay( {
                                title: ns ? ns + ':' + title : title,
                                isNew: isNew,
+                               isNewEditor: mw.config.get( 'wgUserEditCount' ) 
=== '0',
                                sectionId: mw.config.get( 'wgPageContentModel' 
) === 'wikitext' ? sectionId : null
                        } ).show();
                } );
diff --git a/less/common/mf-typography.less b/less/common/mf-typography.less
index 7ce6dd3..b8c7a07 100644
--- a/less/common/mf-typography.less
+++ b/less/common/mf-typography.less
@@ -26,10 +26,10 @@
                font-family: @fontFamilyHeading;
                margin: @headingMarginTop 0 9pt;
        }
-}
 
-p {
-       margin-bottom: 8pt;
+       p {
+               margin-bottom: 8pt;
+       }
 }
 
 ol,
diff --git a/less/common/overlays.less b/less/common/overlays.less
index d4746dd..a762586 100644
--- a/less/common/overlays.less
+++ b/less/common/overlays.less
@@ -94,13 +94,14 @@
                background-color: #f3f3f3;
                text-align: center;
                padding: 0 1em;
+               color: #707070;
 
                button {
                        margin: .7em .3em;
                }
 
                p {
-                       margin: .7em 0;
+                       padding: .7em 0;
                        line-height: 1.3;
                        font-size: .9em;
                        text-align: left;
@@ -112,7 +113,6 @@
                        background-size: auto 16px;
                        padding: 0 0 0 55px;
                        margin-bottom: 1.2em;
-                       color: #707070;
                        font-size: .75em !important;
                        // if license is only one line (big screens) prevent 
cutting off the image
                        min-height: 18px;
diff --git a/less/modules/editor.less b/less/modules/editor.less
index 0b9c977..5e1ac38 100644
--- a/less/modules/editor.less
+++ b/less/modules/editor.less
@@ -63,6 +63,12 @@
                box-shadow: 0 -10px 10px 0 #fff;
        }
 
+       .initial-bar p {
+               display: inline-block;
+               text-align: center;
+               border-bottom: 1px solid #ccc;
+       }
+
        .save-bar, .saving-bar {
                display: none;
        }
diff --git a/stylesheets/common/mf-typography.css 
b/stylesheets/common/mf-typography.css
index 37f211e..21cd1fb 100644
--- a/stylesheets/common/mf-typography.css
+++ b/stylesheets/common/mf-typography.css
@@ -32,7 +32,7 @@
   font-family: Georgia, serif;
   margin: 14pt 0 9pt;
 }
-p {
+.content p {
   margin-bottom: 8pt;
 }
 ol ol,
diff --git a/stylesheets/common/overlays.css b/stylesheets/common/overlays.css
index 2661f97..23772bf 100644
--- a/stylesheets/common/overlays.css
+++ b/stylesheets/common/overlays.css
@@ -81,12 +81,13 @@
   background-color: #f3f3f3;
   text-align: center;
   padding: 0 1em;
+  color: #707070;
 }
 .mw-mf-overlay .buttonBar button {
   margin: .7em .3em;
 }
 .mw-mf-overlay .buttonBar p {
-  margin: .7em 0;
+  padding: .7em 0;
   line-height: 1.3;
   font-size: .9em;
   text-align: left;
@@ -96,7 +97,6 @@
   background-size: auto 16px;
   padding: 0 0 0 55px;
   margin-bottom: 1.2em;
-  color: #707070;
   font-size: .75em !important;
   min-height: 18px;
 }
diff --git a/stylesheets/modules/editor.css b/stylesheets/modules/editor.css
index 14e54d7..700f969 100644
--- a/stylesheets/modules/editor.css
+++ b/stylesheets/modules/editor.css
@@ -63,6 +63,11 @@
 .editor-overlay .buttonBar {
   box-shadow: 0 -10px 10px 0 #ffffff;
 }
+.editor-overlay .initial-bar p {
+  display: inline-block;
+  text-align: center;
+  border-bottom: 1px solid #ccc;
+}
 .editor-overlay .save-bar,
 .editor-overlay .saving-bar {
   display: none;
diff --git a/templates/overlays/editor.html b/templates/overlays/editor.html
index 6fbb83f..9567ac7 100644
--- a/templates/overlays/editor.html
+++ b/templates/overlays/editor.html
@@ -8,6 +8,9 @@
        <div class="content"></div>
 </div>
 <div class="position-fixed buttonBar initial-bar">
+       {{#isNewEditor}}
+       <p>{{guiderMsg}}</p>
+       {{/isNewEditor}}
        <button class="cancel inline">{{cancelMsg}}</button>
        <button class="continue" disabled>{{continueMsg}}</button>
 </div>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3622840e3ce8be34bf14469084a271204fdffd43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera <[email protected]>

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

Reply via email to