Fork me on GitHub
#portal
<
2021-08-14
>
djblue03:08:48

Thanks to @rfhayashi for making it easier to leverage the vega-lite viewer! https://github.com/djblue/portal/pull/62

🎉 6
rfhayashi12:08:00

Thanks for the quick review and merge.

rfhayashi21:08:32

@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?

djblue21:08:59

I think @U017BNGT998 might want to weigh in here

💯 2
djblue03:08:30

Thanks to @andyhorng168 for figuring out how to implement the portal atom for the node.js runtime! https://github.com/djblue/portal/pull/60

🎉 9
❤️ 3
andyhorng12:08:35

Thanks for the fix! I am excited to use it at my work!

💯 3
rabidpraxis16:08:24

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?

djblue18:08:43

Hi @U07U0HNRZ, thanks for the kind words. What type of context are you thinking?

rabidpraxis18:08:24

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.

djblue19:08:57

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]]))

djblue19:08:56

Then you can (add-tap #'my-submit) instead

rabidpraxis20:08:39

Okay I will give that try, thanks!