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
--- 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)
);