Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
sirmspencer opened this issue Mar 27, 2024 · 3 comments
Closed
1 task done
Labels

Comments

@sirmspencer
Copy link

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

  • yes

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 added a commit that referenced this issue Apr 13, 2024
Users can configure cljs-devtools via compiler options. For instance:

{...
 :builds
 {:app
  {...
   :dev
   {:compiler-options
    {...
     :external-config
     {:devtools/config
      {:min-expandable-sequable-count-for-well-known-types 1
       :features-to-install [:formatters :hints]}}}}}}}

Now, when users configure cljs-devtools, our jsonml
views (aka. "pods") will pick up on that.

For:
#416
@kimo-k
Copy link
Contributor

kimo-k commented Apr 13, 2024

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
Copy link
Contributor

kimo-k commented Apr 13, 2024

Should be working in 1.9.9

@kimo-k kimo-k closed this as completed Apr 13, 2024
@sirmspencer
Copy link
Author

Confirmed working, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants