From 74faed83e3a82678fac156b565b78c9434afd364 Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Mon, 30 Oct 2017 14:10:00 +1300 Subject: [PATCH] Hide index spans --- src/day8/re_frame/trace/app_db.cljs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/day8/re_frame/trace/app_db.cljs b/src/day8/re_frame/trace/app_db.cljs index 6cf8bdc..08be751 100644 --- a/src/day8/re_frame/trace/app_db.cljs +++ b/src/day8/re_frame/trace/app_db.cljs @@ -5,6 +5,11 @@ [day8.re-frame.trace.localstorage :as localstorage] [day8.re-frame.trace.components :as components])) +(devtools.prefs/set-pref! :header-style "") + +;; Hide the index spans on the left hand of collections. Shows how many elements in a collection. +(devtools.prefs/set-pref! :none-style "display: none") +(devtools.prefs/set-pref! :index-tag [:span :none-style]) (defn string->css [css-string] "This function converts jsonml css-strings to valid css maps for hiccup. @@ -16,17 +21,7 @@ (reduce (fn [acc [property value]] (assoc acc (keyword property) value)) {}))) -(def config {:well-known-types #{"cljs.core/Keyword"} - - :render-bools false - :render-strings false - :render-numbers false - :render-keywords false - :render-symbols false - :render-instances false - :render-types false - :render-functions false - }) +(def config {:initial-hierarchy-depth-budget false}) (declare jsonml->hiccup) @@ -86,7 +81,7 @@ (and @expanded? (or (string? data) (number? data))) [:div {:style {:margin "10px 0"}} data] - @expanded? (jsonml->hiccup (cljs-devtools/header-api-call data config :extra)))]]))) + @expanded? (jsonml->hiccup (cljs-devtools/header-api-call data config)))]]))) (defn render-state [data] (let [subtree-input (r/atom "")