Bug 1367242 - Part 1: Search bar should not be compact; should have a placeholder. r=dao draft
authorNihanth Subramanya <nhnt11@gmail.com>
Tue, 30 May 2017 01:39:41 +0530
changeset 593306 367ba5ca8f1827fbf05845d65f344d90adc8b657
parent 592979 2a3a253806d129c0bb6f2b76bf75630457a24492
child 593307 ebd736ec7410f7c751eb80f797c832ce030dacc5
push id63651
push usernhnt11@gmail.com
push dateTue, 13 Jun 2017 12:19:42 +0000
reviewersdao
bugs1367242
milestone56.0a1
Bug 1367242 - Part 1: Search bar should not be compact; should have a placeholder. r=dao MozReview-Commit-ID: B6eZsZrzo7W
browser/components/places/content/bookmarksPanel.xul
browser/components/places/content/history-panel.xul
browser/components/places/jar.mn
browser/locales/en-US/chrome/browser/places/places.dtd
--- a/browser/components/places/content/bookmarksPanel.xul
+++ b/browser/components/places/content/bookmarksPanel.xul
@@ -1,9 +1,9 @@
-<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- --> 
+<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
@@ -12,32 +12,31 @@
 <!DOCTYPE page SYSTEM "chrome://browser/locale/places/places.dtd">
 
 <page id="bookmarksPanel"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="init();"
       onunload="SidebarUtils.setMouseoverURL('');">
 
-  <script type="application/javascript" 
+  <script type="application/javascript"
           src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
-  <script type="application/javascript" 
+  <script type="application/javascript"
           src="chrome://browser/content/bookmarks/bookmarksPanel.js"/>
 
   <commandset id="placesCommands"/>
   <commandset id="editMenuCommands"/>
   <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container" align="center">
-    <label id="sidebar-search-label"
-           value="&search.label;" accesskey="&search.accesskey;" control="search-box"/>
-    <textbox id="search-box" flex="1" type="search" class="compact"
+    <textbox id="search-box" flex="1" type="search"
+             placeholder="&search.placeholder;"
              aria-controls="bookmarks-view"
              oncommand="searchBookmarks(this.value);"/>
   </hbox>
 
   <tree id="bookmarks-view" class="sidebar-placesTree" type="places"
         flex="1"
         hidecolumnpicker="true"
         context="placesContext"
--- a/browser/components/places/content/history-panel.xul
+++ b/browser/components/places/content/history-panel.xul
@@ -19,19 +19,19 @@
 <!-- we need to keep id="history-panel" for upgrade and switching
      between versions of the browser -->
 
 <page id="history-panel" orient="vertical"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="HistorySidebarInit();"
       onunload="SidebarUtils.setMouseoverURL('');">
 
-  <script type="application/javascript" 
+  <script type="application/javascript"
           src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
-  <script type="application/javascript" 
+  <script type="application/javascript"
           src="chrome://browser/content/places/history-panel.js"/>
 
   <commandset id="editMenuCommands"/>
   <commandset id="placesCommands"/>
 
   <keyset id="editMenuKeys">
 #ifdef XP_MACOSX
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
@@ -40,41 +40,39 @@
 
   <!-- required to overlay the context menu -->
   <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container" align="center">
-    <label id="sidebar-search-label"
-           value="&find.label;" accesskey="&find.accesskey;" 
-           control="search-box"/>
-    <textbox id="search-box" flex="1" type="search" class="compact"
+    <textbox id="search-box" flex="1" type="search"
+             placeholder="&search.placeholder;"
              aria-controls="historyTree"
              oncommand="searchHistory(this.value);"/>
     <button id="viewButton" style="min-width:0px !important;" type="menu"
             label="&view.label;" accesskey="&view.accesskey;" selectedsort="day"
             persist="selectedsort">
       <menupopup>
-        <menuitem id="bydayandsite" label="&byDayAndSite.label;" 
+        <menuitem id="bydayandsite" label="&byDayAndSite.label;"
                   accesskey="&byDayAndSite.accesskey;" type="radio"
                   oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'dayandsite'); GroupBy('dayandsite');"/>
-        <menuitem id="bysite" label="&bySite.label;"  
+        <menuitem id="bysite" label="&bySite.label;"
                   accesskey="&bySite.accesskey;" type="radio"
                   oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'site'); GroupBy('site');"/>
-        <menuitem id="byday" label="&byDate.label;" 
+        <menuitem id="byday" label="&byDate.label;"
                   accesskey="&byDate.accesskey;"
                   type="radio"
                   oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'day'); GroupBy('day');"/>
-        <menuitem id="byvisited" label="&byMostVisited.label;" 
+        <menuitem id="byvisited" label="&byMostVisited.label;"
                   accesskey="&byMostVisited.accesskey;"
                   type="radio"
                   oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'visited'); GroupBy('visited');"/>
-        <menuitem id="bylastvisited" label="&byLastVisited.label;" 
+        <menuitem id="bylastvisited" label="&byLastVisited.label;"
                   accesskey="&byLastVisited.accesskey;"
                   type="radio"
                   oncommand="this.parentNode.parentNode.setAttribute('selectedsort', 'lastvisited'); GroupBy('lastvisited');"/>
       </menupopup>
     </button>
   </hbox>
 
   <tree id="historyTree"
--- a/browser/components/places/jar.mn
+++ b/browser/components/places/jar.mn
@@ -2,31 +2,31 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 browser.jar:
 % overlay chrome://browser/content/places/places.xul chrome://browser/content/places/downloadsViewOverlay.xul
 # Provide another URI for the bookmarkProperties dialog so we can persist the
 # attributes separately
     content/browser/places/bookmarkProperties2.xul       (content/bookmarkProperties.xul)
-*   content/browser/places/places.xul                    (content/places.xul) 
+*   content/browser/places/places.xul                    (content/places.xul)
     content/browser/places/places.js                     (content/places.js)
     content/browser/places/places.css                    (content/places.css)
     content/browser/places/organizer.css                 (content/organizer.css)
     content/browser/places/bookmarkProperties.xul        (content/bookmarkProperties.xul)
     content/browser/places/bookmarkProperties.js         (content/bookmarkProperties.js)
     content/browser/places/placesOverlay.xul             (content/placesOverlay.xul)
     content/browser/places/menu.xml                      (content/menu.xml)
     content/browser/places/tree.xml                      (content/tree.xml)
     content/browser/places/controller.js                 (content/controller.js)
     content/browser/places/treeView.js                   (content/treeView.js)
     content/browser/places/browserPlacesViews.js         (content/browserPlacesViews.js)
-# keep the Places version of the history sidebar at history/history-panel.xul 
+# keep the Places version of the history sidebar at history/history-panel.xul
 # to prevent having to worry about between versions of the browser
-*   content/browser/history/history-panel.xul            (content/history-panel.xul) 
+*   content/browser/history/history-panel.xul            (content/history-panel.xul)
     content/browser/places/history-panel.js              (content/history-panel.js)
 # ditto for the bookmarks sidebar
     content/browser/bookmarks/bookmarksPanel.xul         (content/bookmarksPanel.xul)
     content/browser/bookmarks/bookmarksPanel.js          (content/bookmarksPanel.js)
     content/browser/bookmarks/sidebarUtils.js            (content/sidebarUtils.js)
     content/browser/places/moveBookmarks.xul             (content/moveBookmarks.xul)
     content/browser/places/moveBookmarks.js              (content/moveBookmarks.js)
     content/browser/places/editBookmarkOverlay.xul       (content/editBookmarkOverlay.xul)
--- a/browser/locales/en-US/chrome/browser/places/places.dtd
+++ b/browser/locales/en-US/chrome/browser/places/places.dtd
@@ -80,18 +80,17 @@
 <!ENTITY col.tags.label          "Tags">
 <!ENTITY col.url.label           "Location">
 <!ENTITY col.mostrecentvisit.label "Most Recent Visit">
 <!ENTITY col.visitcount.label    "Visit Count">
 <!ENTITY col.description.label   "Description">
 <!ENTITY col.dateadded.label     "Added">
 <!ENTITY col.lastmodified.label  "Last Modified">
 
-<!ENTITY search.label                              "Search:">
-<!ENTITY search.accesskey                          "S">
+<!ENTITY search.placeholder  "Search">
 
 <!ENTITY cmd.find.key  "f">
 
 <!ENTITY maintenance.label      "Import and Backup">
 <!ENTITY maintenance.accesskey  "I">
 <!ENTITY maintenance.tooltip    "Import and backup your bookmarks">
 
 <!ENTITY backButton.tooltip  "Go back">
@@ -99,18 +98,16 @@
 <!ENTITY forwardButton.tooltip  "Go forward">
 
 <!ENTITY detailsPane.more.label "More">
 <!ENTITY detailsPane.more.accesskey "e">
 <!ENTITY detailsPane.less.label "Less">
 <!ENTITY detailsPane.less.accesskey "e">
 <!ENTITY detailsPane.selectAnItemText.description "Select an item to view and edit its properties">
 
-<!ENTITY find.label               "Search:">
-<!ENTITY find.accesskey           "S">
 <!ENTITY view.label               "View">
 <!ENTITY view.accesskey           "w">
 <!ENTITY byDate.label             "By Date">
 <!ENTITY byDate.accesskey         "D">
 <!ENTITY bySite.label             "By Site">
 <!ENTITY bySite.accesskey         "S">
 <!ENTITY byMostVisited.label      "By Most Visited">
 <!ENTITY byMostVisited.accesskey  "V">