Skip to content

Commit

Permalink
shave off one more depth level from header expander (issue #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed Jul 31, 2016
1 parent a01463a commit 37c355b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/lib/devtools/defaults.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------------------------------------------------------------------------------------

Expand All @@ -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;")
Expand Down
4 changes: 2 additions & 2 deletions src/lib/devtools/formatters/budgeting.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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 -------------------------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/lib/devtools/formatters/markup.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
[:native-reference-tag :native-reference-background reference]))

(defn <header-expander> [object]
[:header-expander-tag (<reference> (<raw-surrogate> object :header-expander-symbol :target) reset-depth-limits)])
(<reference> (<raw-surrogate> object :header-expander-symbol :target) reset-depth-limits))

; -- simple markup ----------------------------------------------------------------------------------------------------------

Expand Down

0 comments on commit 37c355b

Please sign in to comment.