Jhernandez has uploaded a new change for review.

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

Change subject: Search field with placeholder text when editing collection
......................................................................

Search field with placeholder text when editing collection

Bug: T97267
Change-Id: I6a1bdb2eef24506ad5b4372f5eed528a8d6ef060
---
M i18n/en.json
M i18n/qqq.json
M resources/Resources.php
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
M resources/ext.gather.collection.editor/header.hogan
M resources/ext.gather.page.search/CollectionSearchPanel.hogan
M resources/ext.gather.page.search/CollectionSearchPanel.js
7 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/35/208935/1

diff --git a/i18n/en.json b/i18n/en.json
index 4431aae..ab76e1e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -106,6 +106,7 @@
        "gather-delete-button": "Delete",
        "gather-overlay-edit-button": "Edit title and description",
        "gather-overlay-continue": "Next",
+       "gather-overlay-search-empty": "Search for an article to add to this 
collection",
        "right-gather-hidelist": "Force a public user list to become hidden",
        "apihelp-gather-description": "List and edit Gather collections.",
        "apihelp-gather-param-gather": "Action to perform on collections.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7055018..05450fb 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -109,6 +109,7 @@
        "gather-delete-button": "Label for a button that enables deleting a 
collection.\n{{Identical|Delete}}",
        "gather-overlay-edit-button": "Label for button that enables editing of 
description and name of a collection.",
        "gather-overlay-continue": "Label for button inside overlay to take you 
to another screen.",
+       "gather-overlay-search-empty": "Message shown on a search input when 
empty, for searching and adding/removing items from a collection",
        "right-gather-hidelist": "With gather, users can create lists and make 
them public. This right gives admins a way to hide or restore a list that 
violates WP policy.\n\n{{Doc-right|gather-hidelist}}",
        "apihelp-gather-description": "{{doc-apihelp-description|gather}}",
        "apihelp-gather-param-gather": "{{doc-apihelp-param|gather|gather}}",
diff --git a/resources/Resources.php b/resources/Resources.php
index 19d1d14..085ae0b 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -277,6 +277,7 @@
                        'gather-edit-collection-clear-label',
                        'gather-update-collection-success',
                        'gather-edit-collection-confirm',
+                       'gather-overlay-search-empty',
                ),
                'templates' => array(
                        'header.hogan' => 
'ext.gather.collection.editor/header.hogan',
@@ -300,6 +301,7 @@
                        // FIXME: Duplicates messages in ext.gather.watchstar
                        'gather-remove-toast',
                        'gather-add-toast',
+                       'gather-overlay-search-empty',
                ),
                'templates' => array(
                        'CollectionSearchPanel.hogan' => 
'ext.gather.page.search/CollectionSearchPanel.hogan',
diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 8970c8b..a420196 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -53,7 +53,8 @@
                        headerButtonsListClassName: 'overlay-action',
                        editMsg: mw.msg( 'gather-overlay-edit-button' ),
                        deleteMsg: mw.msg( 'gather-delete-button' ),
-                       saveMsg: mw.msg( 'gather-edit-collection-save-label' )
+                       saveMsg: mw.msg( 'gather-edit-collection-save-label' ),
+                       emptyInputMsg: mw.msg( 'gather-overlay-search-empty' )
                } ),
                /** @inheritdoc */
                events: $.extend( {}, Overlay.prototype.events, {
diff --git a/resources/ext.gather.collection.editor/header.hogan 
b/resources/ext.gather.collection.editor/header.hogan
index ff41fe3..7afdb1d 100644
--- a/resources/ext.gather.collection.editor/header.hogan
+++ b/resources/ext.gather.collection.editor/header.hogan
@@ -24,7 +24,7 @@
        </ul>
        <div class="overlay-title">
                <div class="search">
-                       <input class="search" type="text">
+                       <input class="search" type="text" 
placeholder="{{emptyInputMsg}}">
                        {{#clearIcon}}{{>icon}}{{/clearIcon}}
                </div>
        </div>
diff --git a/resources/ext.gather.page.search/CollectionSearchPanel.hogan 
b/resources/ext.gather.page.search/CollectionSearchPanel.hogan
index f43b407..19869ee 100644
--- a/resources/ext.gather.page.search/CollectionSearchPanel.hogan
+++ b/resources/ext.gather.page.search/CollectionSearchPanel.hogan
@@ -1,4 +1,4 @@
 <div class="search">
-       {{{searchIcon}}}<input type="text">
+       {{{searchIcon}}}<input type="text" placeholder="{{emptyInputMsg}}">
 </div>
 <div class="results"></div>
diff --git a/resources/ext.gather.page.search/CollectionSearchPanel.js 
b/resources/ext.gather.page.search/CollectionSearchPanel.js
index d0ec192..b924934 100644
--- a/resources/ext.gather.page.search/CollectionSearchPanel.js
+++ b/resources/ext.gather.page.search/CollectionSearchPanel.js
@@ -34,7 +34,8 @@
                                // FIXME:
                                label: mw.msg( 'search' ),
                                additionalClassNames: 'indicator'
-                       } ).toHtmlString()
+                       } ).toHtmlString(),
+                       emptyInputMsg: mw.msg( 'gather-overlay-search-empty' )
                },
                /** @inheritdoc */
                initialize: function ( options ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a1bdb2eef24506ad5b4372f5eed528a8d6ef060
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez <jhernan...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to