day8 / re-frame-10x

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

re-frame-10x uses cljs-devtools but completely overwrites its config #319

Closed p-himik closed 2 years ago

p-himik commented 3 years ago

What do you suggest?

I have no idea why re-frame-10x does that, but if it needs some specific settings to be set to some specific values, two things are needed IMO:

Case in point - I need to set :min-expandable-sequable-count-for-well-known-types to 1. For some reason, re-frame-10x sets it to 3 making some values not expandable and incredibly long, going way past the screen border.

superstructor commented 2 years ago

@MawiraIke Please change this so we only inject config that is required for 10x to work correctly, otherwise the behaviour should be to leave the devtools config as-is.

MawiraIke commented 2 years ago

Noted @superstructor 👍🏼 Should the styling remain?

MawiraIke commented 2 years ago

Attached the PR above. I have tried to retain the look of the previous app-db as much possible. Open to making any changes to the configs.

p-himik commented 1 year ago

Just tried it - it doesn't solve the issue. re-frame-10x uses devtools.prefs/default-config but should be using devtools.prefs/*current-config* because otherwise any user changes are ignored.

The comment in the changed file says:

;; This used to be in the api-call fn below. However, recalculating this on *every* render is expensive so moved
;; here as static def.

But what about using memoize with a function accepting current cljs-devtools config as its argument? It would tick all the boxes.