Fork me on GitHub

Thanks to @rfhayashi for making it easier to leverage the vega-lite viewer!

🎉 6

Thanks for the quick review and merge.


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


I think @U017BNGT998 might want to weigh in here

💯 2

Thanks to @andyhorng168 for figuring out how to implement the portal atom for the node.js runtime!

🎉 9
❤️ 3

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

💯 3

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]
   ^{:portal.viewer/default :portal.viewer/hiccup}
    [:h1 "hello, there"]
    [:portal.viewer/inspector value]]))


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


Okay I will give that try, thanks!