day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
631 stars 68 forks source link

[Bug]: I can't expand maps under 3 keys even when the data is long. #416

Closed sirmspencer closed 3 months ago

sirmspencer commented 3 months ago

What happened?

In our app-db there is a path where [:task] where the value of :task is a map with 3 keys. It looks like you can't expand the map in the UI if there is 3 or less keys. The problem is that the values of those three keys is quite long and it hides the other keys.

With the side bar expanded all the way accross the screen I can still only even see 2 of the three top level keys because I can't expand it. image Like I would be if there were more than 3 keys image

Can you remove that check for more than 3 keys to expand, or make it a setting?

Factory Reset

10x Version

1.9.8

Reagent Version

1.2

React Version

17

re-frame Version

1.4

What browsers are you seeing the problem on?

Chrome

Relevant console output

No response

kimo-k commented 3 months ago

Hey there,

We depend on cljs-devtools for this functionality. You can configure cljs-devtools with :min-expandable-sequable-count-for-well-known-types 0 for the UX you describe. Here's how that would look within re-frame-10x/example/shadow-cljs.edn:

{:deps true
 :nrepl {:port 8777}
 :builds
 {:app
  {:target :browser
   :output-dir "resources/public/js"
   :modules
   {:todomvc
    {:init-fn todomvc.core/main
     :preloads [day8.re-frame-10x.preload.react-18]}}
   :dev
   {:compiler-options
    {:infer-externs false
     :closure-defines
     {re-frame.trace.trace-enabled? true
      day8.re-frame-10x.debug? true
      day8.re-frame.tracing.trace-enabled? true}
     :external-config
     {:devtools/config
      {:min-expandable-sequable-count-for-well-known-types 1
       :features-to-install
       [:formatters :hints]}}}}
   :devtools
   {:http-root "resources/public"
    :http-port 8280}}}}
kimo-k commented 3 months ago

Should be working in 1.9.9

sirmspencer commented 2 months ago

Confirmed working, thank you!