This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-12
Channels
- # adventofcode (80)
- # announcements (11)
- # babashka-sci-dev (6)
- # beginners (52)
- # calva (144)
- # clj-kondo (28)
- # cljdoc (2)
- # cljs-dev (7)
- # clojure (120)
- # clojure-dev (28)
- # clojure-europe (36)
- # clojure-nl (1)
- # clojure-norway (16)
- # clojure-uk (3)
- # clojurescript (1)
- # cursive (4)
- # datomic (14)
- # figwheel-main (5)
- # fulcro (23)
- # hoplon (2)
- # hyperfiddle (46)
- # improve-getting-started (10)
- # jobs (1)
- # joyride (1)
- # leiningen (10)
- # malli (5)
- # nbb (5)
- # off-topic (21)
- # polylith (7)
- # portal (15)
- # practicalli (1)
- # rdf (18)
- # re-frame (3)
- # releases (2)
- # remote-jobs (5)
- # shadow-cljs (25)
- # spacemacs (4)
- # tools-deps (16)
- # tree-sitter (1)
portal.api via node should work, however portal.web won't work. You will have to use the remote-api. https://cljdoc.org/d/djblue/portal/0.35.0/doc/guides/shadow-cljs for more info.
What can I expect when using the remote-api? My taps do not show up in the VS Code portal extension when I try.
I now notice I also get this in the browser console when I tap:
portal.client.web.js:3 Refused to connect to '' because it violates the document's Content Security Policy.
Very odd, the main thing required for the web client to work is CORS. Is that being blocked here?
Answering my questions: • Yes, I can use the VS Code extensions with shadow-cljs (also for a browser target) if I use the remote-api (`portal.shadow.remote`) like described https://cljdoc.org/d/djblue/portal/0.35.0/doc/guides/shadow-cljs. • I can expect taps from the ClojureScript app to show in the same portal as taps from my Clojure backend app. 🎉
Now I need to figure out how to also hook my node session to portal. That's where the tests are auto-running.
Hi, is it possible to have tap>
s appear in the Portal UI as trees by default? Every tap>
I evaluate appears with :portal.viewer/inspector
as the viewer. Placing https://github.com/djblue/portal/blob/master/src/examples/default_visualizer.clj on the data passed to a tap>
works, but I was hoping for something I could, say, pass to p/open
that would set the default viewer without having to attach metadata to every tap>
call. I am using the IntelliJ plugin.
I think the easiest way to do this is to pass a custom submit function to add-tap:
(defn can-meta? [value]
(instance? clojure.lang.IObj value))
(defn submit [value]
(p/submit
(if-not (can-meta? value)
value
(with-meta value {:portal.viewer/default :portal.viewer/tree}))))
(add-tap submit)
For shadow-cljs I did this:
(defn submit [value]
(shadow/submit
(if (implements? IWithMeta value)
(with-meta value {:portal.viewer/default :portal.viewer/tree})
value)))
(add-tap submit)
Answering my questions: • Yes, I can use the VS Code extensions with shadow-cljs (also for a browser target) if I use the remote-api (`portal.shadow.remote`) like described https://cljdoc.org/d/djblue/portal/0.35.0/doc/guides/shadow-cljs. • I can expect taps from the ClojureScript app to show in the same portal as taps from my Clojure backend app. 🎉