jenkins-bot has submitted this change and it was merged.
Change subject: Show special edit messages on significant landmark events.
......................................................................
Show special edit messages on significant landmark events.
Change-Id: I61b7a23c2292d2e99e22de92235b5e2a3198e826
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/editor/EditorOverlay.js
M less/common/notifications.less
M stylesheets/common/notifications.css
5 files changed, 18 insertions(+), 2 deletions(-)
Approvals:
JGonera: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 1c4db26..d0ecaad 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -254,6 +254,7 @@
'mobile-frontend-editor-cancel-confirm' => 'Do you really want to
abandon your edit?',
'mobile-frontend-editor-wait' => 'Saving edit, please wait.',
'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.',
'mobile-frontend-editor-error-conflict' => 'Error, another user has
edited this page.',
'mobile-frontend-editor-error-loading' => 'Error, can\'t load section.',
@@ -684,6 +685,7 @@
'mobile-frontend-editor-success' => 'Text that displays when a page
edit has been successfully saved.
Used as "toast" message.',
+ 'mobile-frontend-editor-success-landmark-1' => 'Special save
confirmation message shown to users on their 1st edit.',
'mobile-frontend-editor-error' => 'Text that displays when there have
been errors when saving a page edit.
Used as "toast" error message.',
diff --git a/includes/Resources.php b/includes/Resources.php
index 69cbe47..1245c64 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -222,6 +222,7 @@
'mobile-frontend-editor-cancel-confirm',
'mobile-frontend-editor-wait',
'mobile-frontend-editor-success',
+ 'mobile-frontend-editor-success-landmark-1' => array(
'parse' ),
'mobile-frontend-editor-refresh',
'mobile-frontend-editor-error',
'mobile-frontend-editor-error-conflict',
diff --git a/javascripts/modules/editor/EditorOverlay.js
b/javascripts/modules/editor/EditorOverlay.js
index 91fc0c0..56ad1c7 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -185,7 +185,7 @@
},
_save: function() {
- var self = this;
+ var self = this, msg, className = 'toast landmark';
self.log( 'submit' );
this.$( '.save-bar' ).hide();
@@ -200,7 +200,13 @@
new Page( { title: title, el: $(
'#content_wrapper' ) } );
M.router.navigate( '' );
self.hide();
- popup.show( mw.msg(
'mobile-frontend-editor-success' ), 'toast' );
+ if ( mw.config.get( 'wgUserEditCount' )
=== '0' ) {
+ msg =
'mobile-frontend-editor-success-landmark-1';
+ } else {
+ className = 'toast';
+ msg =
'mobile-frontend-editor-success';
+ }
+ popup.show( mw.msg( msg ), className );
} ).
fail( function( err ) {
var msg;
diff --git a/less/common/notifications.less b/less/common/notifications.less
index d3600e0..66ce02c 100644
--- a/less/common/notifications.less
+++ b/less/common/notifications.less
@@ -93,6 +93,10 @@
border: none; // FIXME: this is needed because a global
.error adds border
}
+ &.landmark {
+ color: #F7F737;
+ }
+
&.locked button {
display: block;
top: 0.8em;
diff --git a/stylesheets/common/notifications.css
b/stylesheets/common/notifications.css
index aa4c862..674bb14 100644
--- a/stylesheets/common/notifications.css
+++ b/stylesheets/common/notifications.css
@@ -94,6 +94,9 @@
width: 75%;
border: none;
}
+#mf-notification.toast.landmark {
+ color: #F7F737;
+}
#mf-notification.toast.locked button {
display: block;
top: 0.8em;
--
To view, visit https://gerrit.wikimedia.org/r/73330
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I61b7a23c2292d2e99e22de92235b5e2a3198e826
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits