Bug 1463357 - Add tooltip to the console button of split console and sidebar. r?nchevobbe draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Thu, 12 Jul 2018 13:11:55 +0900
changeset 817145 8018562e05135beb3970bf26536c1f6eeb5c25bb
parent 815516 ffb7b5015fc331bdc4c5e6ab52b9de669faa8864
push id115969
push userbmo:mantaroh@gmail.com
push dateThu, 12 Jul 2018 04:12:30 +0000
reviewersnchevobbe
bugs1463357
milestone63.0a1
Bug 1463357 - Add tooltip to the console button of split console and sidebar. r?nchevobbe This patch add tooltip to close buttons of webconsole. MozReview-Commit-ID: Elw0aGbn9k5
devtools/client/locales/en-US/webconsole.properties
devtools/client/webconsole/components/FilterBar.js
devtools/client/webconsole/components/SideBar.js
--- a/devtools/client/locales/en-US/webconsole.properties
+++ b/devtools/client/locales/en-US/webconsole.properties
@@ -271,8 +271,16 @@ webconsole.resetFiltersButton.label=Rese
 webconsole.enablePersistentLogs.label=Persist Logs
 # LOCALIZATION NOTE (webconsole.enablePersistentLogs.tooltip)
 webconsole.enablePersistentLogs.tooltip=If you enable this option the output will not be cleared each time you navigate to a new page
 
 # LOCALIZATION NOTE (webconsole.navigated): this string is used in the console when the
 # current inspected page is navigated to a new location.
 # Parameters: %S is the new URL.
 webconsole.navigated=Navigated to %S
+
+# LOCALIZATION NOTE (webconsole.closeSplitConsoleButton.tooltip): This is the tooltip for
+# the close button of the split console.
+webconsole.closeSplitConsoleButton.tooltip=Close Split Console (Esc)
+
+# LOCALIZATION NOTE (webconsole.closeSidebarButton.tooltip): This is the tooltip for
+# the close button of the sidebar.
+webconsole.closeSidebarButton.tooltip=Close Sidebar
--- a/devtools/client/webconsole/components/FilterBar.js
+++ b/devtools/client/webconsole/components/FilterBar.js
@@ -287,16 +287,17 @@ class FilterBar extends Component {
     if (this.props.closeButtonVisible) {
       children.push(dom.div(
         {
           className: "devtools-toolbar split-console-close-button-wrapper"
         },
         dom.button({
           id: "split-console-close-button",
           className: "devtools-button",
+          title: l10n.getStr("webconsole.closeSplitConsoleButton.tooltip"),
           onClick: () => {
             closeSplitConsole();
           },
         })
       ));
     }
 
     if (filterBarVisible) {
--- a/devtools/client/webconsole/components/SideBar.js
+++ b/devtools/client/webconsole/components/SideBar.js
@@ -5,16 +5,17 @@
 
 const { Component, createFactory } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 const { getObjectInspector } = require("devtools/client/webconsole/utils/object-inspector");
 const actions = require("devtools/client/webconsole/actions/index");
 const SplitBox = createFactory(require("devtools/client/shared/components/splitter/SplitBox"));
+const { l10n } = require("devtools/client/webconsole/utils/messages");
 
 const reps = require("devtools/client/shared/components/reps/reps");
 const { MODE } = reps;
 
 class SideBar extends Component {
   static get propTypes() {
     return {
       serviceContainer: PropTypes.object,
@@ -62,16 +63,17 @@ class SideBar extends Component {
     const endPanel = dom.aside({
       className: "sidebar-wrapper"
     },
       dom.header({
         className: "devtools-toolbar webconsole-sidebar-toolbar"
       },
         dom.button({
           className: "devtools-button sidebar-close-button",
+          title: l10n.getStr("webconsole.closeSidebarButton.tooltip"),
           onClick: this.onClickSidebarClose
         })
       ),
       dom.aside({
         className: "sidebar-contents"
       }, objectInspector)
     );