This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-15
Channels
- # announcements (1)
- # architecture (8)
- # babashka (7)
- # beginners (5)
- # biff (8)
- # calva (24)
- # cider (9)
- # clerk (14)
- # clj-kondo (7)
- # clojars (14)
- # clojure (49)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (90)
- # clojure-uk (3)
- # clojurescript (5)
- # core-typed (70)
- # cursive (35)
- # data-science (4)
- # datalevin (6)
- # datomic (2)
- # emacs (3)
- # fulcro (1)
- # holy-lambda (1)
- # hyperfiddle (5)
- # lsp (26)
- # malli (28)
- # off-topic (9)
- # re-frame (21)
- # releases (1)
- # shadow-cljs (7)
- # squint (6)
- # testing (14)
Shadow-cljs can now embed its web page in the DevTools: https://www.reddit.com/r/Clojure/comments/1bfa1ym/shadowcljs_ui_browser_extension/ Curious whether something like this would make sense for re-frame-10x.
Fulcro Inspect is also a browser extension, and I like having everything in one place. I love 10x but I find it a little weird to use ergonomically, and it clutters up the component tree in React DevTools. But idk the implications of packaging it as an extension.
We assessed this a few years back. The takeaway was that we'd have to serialize a lot of data (for instance, the whole re-frame db) to pass it to & from a separate process. So that would be a big performance bottleneck. It would be great if this assumption turned out wrong, somehow. I agree that devtools or extensions would be a nicer home for 10x than the current shadow-root window.
@U05224H0W Did you have to serialize stuff for it to work with shadow-cljs?
hmm? don't quite understand the question? the extension itself is basically no code at all, it literally just opens the regular UI webpage in an iframe
FWIW I'm working on devtools for shadow-grove, which are somewhat somewhat similar to 10x. you can do partial transfers of stuff and don't always have to transfer everything. so far I haven't run into any bottlenecks
It's not only about bottlenecks, I'd think. E.g. suppose there's a function on re-frame's app-db and you want to store it as a global object in the JS console in DevTools. When re-frame-10x is a part of the app's web page, it's trivial. Can it be done when it's an iframe? @U02J388JDEG But the re-frame-10x panel can also be popped out. How does that work?
still working on the UI bits, but I'd second that having these in a separate "window" outside the actual webpage is useful
I'm also probably writing up how I did it for shadow-grove devtools, since that basis would also work for 10x I think
would save users having to compile 10x and all its dependencies as part of the build too
Apart from that point that's still unclear to me above, a downside to a DevTools panel is that it would be harder to rely on a particular version.
not really. the way this is going to work for shadow-grove is that I ship them as part of the shadow-grove library itself. precompiled. so the user always gets the exact version required for the library version they are using.
the files are then served directly from the classpath. so there is never any mismatch between version of whatever