This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-14
Channels
- # aleph (3)
- # announcements (16)
- # aws (6)
- # babashka (10)
- # beginners (28)
- # cider (1)
- # clj-kondo (14)
- # cljdoc (2)
- # cljs-dev (27)
- # cljsrn (7)
- # clojure (78)
- # clojure-europe (2)
- # clojurescript (14)
- # conjure (6)
- # core-async (2)
- # fulcro (5)
- # helix (7)
- # jobs (1)
- # lgbtq (1)
- # malli (12)
- # missionary (1)
- # nbb (10)
- # pathom (1)
- # portal (12)
- # protojure (1)
- # re-frame (41)
- # react (2)
- # reitit (1)
- # reveal (1)
- # shadow-cljs (72)
- # sql (11)
- # tools-deps (8)
- # vim (1)
- # xtdb (4)
Thanks to @rfhayashi for making it easier to leverage the vega-lite viewer! https://github.com/djblue/portal/pull/62
@djblue I was trying a few different charts today and had the same problem where portal spec does not match vega-lite's. I'm thinking of opening another PR removing most of the spec and use only top level attributes to decide whether the map is vega-lite. Do you agree on that direction?
Thanks to @andyhorng168 for figuring out how to implement the portal atom for the node.js runtime! https://github.com/djblue/portal/pull/60
Hey there. Thanks for making portal @djblue! I have been really liking it so far. I would love to replace REBL with it, but there are some things I cant seem to replicate that I find quite useful.
For example, Is there a way to add more context to a submit? I use these data viewers while I am testing, so I often have a few items tapped during a test run. I would love to be able to distinguish between the 8 maps that get logged. REBL achieves this by either displaying the form with inspect
or it allows sending a custom display value via their submit
function.
Is there a way to achieve something similar ATM with portal?
Hi @U07U0HNRZ, thanks for the kind words. What type of context are you thinking?
I am not suggesting that portal work like REBL, but something in spirit would be cool. If I make a call like (rebl/submit :my-fn-result result)
then it displays the item like :my-fn-result result
in the list of expressions. Right now I kind of achieve the same thing by tapping a hashmap (tap> {:my-fn-result result})
, but it would be nice to have a way to display that :my-fn-result
in a more prominent way.
I think you might want to try something like if you want to customize how things look in portal:
(defn my-submit [value]
(p/submit
^{:portal.viewer/default :portal.viewer/hiccup}
[:div
[:h1 "hello, there"]
[:portal.viewer/inspector value]]))
Okay I will give that try, thanks!