From b51e935a9cea4a973ba4428d2b3a8333fe1b4b12 Mon Sep 17 00:00:00 2001 From: Zachary Svoboda Date: Wed, 25 Mar 2020 16:24:34 +0000 Subject: [PATCH] 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 | 12 ++++++------ devtools/client/locales/en-US/jsonview.properties | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/devtools/client/jsonview/components/JsonToolbar.js b/devtools/client/jsonview/components/JsonToolbar.js index 877d441e34f7..b60df8d5ba2f 100644 --- a/devtools/client/jsonview/components/JsonToolbar.js +++ b/devtools/client/jsonview/components/JsonToolbar.js @@ -73,12 +73,12 @@ define(function(require, exports, module) { { className: "btn collapse", onClick: this.onCollapse }, JSONView.Locale["jsonViewer.CollapseAll"] ), - this.props.dataSize > EXPAND_THRESHOLD - ? undefined - : ToolbarButton( - { className: "btn expand", onClick: this.onExpand }, - JSONView.Locale["jsonViewer.ExpandAll"] - ), + 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, diff --git a/devtools/client/locales/en-US/jsonview.properties b/devtools/client/locales/en-US/jsonview.properties index b810f730ebd8..6ef5e4e0e3c9 100644 --- a/devtools/client/locales/en-US/jsonview.properties +++ b/devtools/client/locales/en-US/jsonview.properties @@ -31,6 +31,7 @@ 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