Bug 1561362 - Implement slow label on JSON viewer expand all button r=Honza
☠☠ backed out by cbe6a9e7a2ea ☠ ☠
authorZachary Svoboda <cczac1@gmail.com>
Tue, 24 Mar 2020 07:54:36 +0000
changeset 520185 1e70c2d4173d43dc252df5da61a17d6d80c92781
parent 520184 a76dbda5d45aa99fb209a0b79226fa5df193f25d
child 520186 1332b0d2dcba87d5e674c6656175e3ecd73ed85f
push id37245
push useropoprus@mozilla.com
push dateTue, 24 Mar 2020 21:46:41 +0000
treeherdermozilla-central@dbabf2e388fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1561362
milestone76.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 1561362 - Implement slow label on JSON viewer expand all button r=Honza Differential Revision: https://phabricator.services.mozilla.com/D67766
devtools/client/jsonview/components/JsonToolbar.js
devtools/client/locales/en-US/jsonview.properties
--- a/devtools/client/jsonview/components/JsonToolbar.js
+++ b/devtools/client/jsonview/components/JsonToolbar.js
@@ -68,22 +68,22 @@ define(function(require, exports, module
         ToolbarButton(
           { className: "btn copy", onClick: this.onCopy },
           JSONView.Locale["jsonViewer.Copy"]
         ),
         ToolbarButton(
           { className: "btn collapse", onClick: this.onCollapse },
           JSONView.Locale["jsonViewer.CollapseAll"]
         ),
-        this.props.dataSize > EXPAND_THRESHOLD
-          ? undefined
-          : ToolbarButton(
-              { className: "btn expand", onClick: this.onExpand },
+        ToolbarButton(
+          { className: "btn expand", onClick: this.onExpand },
+            this.props.dataSize > EXPAND_THRESHOLD ? 
+              JSONView.Locale["jsonViewer.ExpandAllSlow"] :
               JSONView.Locale["jsonViewer.ExpandAll"]
-            ),
+        ),
         div({ className: "devtools-separator" }),
         SearchBox({
           actions: this.props.actions,
         })
       );
     }
   }
 
--- a/devtools/client/locales/en-US/jsonview.properties
+++ b/devtools/client/locales/en-US/jsonview.properties
@@ -26,16 +26,17 @@ jsonViewer.requestHeaders=Request Header
 # LOCALIZATION NOTE (jsonViewer.Save): Label for save command
 jsonViewer.Save=Save
 
 # LOCALIZATION NOTE (jsonViewer.Copy): Label for clipboard copy command
 jsonViewer.Copy=Copy
 
 # LOCALIZATION NOTE (jsonViewer.ExpandAll): Label for expanding all nodes
 jsonViewer.ExpandAll=Expand All
+jsonViewer.ExpandAllSlow=Expand All (slow)
 
 # LOCALIZATION NOTE (jsonViewer.CollapseAll): Label for collapsing all nodes
 jsonViewer.CollapseAll=Collapse All
 
 # LOCALIZATION NOTE (jsonViewer.PrettyPrint): Label for JSON
 # pretty print action button.
 jsonViewer.PrettyPrint=Pretty Print