From 37c355bea3f01c8962edcf9d77a69fbb65ab2418 Mon Sep 17 00:00:00 2001 From: Antonin Hildebrand Date: Sun, 31 Jul 2016 19:53:46 +0200 Subject: [PATCH] shave off one more depth level from header expander (issue #22) --- src/lib/devtools/defaults.cljs | 2 -- src/lib/devtools/formatters/budgeting.cljs | 4 ++-- src/lib/devtools/formatters/markup.cljs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/devtools/defaults.cljs b/src/lib/devtools/defaults.cljs index de5e310..9bb39e5 100644 --- a/src/lib/devtools/defaults.cljs +++ b/src/lib/devtools/defaults.cljs @@ -183,7 +183,6 @@ :expandable-inner-tag [:span :expandable-inner-style] :instance-custom-printing-tag [:span :instance-custom-printing-style] :default-envelope-tag [:span :default-envelope-style] - :header-expander-tag [:span :header-expander-style] ; -- DOM tags mapping ---------------------------------------------------------------------------------------------------- @@ -201,7 +200,6 @@ "border-radius: 2px;") :header-style (css "white-space: nowrap;") ; this prevents jumping of content when expanding sections due to content wrapping - :header-expander-style (css "white-space: nowrap;") ; this prevents jumping of content when expanding sections due to content wrapping :expandable-style (css "white-space: nowrap;" "padding-left: 3px;") :expandable-inner-style (css "margin-left: -3px;") diff --git a/src/lib/devtools/formatters/budgeting.cljs b/src/lib/devtools/formatters/budgeting.cljs index 44e351f..f899f88 100644 --- a/src/lib/devtools/formatters/budgeting.cljs +++ b/src/lib/devtools/formatters/budgeting.cljs @@ -13,8 +13,8 @@ ; this is hardcoded in InjectedScriptSource.js in WebKit, look for maxCustomPreviewRecursionDepth (def initial-hierarchy-depth-budget (dec 20)) -; we need to reserve some depth levels for our :header-expander-tag -(def header-expander-depth-cost 3) +; we need to reserve some depth levels for our expander symbol +(def header-expander-depth-cost 2) ; -- tracking over-budget values ------------------------------------------------------------------------------------------- diff --git a/src/lib/devtools/formatters/markup.cljs b/src/lib/devtools/formatters/markup.cljs index 1e472ca..eaf4d1d 100644 --- a/src/lib/devtools/formatters/markup.cljs +++ b/src/lib/devtools/formatters/markup.cljs @@ -59,7 +59,7 @@ [:native-reference-tag :native-reference-background reference])) (defn [object] - [:header-expander-tag ( ( object :header-expander-symbol :target) reset-depth-limits)]) + ( ( object :header-expander-symbol :target) reset-depth-limits)) ; -- simple markup ----------------------------------------------------------------------------------------------------------