Bug 1561362 - Implement slow label on JSON viewer expand all button r=Honza

Differential Revision: https://phabricator.services.mozilla.com/D67766

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Zachary Svoboda 2020-03-25 16:24:34 +00:00
parent 99ba796141
commit 14bde58748
2 changed files with 7 additions and 6 deletions

View File

@ -73,11 +73,11 @@ define(function(require, exports, module) {
{ className: "btn collapse", onClick: this.onCollapse }, { className: "btn collapse", onClick: this.onCollapse },
JSONView.Locale["jsonViewer.CollapseAll"] JSONView.Locale["jsonViewer.CollapseAll"]
), ),
this.props.dataSize > EXPAND_THRESHOLD ToolbarButton(
? undefined
: ToolbarButton(
{ className: "btn expand", onClick: this.onExpand }, { className: "btn expand", onClick: this.onExpand },
JSONView.Locale["jsonViewer.ExpandAll"] this.props.dataSize > EXPAND_THRESHOLD
? JSONView.Locale["jsonViewer.ExpandAllSlow"]
: JSONView.Locale["jsonViewer.ExpandAll"]
), ),
div({ className: "devtools-separator" }), div({ className: "devtools-separator" }),
SearchBox({ SearchBox({

View File

@ -31,6 +31,7 @@ jsonViewer.Copy=Copy
# LOCALIZATION NOTE (jsonViewer.ExpandAll): Label for expanding all nodes # LOCALIZATION NOTE (jsonViewer.ExpandAll): Label for expanding all nodes
jsonViewer.ExpandAll=Expand All jsonViewer.ExpandAll=Expand All
jsonViewer.ExpandAllSlow=Expand All (slow)
# LOCALIZATION NOTE (jsonViewer.CollapseAll): Label for collapsing all nodes # LOCALIZATION NOTE (jsonViewer.CollapseAll): Label for collapsing all nodes
jsonViewer.CollapseAll=Collapse All jsonViewer.CollapseAll=Collapse All