Bug 1488157 - Tweak the font editor warning message shown when no fonts were used. r=gl
authorRazvan Caliman <rcaliman@mozilla.com>
Mon, 03 Sep 2018 14:12:24 +0000
changeset 492253 42469f001fcb8e9f0361e523f2498b71c78e14fd
parent 492252 253b4b3b7055c7f49822a9fbd3ae0fda895d3518
child 492254 d808a15ac4bc24da60e58b64d8357133d7637b6c
child 492280 d14aaf65a80b3baddb193fa6707e4515e4a44609
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1488157
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1488157 - Tweak the font editor warning message shown when no fonts were used. r=gl MozReview-Commit-ID: 5dFEkTvbIKm Differential Revision: https://phabricator.services.mozilla.com/D4843
devtools/client/inspector/fonts/components/FontOverview.js
devtools/client/inspector/fonts/reducers/font-editor.js
devtools/client/locales/en-US/font-inspector.properties
devtools/client/themes/fonts.css
--- a/devtools/client/inspector/fonts/components/FontOverview.js
+++ b/devtools/client/inspector/fonts/components/FontOverview.js
@@ -50,17 +50,17 @@ class FontOverview extends PureComponent
         onPreviewTextChange,
         onToggleFontHighlight,
       })
       :
       dom.div(
         {
           className: "devtools-sidepanel-no-result"
         },
-        getStr("fontinspector.noFontsOnSelectedElement")
+        getStr("fontinspector.noFontsUsedOnCurrentElement")
       );
   }
 
   renderFonts() {
     const {
       fontData,
       fontOptions,
       onPreviewTextChange,
--- a/devtools/client/inspector/fonts/reducers/font-editor.js
+++ b/devtools/client/inspector/fonts/reducers/font-editor.js
@@ -29,17 +29,17 @@ const INITIAL_STATE = {
     name: getStr("fontinspector.customInstanceName"),
     values: [],
   },
   // CSS font properties defined on the selected rule.
   properties: {},
   // Unique identifier for the selected element.
   id: "",
   // Warning message with the reason why the font editor cannot be shown.
-  warning: getStr("fontinspector.noFontsOnSelectedElement"),
+  warning: getStr("fontinspector.noFontsUsedOnCurrentElement"),
 };
 
 const reducers = {
 
   // Update font editor with the axes and values defined by a font variation instance.
   [APPLY_FONT_VARIATION_INSTANCE](state, { name, values }) {
     const newState = { ...state };
     newState.instance.name = name;
--- a/devtools/client/locales/en-US/font-inspector.properties
+++ b/devtools/client/locales/en-US/font-inspector.properties
@@ -4,19 +4,19 @@
 
 # LOCALIZATION NOTE This file contains the Font Inspector strings.
 # The Font Inspector is a panel accessible in the Inspector sidebar.
 
 # LOCALIZATION NOTE (fontinspector.system) This label indicates that the font is a local
 # system font.
 fontinspector.system=system
 
-# LOCALIZATION NOTE (fontinspector.noFontsOnSelectedElement): This label is shown when
-# no fonts found on the selected element.
-fontinspector.noFontsOnSelectedElement=No fonts were found for the current element.
+# LOCALIZATION NOTE (fontinspector.noFontsUsedOnCurrentElement): This label is shown when
+# no fonts were used on the selected element.
+fontinspector.noFontsUsedOnCurrentElement=No fonts used on the current element.
 
 # LOCALIZATION NOTE (fontinspector.otherFontsInPageHeader): This is the text for the
 # header of a collapsible section containing other fonts used in the page.
 fontinspector.otherFontsInPageHeader=Other fonts in page
 
 # LOCALIZATION NOTE (fontinspector.copyURL): This is the text that appears in a tooltip
 # displayed when the user hovers over the copy icon next to the font URL.
 # Clicking the copy icon copies the full font URL to the user's clipboard
--- a/devtools/client/themes/fonts.css
+++ b/devtools/client/themes/fonts.css
@@ -57,16 +57,20 @@
 #font-editor details[open] .label-close {
   display: inline-block;
 }
 
 #font-editor details:not([open]) .label-open {
   display: inline-block;
 }
 
+#font-editor .devtools-sidepanel-no-result {
+  padding-bottom: 0;
+}
+
 .fonts-list {
   padding: 0;
   margin: 0;
   list-style: none;
 }
 
 .font {
   border: 1px solid var(--theme-splitter-color);