This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-16
Channels
- # ai (2)
- # announcements (9)
- # asami (6)
- # babashka (6)
- # beginners (49)
- # clojure (33)
- # clojure-europe (31)
- # clojure-nl (2)
- # clojure-norway (29)
- # clojure-uk (12)
- # clr (3)
- # cursive (3)
- # data-science (27)
- # datomic (13)
- # emacs (1)
- # graalvm (12)
- # gratitude (1)
- # hyperfiddle (39)
- # integrant (14)
- # leiningen (1)
- # matrix (3)
- # music (1)
- # off-topic (39)
- # other-languages (3)
- # pathom (7)
- # pedestal (19)
- # polylith (5)
- # portal (9)
- # releases (4)
- # shadow-cljs (8)
- # spacemacs (11)
- # squint (7)
- # testing (11)
I frequently write stuff like this:
(defn some-fn [arg1 arg2]
...
(tap> {:in `some-fn :arg1 arg1 :arg2 arg2 :some-local-val some-local-val})
...
Is there some helper that'd just let me say:
(mytap> ['arg1 'arg2 'some-local-val])
?I recently tried https://github.com/beoliver/wiretap to log arguments and return values of functions, doesn't tap local values though
There are several macros like https://github.com/worldsingles/commons/blob/master/src/ws/clojure/extensions.clj#L152 that produce a hash map of all locals (incl. arguments) so (tap> (ws/local-map))
might be an option?
Is there any way to inject a <style>
tag in portal hiccup viewer for previewing components that have external styles?
was asked here. but couln’t find anything else. https://clojurians.slack.com/archives/C0185BFLLSE/p1661027933535839
Currently, the easiest way is to include the styles in a style tag in the hiccup itself:
[:<> [:style ...] [:div ...]]
That is what I intuitively tried first. What threw me off was that, subsequent taps, rendering hiccup to the portal window, would not override previously rendered css. Ex. If I rendered green text on the first tap, then it would not change on subsequent taps. But I see now that If i p/clear
, then I get a fresh css context.
Now using some config you provided me before, to only show the last result in the window. This fulfills my goal to preview html + non-inline css!
(def last-tap (atom nil))
(defn clear-submit [value]
(reset! last-tap value))
(p/inspect last-tap {:launcher :vs-code})
(add-tap (var clear-submit))
Any insight into why the normal tap results are not isolated?, I thought each would be it’s own “webview”.